On Tue, 5 May 2020, Kyrylo Tkachov wrote:

> This version of the fix uses __getauxval instead of getauxval.
> The whole thing is guarded simply on __GLIBC__ >= 2.
> __getauxval was introduced in 2.16 but the aarch64 port was added in 2.17 so 
> in practice I expect all aarch64 glibcs to support __getauxval.

Testing __GLIBC__ doesn't work because that's only defined in headers and 
the point of duplicating definitions here is to avoid libgcc and thus libc 
contents depending on whether headers were available when libgcc was 
built.  However, given your point that the AArch64 glibc port postdates 
the addition of __getauxval to glibc, you can test __gnu_linux__ instead, 
as a macro GCC predefines only when configured to use glibc on the target, 
and don't need a version test after all.

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to