This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/81193] New: PowerPC GCC __builtin_cpu_is and __builtin_cpu_supports should warn about old libraries
- From: "meissner at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 23 Jun 2017 19:39:30 +0000
- Subject: [Bug target/81193] New: PowerPC GCC __builtin_cpu_is and __builtin_cpu_supports should warn about old libraries
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81193
Bug ID: 81193
Summary: PowerPC GCC __builtin_cpu_is and
__builtin_cpu_supports should warn about old libraries
Product: gcc
Version: 8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: meissner at gcc dot gnu.org
Target Milestone: ---
If GCC is configured with a new glibc, it supports the __builtin_cpu_is and
__builtin_cpu_supports built-in functions.
However, if GCC is configured with an old glibc, the various __builtin_cpu*
functions just return 0.
GCC should do either:
1) Warn that __builtin_cpu_is/__builtin_cpu_supports is not supported; (or)
2) It should call getauxval and check the HWCAP/HWCAP2 bits directly. Perhaps
there should be a helper function in libgcc that stands the built-in calls and
the code generated for the built-in functions.