This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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] powerpc64le build fails with GCC7


On Mon, Aug 21, 2017 at 08:56:48AM -0700, Alexey Neyman wrote:
> Hi all,
> 
> With GCC7, the test for -mfloat128 fails with a message that this
> option requires -mfloat128-type to be supplied as well. Cannot
> supply both options unconditionally, though, as GCC6 would choke on
> unknown option.
> 
> Patch attached, please review. Build-tested only, with GCC 7.2.0 and 6.4.0.
> 
> Regards,
> Alexey.
> 

> From ea42205587b557c604f165ffdb745d94035fd18d Mon Sep 17 00:00:00 2001
> From: Alexey Neyman <stilor@att.net>
> Date: Mon, 21 Aug 2017 08:50:02 -0700
> Subject: [PATCH] Fix powerpc64le target with GCC7
> 
> With GCC7, the test for -mfloat128 fails with a message that this
> option requires -mfloat128-type to be supplied as well. Cannot
> supply both options unconditionally, though, as GCC6 would choke
> on unknown option.
> 
>     * sysdeps/powerpc/powerpc64le/configure.ac:
>     Detect if -mfloat128-type needs to be supplied in addition to
>     -mfloat128
>     * configure.ac (libc_cv_compiler_powerpc64le_float128_type):
>     New variable.
>     * config.make.in (config-cflags-mfloat128-type): New variable.
>     * sysdeps/powerpc/powerpc64le/configure, configure: Regenerate.

This comes up because when you configure a cross compiler, the test for whether
long double defaults to 64 bits or 128 bits fails (i.e. glibc is at least 2.4
or newer), and the compiler defaults long double to 64 bits.  If you add the
--with-long-double-128 switch when you build the compiler, it should avoid the
message.

Similarly, when my patch to make -mfloat128 goes in, I reworked the test so
that float128 no longer checks if long doubles are 64 bits or 128 bits.
However, if you are doing a cross compiler, you should make sure the long
double support matches your target system (presumably configure the cross
compiler to use an appropriate glibc or add the --with-long-double-128
configuration option).


-- 
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meissner@linux.vnet.ibm.com, phone: +1 (978) 899-4797


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