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] [powerpc] fpu_control.h: protect use of __builtin_cpu_supports()


* 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


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