X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=make-config.sh;h=62f08b44cc5bd2af21b5777ea839330aca2c2f8d;hb=171fde84561e232b8af8c05b82dfe8a8f9e08340;hp=7b03394e4a76002963d9f8677c2fcd3ffa519163;hpb=89a02d3ba803a1d85d745e22b4ac05ef8cb12370;p=sbcl.git diff --git a/make-config.sh b/make-config.sh index 7b03394..62f08b4 100644 --- a/make-config.sh +++ b/make-config.sh @@ -45,6 +45,7 @@ bad_option() { WITH_FEATURES="" WITHOUT_FEATURES="" +fancy=false some_options=false for option do @@ -88,6 +89,11 @@ do --without) WITHOUT_FEATURES="$WITHOUT_FEATURES :$optarg" ;; + --fancy) + WITH_FEATURES="$WITH_FEATURES :sb-core-compression :sb-xref-for-internals :sb-after-xc-core" + # Lower down we add :sb-thread for platforms where it can be built. + fancy=true + ;; -*) bad_option "Unknown command-line option to $0: \"$option\"" ;; @@ -111,6 +117,7 @@ then # customize-target-features.lisp... echo "ERROR: Both customize-target-features.lisp, and feature-options" echo "to make.sh present -- cannot use both at the same time." + exit 1 fi # Previously XC host was provided as a positional argument. @@ -308,14 +315,6 @@ echo //entering make-config.sh echo //ensuring the existence of output/ directory if [ ! -d output ] ; then mkdir output; fi -ltf=`pwd`/local-target-features.lisp-expr -echo //initializing $ltf -echo ';;;; This is a machine-generated file.' > $ltf -echo ';;;; Please do not edit it by hand.' >> $ltf -echo ';;;; See make-config.sh.' >> $ltf -echo "((lambda (features) (set-difference features (list$WITHOUT_FEATURES)))" >> $ltf -printf " (union (list$WITH_FEATURES) (list " >> $ltf - echo //guessing default target CPU architecture from host architecture case `uname -m` in *86) guessed_sbcl_arch=x86 ;; @@ -350,16 +349,42 @@ if [ "$sbcl_os" = "darwin" ] && [ "`/usr/sbin/sysctl -n hw.optional.x86_64`" = " fi echo //setting up CPU-architecture-dependent information +if test -n "$SBCL_ARCH" +then + # Normalize it. + SBCL_ARCH=`echo $SBCL_ARCH | tr '[A-Z]' '[a-z]' | tr _ -` +fi sbcl_arch=${SBCL_ARCH:-$guessed_sbcl_arch} echo sbcl_arch=\"$sbcl_arch\" if [ "$sbcl_arch" = "" ] ; then echo "can't guess target SBCL architecture, please specify --arch=" exit 1 fi +if $fancy +then + # If --fancy, enable threads on platforms where they can be built. + case $sbcl_arch in + x86|x86-64|ppc) + WITH_FEATURES="$WITH_FEATURES :sb-thread" + echo "Enabling threads due to --fancy." + ;; + *) + echo "No threads on this platform." + ;; + esac +fi + +ltf=`pwd`/local-target-features.lisp-expr +echo //initializing $ltf +echo ';;;; This is a machine-generated file.' > $ltf +echo ';;;; Please do not edit it by hand.' >> $ltf +echo ';;;; See make-config.sh.' >> $ltf +echo "((lambda (features) (set-difference features (list$WITHOUT_FEATURES)))" >> $ltf +printf " (union (list$WITH_FEATURES) (list " >> $ltf + 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`