Shibotto Apprentice
Joined: 19 Jun 2015 Posts: 156 Location: CET/CEST
|
Posted: Mon Apr 01, 2024 7:37 pm Post subject: x86 ISA needed |
|
|
When I compile C code, I get the following binary:
Code: | $ gcc -march=x86-64 hello.c -o hello ; readelf -n hello
Displaying notes found in: .note.gnu.property
Owner Data size Description
GNU 0x00000040 NT_GNU_PROPERTY_TYPE_0
Properties: x86 feature: IBT, SHSTK
x86 ISA needed: x86-64-baseline, x86-64-v2, x86-64-v3
x86 feature used: x86
x86 ISA used:
Displaying notes found in: .note.ABI-tag
Owner Data size Description
GNU 0x00000010 NT_GNU_ABI_TAG (ABI version tag)
OS: Linux, ABI: 3.2.0 |
The problem is that even if I specify -march=x86-64, that "x86 ISA needed" line makes the executable require x86-64-v3 instruction set. This is not an issue on the machine that compiled it, but if I move the binary to a x86-64-v2 one of course I get:
Code: | $ ./hello
./hello: CPU ISA level is lower than required |
I noticed that the problem started when "libc_cv_include_x86_isa_level=no" was removed from the glibc ebuild. Can someone help me figure out why this happens? I don't really feel like forking the glibc ebuild locally and add that config option back.
EDIT: Worked around for now by setting it in EXTRA_ECONF for glibc. |
|