[PATCH v3 0/4] aarch64: Allow overriding HWCAP_CPUID feature check

Siddhesh Poyarekar siddhesh@sourceware.org
Thu Jun 1 05:29:00 GMT 2017


On Wednesday 31 May 2017 01:53 AM, Steve Ellcey wrote:
> OK, I made a little progress.  If I don't set LD_HWCAP_MASK then it
> seems to be treating it as 0, even though the default value is supposed
> to be HWCAP_IMPORTANT which gets set to HWCAP_CPUID.  If I explicitly
> set LD_HWCAP_MASK to 0x800 then I get the correct heaviour and my
> program checks for CPUID.  I am not sure why the default value for
> LD_HWCAP_MASK does not seem to be right.

I just realized what's going on; it is a bug in tunables.  The
__tunables_set_val function returns without setting the value if the
value was not set by glibc.tune.hwcap_mask or LD_HWCAP_MASK, which is
wrong.  It should return whatever is set in the tunable list.

I'll fix that and repost.

Siddhesh



More information about the Libc-alpha mailing list