aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure.sh17
1 files changed, 5 insertions, 12 deletions
diff --git a/configure.sh b/configure.sh
index e61a163..2b2f40b 100755
--- a/configure.sh
+++ b/configure.sh
@@ -22,10 +22,10 @@
22# SANITIZE="option1,option2,..." 22# SANITIZE="option1,option2,..."
23# Add the options "-fsanitize=option1", "-fsanitize=option2", ... to the 23# Add the options "-fsanitize=option1", "-fsanitize=option2", ... to the
24# compilation command when compiling in debug mode. 24# compilation command when compiling in debug mode.
25# By default, "-fsanitize=address" and "-fsanitize=undefined" will be used, 25# By default, "-fsanitize=address" and "-fsanitize=undefined" will be used.
26# if available. If this variable is set, the default is overridden. 26# If this variable is set, the default is overridden. No check is performed
27# No check is performed on the given sanitizers, make sure that the ones you 27# on the availability of any sanitizer used, make sure the ones you use are
28# choose are available on your system and compatible with each other. 28# available on your system.
29# 29#
30# Examples 30# Examples
31# 31#
@@ -39,10 +39,6 @@ greparch() {
39 $CC -march=native -dM -E - </dev/null 2>/dev/null | grep "$1" 39 $CC -march=native -dM -E - </dev/null 2>/dev/null | grep "$1"
40} 40}
41 41
42grepsan() {
43 $CC -fsanitize="$1" -dM -E -x c - </dev/null 2>/dev/null | grep "SANITIZE"
44}
45
46detectthreads() { 42detectthreads() {
47 echo 16 # TODO: choose based on system 43 echo 16 # TODO: choose based on system
48} 44}
@@ -100,10 +96,7 @@ if [ -n "$SANITIZE" ]; then
100 SAN="$SAN -fsanitize=$san" 96 SAN="$SAN -fsanitize=$san"
101 done 97 done
102else 98else
103 # No sanitizer specified, use "address" and "undefined" if present 99 SAN="-fsanitize=address -fsanitize=undefined"
104 [ -n "$(grepsan address)" ] && ADDR="-fsanitize=address"
105 [ -n "$(grepsan undefined)" ] && UNDEF="-fsanitize=undefined"
106 SAN="$ADDR $UNDEF"
107fi 100fi
108LIBS="-lpthread" 101LIBS="-lpthread"
109 102

Generated with cgit - Back to sebastiano.tronto.net