aboutsummaryrefslogtreecommitdiff
path: root/configure.sh
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2023-11-19 11:19:14 +0100
committerSebastiano Tronto <sebastiano@tronto.net>2023-11-19 11:19:14 +0100
commita9ce50120b68db3669aaadeac348db8926bc15c4 (patch)
tree33cd118de37634970503553197370776564bce10 /configure.sh
parentc5fb4d1c0f0ecc30673a46e517dc82c5af2af5ef (diff)
downloadnissy-core-a9ce50120b68db3669aaadeac348db8926bc15c4.tar.gz
nissy-core-a9ce50120b68db3669aaadeac348db8926bc15c4.zip
Improved architecture detection
Diffstat (limited to '')
-rwxr-xr-xconfigure.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/configure.sh b/configure.sh
index 9a790ca..b9779c2 100755
--- a/configure.sh
+++ b/configure.sh
@@ -1,8 +1,13 @@
1#!/bin/sh 1#!/bin/sh
2 2
3cc -mavx2 utils/detect-immintrin.c && detected="AVX2" && rm a.out 3detect() { cc -march=native -dM -E - < /dev/null | grep "$1"; }
4
5[ -n "$(detect __AVX2__)" ] && detected="AVX2"
6
4TYPE=${TYPE-"$detected"} 7TYPE=${TYPE-"$detected"}
5 8
9echo "Using CUBE_$TYPE"
10
6STD="-std=c99" 11STD="-std=c99"
7WFLAGS="-pedantic -Wall -Wextra -Wno-unused-parameter -Wno-unused-function" 12WFLAGS="-pedantic -Wall -Wextra -Wno-unused-parameter -Wno-unused-function"
8[ "$TYPE" = "AVX2" ] && AVX="-mavx2" 13[ "$TYPE" = "AVX2" ] && AVX="-mavx2"

Generated with cgit - Back to sebastiano.tronto.net