This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Move -mlong-double-128 away from platform-agnostic files
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Tulio Magno Quites Machado Filho <tuliom at linux dot ibm dot com>
- Cc: <libc-alpha at sourceware dot org>
- Date: Thu, 31 May 2018 21:36:46 +0000
- Subject: Re: [PATCH] Move -mlong-double-128 away from platform-agnostic files
- References: <20180528220027.30943-1-tuliom@linux.ibm.com>
On Mon, 28 May 2018, Tulio Magno Quites Machado Filho wrote:
> The compiler flag -mlong-double-128 is platform-specific and shouldn't
> be used in platform-agnostic directories, such as ldbl-128ibm and
> ldbl-opt.
Theoretically, as a -m option, it's platform-specific. But in practice,
I'm not sure that's really the case - certainly all existing platforms
using ldbl-opt support -mlong-double-128 and -mlong-double-64. Indeed,
sysdeps/ieee754/ldbl-opt/configure.ac tests that -mlong-double-128 is
supported, and that __LONG_DOUBLE_128__ gets defined by the compiler; the
ldbl-opt bits/long-double.h relies on that __LONG_DOUBLE_128__ macro; the
ldbl-opt Makefile relies on -mlong-double-64 being available to build a
test with that option (unfortunately there is only the one test for
-mlong-double-64 support; new ieee128 interfaces should have more thorough
test coverage added no later than when the interfaces are enabled for
powerpc64le).
> This was not a problem because all the architectures implying these
> directories had to use -mlong-double-128 to set their long double type.
> As powerpc64le is changing its default long double type to be binary
> compatible with IEEE 128-bit floating point, this will have to change.
But as far as I know the option is still supported for powerpc64le. And
indeed it works fine together with -mabi=ieeelongdouble, and does not
change the format away from IEEE, and -mlong-double-64 also works together
with -mabi=ieeelongdouble (overriding it to make long double have the same
ABI as double).
So what is the actual problem you're trying to fix here? As far as I can
tell, the existing code should work just fine for powerpc64le in the
context of a changed long double default - you may need to *add* options
somewhere else to ensure -mabi=ibmlongdouble or -mabi=ieeelongdouble are
used to compile particular files (possibly together with
-mno-gnu-attribute to avoid link errors for incompatible ABIs), but I
don't see anything that would require -mlong-double-128 to be avoided, and
thus don't see any need to duplicate the code using that option for
different architectures.
--
Joseph S. Myers
joseph@codesourcery.com