1
1
mirror of https://github.com/rui314/mold.git synced 2024-10-04 16:48:04 +03:00

Fix test case being skipped unconditionally

The precondition check was supposed to find out whether the compiler
supports `-fcfprotection`, but it always failed complaining about an
undefined reference to `main()`. As a consequence, the test case was
never executed.

Add `-c` to omit the link step in the compiler call.

Signed-off-by: Christoph Erhardt <github@sicherha.de>
This commit is contained in:
Christoph Erhardt 2022-08-16 15:44:34 +02:00
parent 6b27a7e9b3
commit 9666041de7

View File

@ -15,7 +15,7 @@ mkdir -p $t
# Skip if target is not x86-64
[ $MACHINE = x86_64 ] || { echo skipped; exit; }
$CC -fcf-protection=branch /dev/null -o /dev/null -xc 2> /dev/null || \
$CC -fcf-protection=branch -c /dev/null -o /dev/null -xc 2> /dev/null || \
{ echo skipped; exit; }
cat <<EOF | $CC -fcf-protection=branch -c -o $t/a.o -xc -