diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2021-02-02 13:45:58 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2021-03-06 07:49:30 -0800 |
commit | 339bf918ea4830fb35614632e96f3aab3237adce (patch) | |
tree | 5ecd1bdd6660574885c79796e389c30dcd6bc539 /config.h.in | |
parent | 3c667926673bac6017bf78569f582f6baee9948f (diff) | |
download | glibc-339bf918ea4830fb35614632e96f3aab3237adce.tar glibc-339bf918ea4830fb35614632e96f3aab3237adce.tar.gz glibc-339bf918ea4830fb35614632e96f3aab3237adce.tar.bz2 glibc-339bf918ea4830fb35614632e96f3aab3237adce.zip |
x86: Set minimum x86-64 level marker [BZ #27318]
Since the full ISA set used in an ELF binary is unknown to compiler,
an x86-64 ISA level marker indicates the minimum, not maximum, ISA set
required to run such an ELF binary. We never guarantee a library with
an x86-64 ISA level v3 marker doesn't contain other ISAs beyond x86-64
ISA level v3, like AVX VNNI. We check the x86-64 ISA level marker for
the minimum ISA set. Since -march=sandybridge enables only some ISAs
in x86-64 ISA level v3, we should set the needed ISA marker to v2.
Otherwise, libc is compiled with -march=sandybridge will fail to run on
Sandy Bridge:
$ ./elf/ld.so ./libc.so
./libc.so: (p) CPU ISA level is lower than required: needed: 7; got: 3
Set the minimum, instead of maximum, x86-64 ISA level marker should have
no impact on the glibc-hwcaps directory assignment logic in ldconfig nor
ld.so.
Diffstat (limited to 'config.h.in')
-rw-r--r-- | config.h.in | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/config.h.in b/config.h.in index 06ee8ae26a..f21bf04e47 100644 --- a/config.h.in +++ b/config.h.in @@ -275,4 +275,10 @@ /* Define if x86 ISA level should be included in shared libraries. */ #undef INCLUDE_X86_ISA_LEVEL +/* Define if -msahf is enabled by default on x86. */ +#undef HAVE_X86_LAHF_SAHF + +/* Define if -mmovbe is enabled by default on x86. */ +#undef HAVE_X86_MOVBE + #endif |