X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=make-config.sh;h=9cbfa0d1639d465c6fb1171c7ee7bd8c549e9830;hb=371577a214ce2659c271279ad48e4c42e1c0c93e;hp=468c79f3cfbcde667e38c31b34d92fcb54931359;hpb=a157ed0be79751f85b8243c06102eea95af06aa3;p=sbcl.git diff --git a/make-config.sh b/make-config.sh index 468c79f..9cbfa0d 100644 --- a/make-config.sh +++ b/make-config.sh @@ -128,6 +128,11 @@ if [ "$sbcl_os" = "sunos" ] && [ `isainfo -k` = "amd64" ]; then guessed_sbcl_arch=x86-64 fi +# Under Darwin, uname -m returns "i386" even if CPU is x86_64. +if [ "$sbcl_os" = "darwin" ] && [ "`/usr/sbin/sysctl -n hw.optional.x86_64`" = "1" ]; then + guessed_sbcl_arch=x86-64 +fi + echo //setting up CPU-architecture-dependent information sbcl_arch=${SBCL_ARCH:-$guessed_sbcl_arch} echo sbcl_arch=\"$sbcl_arch\" @@ -138,6 +143,17 @@ fi printf ":%s" "$sbcl_arch" >> $ltf echo //setting up OS-dependent information + +# Under Darwin x86-64, guess whether Darwin 9+ or below. +if [ "$sbcl_os" = "darwin" ] && [ "$sbcl_arch" = "x86-64" ]; then + darwin_version=`uname -r` + darwin_version_major=${DARWIN_VERSION_MAJOR:-${darwin_version%%.*}} + if (( 8 < $darwin_version_major )); then + ver9_or_above="9+" + printf ' :inode64' >> $ltf + fi +fi + original_dir=`pwd` cd ./src/runtime/ rm -f Config target-arch-os.h target-arch.h target-os.h target-lispregs.h @@ -155,9 +171,12 @@ case "$sbcl_os" in # If you add other platforms here, don't forget to edit # src/runtime/Config.foo-linux too. case "$sbcl_arch" in - x86 | mips) - printf ' :largefile' >> $ltf - ;; + mips) + printf ' :largefile' >> $ltf + ;; + x86 | x86-64) + printf ' :sb-thread :largefile' >> $ltf + ;; esac if [ $sbcl_arch = "x86-64" ]; then @@ -221,14 +240,14 @@ case "$sbcl_os" in printf ' :bsd' >> $ltf printf ' :darwin' >> $ltf if [ $sbcl_arch = "x86" ]; then - printf ' :mach-exception-handler :sb-lutex :restore-fs-segment-register-from-tls' >> $ltf + printf ' :mach-exception-handler :sb-lutex :restore-fs-segment-register-from-tls :ud2-breakpoints' >> $ltf fi if [ $sbcl_arch = "x86-64" ]; then - printf ' :mach-exception-handler :sb-lutex' >> $ltf + printf ' :mach-exception-handler :sb-lutex :ud2-breakpoints' >> $ltf fi link_or_copy $sbcl_arch-darwin-os.h target-arch-os.h link_or_copy bsd-os.h target-os.h - link_or_copy Config.$sbcl_arch-darwin Config + link_or_copy Config.$sbcl_arch-darwin$ver9_or_above Config ;; sunos) printf ' :unix' >> $ltf @@ -281,7 +300,7 @@ if [ "$sbcl_arch" = "x86" ]; then printf ' :compare-and-swap-vops :unwind-to-frame-and-call-vop :raw-instance-init-vops' >> $ltf printf ' :stack-allocatable-closures :stack-allocatable-vectors' >> $ltf printf ' :stack-allocatable-lists :stack-allocatable-fixed-objects' >> $ltf - printf ' :alien-callbacks :cycle-counter' >> $ltf + printf ' :alien-callbacks :cycle-counter :inline-constants ' >> $ltf case "$sbcl_os" in linux | freebsd | netbsd | openbsd | sunos | darwin | win32) printf ' :linkage-table' >> $ltf @@ -297,6 +316,7 @@ elif [ "$sbcl_arch" = "x86-64" ]; then printf ' :stack-allocatable-closures :stack-allocatable-vectors' >> $ltf printf ' :stack-allocatable-lists :stack-allocatable-fixed-objects' >> $ltf printf ' :alien-callbacks :cycle-counter :complex-float-vops' >> $ltf + printf ' :float-eql-vops :inline-constants ' >> $ltf elif [ "$sbcl_arch" = "mips" ]; then printf ' :linkage-table' >> $ltf printf ' :stack-allocatable-closures :stack-allocatable-vectors' >> $ltf @@ -309,7 +329,7 @@ elif [ "$sbcl_arch" = "mips" ]; then $GNUMAKE -C tools-for-build determine-endianness -I ../src/runtime tools-for-build/determine-endianness >> $ltf elif [ "$sbcl_arch" = "ppc" ]; then - printf ' :gencgc :stack-allocatable-closures :stacka-allocatable-lists' >> $ltf + printf ' :gencgc :stack-allocatable-closures :stack-allocatable-lists' >> $ltf printf ' :linkage-table' >> $ltf if [ "$sbcl_os" = "linux" ]; then # Use a C program to detect which kind of glibc we're building on,