Skip to content

Commit

Permalink
Fix arch-x86_64-ifunc-alias test on RHEL 10
Browse files Browse the repository at this point in the history
On RHEL 10, GCC is configured with the `--with-arch_64=x86-64-v3`
option, which makes it implicitly use the `-march=x86-64-v3`
command-line flag by default.

This breaks the `arch-x86_64-ifunc-alias` test: since the `x86-64-v3`
microarchitecture level includes SSSE3 and AVX2, GCC appears to
interpret the `default` and `ssse3,avx2` targets as the same thing, and
omits generating a resolver function.

Fix the test by forcing GCC's target architecture to the `x86-64`
baseline.
  • Loading branch information
sicherha committed Dec 28, 2024
1 parent 938f145 commit 0c06bef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/arch-x86_64-ifunc-alias.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
supports_ifunc || skip
test_cflags -static || skip

cat <<EOF | $CXX -o $t/a.o -c -xc++ - -fno-PIE
cat <<EOF | $CXX -march=x86-64 -o $t/a.o -c -xc++ - -fno-PIE
#include <assert.h>
#include <stdio.h>
Expand Down

0 comments on commit 0c06bef

Please sign in to comment.