mirror of
git://git.code.sf.net/p/sbcl/sbcl
synced 2026-09-10 07:26:40 -04:00
Don't build sb-simd if the host doesn't support AVX2.
This commit is contained in:
parent
286a16d6d4
commit
9bf8ab85e6
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
4
tools-for-build/avx2.c
Normal file
4
tools-for-build/avx2.c
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
int main () {
|
||||
__builtin_cpu_init();
|
||||
return __builtin_cpu_supports("avx2") != 0;
|
||||
}
|
||||
Loading…
Reference in a new issue