This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] [powerpc] fpu_control.h: protect use of __builtin_cpu_supports()
- From: Florian Weimer <fweimer at redhat dot com>
- To: "Paul A. Clarke" <pc at us dot ibm dot com>
- Cc: libc-alpha at sourceware dot org, tuliom at ascii dot art dot br, law at redhat dot com, carlos at redhat dot com
- Date: Tue, 09 Jul 2019 08:19:13 +0200
- Subject: Re: [PATCH] [powerpc] fpu_control.h: protect use of __builtin_cpu_supports()
- References: <1562630076-11320-1-git-send-email-pc@us.ibm.com>
* Paul A. Clarke:
> From: "Paul A. Clarke" <pc@us.ibm.com>
>
> Using __builtin_cpu_supports() requires support in GCC and Glibc.
> My recent patch to fpu_control.h added an unprotected use of
> __builtin_cpu_supports(), and this is a user-visible file.
Are you sure? I don't think it's an installed header, and that's what
“user-visibile file” implies to me.
> Compilation of Glibc itself will fail with a sufficiently new GCC and
> sufficiently old Glibc:
> ../sysdeps/powerpc/fpu/fegetexcept.c: In function ‘__fegetexcept’:
> ../sysdeps/powerpc/fpu/fenv_libc.h:52:20: error: builtin ‘__builtin_cpu_supports’ needs GLIBC (2.23 and newer) that exports hardware capability bits [-Werror]
Presumably there is no way to tell the compiler that the glibc the code
is being built for actually supports the hwcap bits (without rebuilding
the compiler)?
Thanks,
Florian