From f5917c35bdfa6c297647f4ceb60b01793ad57f0a Mon Sep 17 00:00:00 2001 From: Quentin Carbonneaux Date: Wed, 4 Jan 2017 21:51:06 -0500 Subject: attempt to fix cc flags in tests --- tools/unit.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/unit.sh b/tools/unit.sh index ded1b29..ace28fb 100755 --- a/tools/unit.sh +++ b/tools/unit.sh @@ -59,7 +59,7 @@ once() { LNK="$ASM" fi - if ! cc -no-pie -g -o $BIN $LNK + if ! cc $PIE -g -o $BIN $LNK then echo "[cc fail]" return 1 @@ -94,6 +94,15 @@ then exit 1 fi +for wtf in -nopie -no-pie +do + if echo "int main() { return 0; }" | + cc $wtf -x c -o /dev/null - >/dev/null 2>&1 + then + PIE=$wtf + fi +done + case $1 in "all") F=0 -- cgit 1.4.1