Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
`test_cflags` uses $CC to test if a given flag is supported, so
we should use $CC instead of $GCC for the rest of the file.

Fixes #1128
  • Loading branch information
rui314 committed Oct 19, 2023
1 parent 728b265 commit 1a2baee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/elf/x86_64_endbr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
[ $MACHINE = x86_64 ] || skip
test_cflags -fcf-protection || skip

cat <<EOF | $GCC -o $t/a.o -c -xc - -ffunction-sections -O -fcf-protection
cat <<EOF | $CC -o $t/a.o -c -xc - -ffunction-sections -O -fcf-protection
int foo() { return 3; }
int bar() { return foo(); }
EOF

cat <<EOF | $GCC -o $t/b.o -c -xc - -ffunction-sections -O -fcf-protection
cat <<EOF | $CC -o $t/b.o -c -xc - -ffunction-sections -O -fcf-protection
int main() {}
EOF

Expand Down

0 comments on commit 1a2baee

Please sign in to comment.