diff --git a/.gitignore b/.gitignore index 9332c1488..e654f0206 100644 --- a/.gitignore +++ b/.gitignore @@ -40,6 +40,7 @@ tests/*.so tests/run-tests-* tests/last-random-state.lisp-expr tests/ansi-test/ +tools-for-build/avx2* tools-for-build/determine-endianness tools-for-build/determine-endianness.exe tools-for-build/grovel-headers diff --git a/make-config.sh b/make-config.sh index 836056715..3915c16e6 100755 --- a/make-config.sh +++ b/make-config.sh @@ -45,8 +45,6 @@ for dir in `cd contrib ; echo *`; do done SBCL_CONTRIB_BLOCKLIST=${SBCL_CONTRIB_BLOCKLIST:-""} -echo $SBCL_CONTRIB_BLOCKLIST - perform_host_lisp_check=no fancy=false some_options=false @@ -498,8 +496,6 @@ case "$sbcl_arch" in x86-64) ;; *) SBCL_CONTRIB_BLOCKLIST="$SBCL_CONTRIB_BLOCKLIST sb-simd" ;; esac -echo "SBCL_CONTRIB_BLOCKLIST=\"$SBCL_CONTRIB_BLOCKLIST\"; export SBCL_CONTRIB_BLOCKLIST" >> output/build-config - echo //setting up OS-dependent information original_dir=`pwd` @@ -658,6 +654,12 @@ case "$sbcl_arch" in ;; x86-64) printf ' :sb-simd-pack :sb-simd-pack-256 :avx2' >> $ltf # not mandatory + + $GNUMAKE -C tools-for-build avx2 + if tools-for-build/avx2; then + SBCL_CONTRIB_BLOCKLIST="$SBCL_CONTRIB_BLOCKLIST sb-simd" + fi + case "$sbcl_os" in linux | darwin | *bsd) printf ' :immobile-space' >> $ltf @@ -709,6 +711,8 @@ echo //finishing $ltf printf " %s" "`cat crossbuild-runner/backends/${sbcl_arch}/features`" >> $ltf echo ")) (list$WITHOUT_FEATURES)))" >> $ltf +echo "SBCL_CONTRIB_BLOCKLIST=\"$SBCL_CONTRIB_BLOCKLIST\"; export SBCL_CONTRIB_BLOCKLIST" >> output/build-config + # FIXME: The version system should probably be redone along these lines: # # echo //setting up version information. diff --git a/tools-for-build/avx2.c b/tools-for-build/avx2.c new file mode 100644 index 000000000..b16956fb2 --- /dev/null +++ b/tools-for-build/avx2.c @@ -0,0 +1,4 @@ +int main () { + __builtin_cpu_init(); + return __builtin_cpu_supports("avx2") != 0; +}