https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81193

--- Comment #8 from Peter Bergner <bergner at gcc dot gnu.org> ---
(In reply to Michael Meissner from comment #4)
> I think for the problem of using __builtin_cpu_<xxx>, we should issue a 
> warning
> (not a fatal error) if the configured GLIBC is too old saying you need to link
> against a newer library, but generate the same code that we normally do.  
> Given
> there is a reference to an external provided with the new glibc, it should be
> safe, because you would get a linker error if you actually tried to use it 
> with
> an old library.  It would allow creation of libraries with functions using
> __builtin_cpu_* and target_clone with an old compiler, providing the library 
> is
> linked appropriately.

But with your patch and one being contemplated for float128-ifunc.c in libgcc,
GCC will be a user of those builtins, so if we build on a system with an old
GLIBC, we'll get a bootstrap / build failure.  We can't have that.

I'm also starting to wonder about the warning.  We cannot just always emit the
warning, because the GCC bootstrap uses -Werror, so again, we'd end up with a
bootstrap / build error.  I agree that it would be nice to tell normal users
that the builtin they're using to always going to return false, but how can we
turn it off for GCC builds?

Reply via email to