aboutsummaryrefslogtreecommitdiff
path: root/configure.sh
diff options
context:
space:
mode:
Diffstat (limited to 'configure.sh')
-rwxr-xr-xconfigure.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/configure.sh b/configure.sh
index 76d02de..e12dc06 100755
--- a/configure.sh
+++ b/configure.sh
@@ -16,15 +16,18 @@ detectsan() {
16TYPE=${TYPE-"$detected"} 16TYPE=${TYPE-"$detected"}
17 17
18STD="-std=c99" 18STD="-std=c99"
19WFLAGS="-pedantic -Wall -Wextra -Wno-unused-parameter -Wno-unused-function" 19WFLAGS="-pedantic -Wall -Wextra"
20# -Wstringop-overflow seems to be causing problems when combined with -O3
21# Someone else complained here: https://access.redhat.com/solutions/6755371
22WNOFLAGS="-Wno-unused-parameter -Wno-unused-function -Wno-stringop-overflow"
20[ "$TYPE" = "AVX2" ] && AVX="-mavx2" 23[ "$TYPE" = "AVX2" ] && AVX="-mavx2"
21[ -n "$(detectsan address)" ] && ADDR="-fsanitize=address" 24[ -n "$(detectsan address)" ] && ADDR="-fsanitize=address"
22[ -n "$(detectsan undefined)" ] && UNDEF="-fsanitize=undefined" 25[ -n "$(detectsan undefined)" ] && UNDEF="-fsanitize=undefined"
23SAN="$ADDR $UNDEF" 26SAN="$ADDR $UNDEF"
24LIBS="-lpthread" 27LIBS="-lpthread"
25 28
26CFLAGS="$STD $LIBS $WFLAGS $AVX -O3" 29CFLAGS="$STD $LIBS $WFLAGS $WNOFLAGS $AVX -O3"
27DBGFLAGS="$STD $LIBS $WFLAGS $SAN $AVX -g3 -DDEBUG" 30DBGFLAGS="$STD $LIBS $WFLAGS $WNOFLAGS $SAN $AVX -g3 -DDEBUG"
28 31
29echo "Cube type: CUBE_$TYPE" 32echo "Cube type: CUBE_$TYPE"
30echo "Compiler: ${CC:-cc}" 33echo "Compiler: ${CC:-cc}"

Generated with cgit - Back to sebastiano.tronto.net