x86: Define MINIMUM_X86_ISA_LEVEL in config.h [BZ #31676]
commit46c999741340ea559784c20a45077955b50aca43
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 23 Apr 2024 20:59:50 +0000 (23 13:59 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 24 Apr 2024 11:50:56 +0000 (24 04:50 -0700)
tree0884060cb97799eb444d0a3659e2709b6d5c683f
parent095067efdf68c8061d6f99a21a0300841bede999
x86: Define MINIMUM_X86_ISA_LEVEL in config.h [BZ #31676]

Define MINIMUM_X86_ISA_LEVEL at configure time to avoid

/usr/bin/ld: …/build/elf/librtld.os: in function `init_cpu_features':
…/git/elf/../sysdeps/x86/cpu-features.c:1202: undefined reference to `_dl_runtime_resolve_fxsave'
/usr/bin/ld: …/build/elf/librtld.os: relocation R_X86_64_PC32 against undefined hidden symbol `_dl_runtime_resolve_fxsave' can not be used when making a shared object
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status

when glibc is built with -march=x86-64-v3 and configured with
--with-rtld-early-cflags=-march=x86-64, which is used to allow ld.so to
print an error message on unsupported CPUs:

Fatal glibc error: CPU does not support x86-64-v3

This fixes BZ #31676.
Reviewed-by: Sunil K Pandey <skpgkp2@gmail.com>
config.h.in
sysdeps/x86/configure
sysdeps/x86/configure.ac
sysdeps/x86/isa-level.h