This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch,Fortran,Build] PR driver/46516: Add -lquadmath in the FE not as libgfortran.spec file


On 11/18/2010 11:31 AM, Jakub Jelinek wrote:
On Thu, Nov 18, 2010 at 11:22:58AM +0100, Tobias Burnus wrote:
The automatic addition of -lquadmath is guarded by
LIBGCC2_HAS_TF_MODE, which should be a sufficiently safe check.
The macro looks misnamed to me, it is something only i?86/x86_64
define,
and ia64

which is good for libquadmath, but there are many other
targets that have TF mode, but as long double rather than __float128,
and those won't have libquadmath (talking about sparc*/powerpc*/s390* etc.).

I agree that it is misnamed - and that it is confusing. (The need for a comment why one cannot use LIBGCC2_HAS_TF_MODE directly already indicates that the macro is not well named, cf. gcc/config/dfp-bit.h.)


I terms of the patch, one could make it more explicit by using:

  #if LONG_DOUBLE_HAS_TF_MODE \
&& LIBGCC2_LONG_DOUBLE_TYPE_SIZE != 128

However, it then seems to make more sense to rename the macro ...

Tobias


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]