From 46c999741340ea559784c20a45077955b50aca43 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 23 Apr 2024 13:59:50 -0700 Subject: x86: Define MINIMUM_X86_ISA_LEVEL in config.h [BZ #31676] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- sysdeps/x86/isa-level.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sysdeps/x86/isa-level.h') diff --git a/sysdeps/x86/isa-level.h b/sysdeps/x86/isa-level.h index 11fe1ca90c..2c7f74212b 100644 --- a/sysdeps/x86/isa-level.h +++ b/sysdeps/x86/isa-level.h @@ -61,8 +61,10 @@ # define __X86_ISA_V4 0 #endif -#define MINIMUM_X86_ISA_LEVEL \ +#ifndef MINIMUM_X86_ISA_LEVEL +# define MINIMUM_X86_ISA_LEVEL \ (__X86_ISA_V1 + __X86_ISA_V2 + __X86_ISA_V3 + __X86_ISA_V4) +#endif /* Depending on the minimum ISA level, a feature check result can be a compile-time constant.. */ -- cgit 1.4.1