diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2017-01-04 21:51:06 -0500 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2017-01-04 22:01:55 -0500 |
commit | f5917c35bdfa6c297647f4ceb60b01793ad57f0a (patch) | |
tree | f9fa6ef2824a10b20879939774c51620d69569d5 /tools | |
parent | 7918c9411c01027b096c60c2e245c36591b0076b (diff) | |
download | roux-f5917c35bdfa6c297647f4ceb60b01793ad57f0a.tar.gz |
attempt to fix cc flags in tests
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/unit.sh | 11 |
1 files changed, 10 insertions, 1 deletions
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 |