[PATCH 2/3] powerpc64le: Check HWCAP bits against compiler build flags
Florian Weimer
fweimer@redhat.com
Wed May 12 08:27:33 GMT 2021
* Lucas A. M. Magalhaes:
> Hi Florian. I've tested this patch on POWER[8..10] with -mcpu=power9 and
> -mcpu=power10 built with GCC 10.3.1.
>
> When built with -mcpu=power10 I got a SIGILL on POWER8 and POWER10.
Do you mean POWER8 and POWER9?
> For testing I'm just running ./libc.so. I try to inspect it with
> gdb. With -mcpu=power9 I can see it passing through dl_hwcap_check
> but not with -mcpu=power10.
>
> I maybe doing something wrong though.
I tried to allude in the commit message that this is expected. Maybe I
should drop the POWER10 check?
I do not think this is fixable in the long term because I expect that
POWER10 builds won't need the bootstrap relocation in the dynamic loader
thanks to its PCREL instructions. (POWER10 should be
PI_STATIC_AND_HIDDEN.) We could disable POWER10 code for early parts of
the dynamic loader, but that will only work until we start to rely on
PI_STATIC_AND_HIDDEN, which has other benefits.
Thanks,
Florian
More information about the Libc-alpha
mailing list