[PATCH v2 06/10] powerpc64le: raise GCC requirement to 7.3 for long double transition
Paul E Murphy
murphyp@linux.ibm.com
Tue Mar 31 20:47:12 GMT 2020
On 3/27/20 4:17 PM, Paul E. Murphy via Libc-alpha wrote:
> Add compiler feature tests to ensure we can build ieee128 long double.
> These test for -mabi=ieeelongdouble, -mno-gnu-attribute, and -Wno-psabi.
>
> Likewise, verify some compiler bugs have been addressed. These aren't
> helpful for building glibc, but may cause test failures when testing
> the new long double. See notes below from Raji.
>
> On powerpc64le, some older compiler versions give error for the function
> signbit() for 128-bit floating point types. This is fixed by PR83862
> in gcc 8.0 and backported to gcc6 and gcc7. This patch adds a test
> to check compiler version to avoid compiler errors during make check.
It turns out this is incorrect. Based on testing and feedback in the
BZ, this fix arrived in GCC 7.4. While GCC 7.3 can build glibc, it will
fail to build several ldouble related tests. Thus, the actual minimum
is GCC 7.4.
I will update the commit message, and configure error to reflect this,
and post new patches once the preparatory patches are submitted.
>
> Likewise, test for -mno-gnu-attribute support which was
>
> On powerpc64le, a few files are built on IEEE long double mode
> (-mabi=ieeelongdouble), whereas most are built on IBM long double mode
> (-mabi=ibmlongdouble, the default for -mlong-double-128). Since binutils
> 2.31, linking object files with different long double modes causes
> errors similar to:
>
> ld: libc_pic.a(s_isinfl.os) uses IBM long double,
> libc_pic.a(ieee128-qefgcvt.os) uses IEEE long double.
> collect2: error: ld returned 1 exit status
> make[2]: *** [../Makerules:649: libc_pic.os] Error 1
>
> The warnings are fair and correct, but in order for glibc to have
> support for both long double modes on powerpc64le, they have to be
> ignored. This can be accomplished with the use of -mno-gnu-attribute
> option when building the few files that require IEEE long double mode.
>
> However, -mno-gnu-attribute is not available in GCC 6, the minimum
> version required to build glibc, so this patch adds a test for this
> feature in powerpc64le builds, and fails early if it's not available.
>
> Co-Authored-By: Rajalakshmi Srinivasaraghavan <raji@linux.vnet.ibm.com>
> Co-Authored-By: Gabriel F. T. Gomes <gabrielftg@linux.ibm.com
More information about the Libc-alpha
mailing list