aboutsummaryrefslogtreecommitdiff
path: root/configure.sh
diff options
context:
space:
mode:
Diffstat (limited to 'configure.sh')
-rwxr-xr-xconfigure.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/configure.sh b/configure.sh
index 60e375a..d5586db 100755
--- a/configure.sh
+++ b/configure.sh
@@ -2,8 +2,13 @@
2 2
3cc=${CC:-cc} 3cc=${CC:-cc}
4 4
5detectarch() { ${cc} -march=native -dM -E - </dev/null | grep "$1"; } 5detectarch() {
6detectsan() { ${cc} -fsanitize=$1 -dM -E -x c - </dev/null | grep "SANITIZE"; } 6 ${cc} -march=native -dM -E - </dev/null 2>/dev/null | grep "$1"
7}
8detectsan() {
9 ${cc} -fsanitize=$1 -dM -E -x c - </dev/null 2>/dev/null \
10 | grep "SANITIZE"
11}
7 12
8[ -n "$(detectarch __AVX2__)" ] && detected="AVX2" 13[ -n "$(detectarch __AVX2__)" ] && detected="AVX2"
9[ -n "$(detectarch __ARM_NEON)" ] && detected="NEON" 14[ -n "$(detectarch __ARM_NEON)" ] && detected="NEON"

Generated with cgit - Back to sebastiano.tronto.net