X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=configure;h=673d2913572b149f1d196e2d3c9c667c96043aea;hb=522a0de2101abd12b19a4d2ba5c09abbb7c5fc79;hp=30f409fdfbe4776a8e4041ac96f1972ef92f4e20;hpb=9ca4dae5d895cf816eb1815511aba77a90f6acd7;p=musl diff --git a/configure b/configure index 30f409fd..673d2913 100755 --- a/configure +++ b/configure @@ -123,7 +123,7 @@ target= optimize=auto debug=no warnings=no -shared=yes +shared=auto static=yes wrapper=auto @@ -250,6 +250,7 @@ x86_64-x32*|x32*|x86_64*x32) ARCH=x32 ;; x86_64*) ARCH=x86_64 ;; mips*) ARCH=mips ;; microblaze*) ARCH=microblaze ;; +or1k*) ARCH=or1k ;; powerpc*) ARCH=powerpc ;; sh[1-9bel-]*|sh|superh*) ARCH=sh ;; unknown) fail "$0: unable to detect target arch; try $0 --target=..." ;; @@ -298,12 +299,9 @@ fi tryflag CFLAGS_MEMOPS -fno-tree-loop-distribute-patterns # -# If debugging is explicitly enabled, don't auto-enable optimizations +# Enable debugging if requessted. # -if test "$debug" = yes ; then -CFLAGS_AUTO=-g -test "$optimize" = auto && optimize=no -fi +test "$debug" = yes && CFLAGS_AUTO=-g # # Possibly add a -O option to CFLAGS and select modules to optimize with @@ -412,12 +410,15 @@ fi tryflag CFLAGS_AUTO -fno-stack-protector tryldflag LDFLAGS_AUTO -Wl,--hash-style=both +test "$shared" = "no" || { # Disable dynamic linking if ld is broken and can't do -Bsymbolic-functions LDFLAGS_DUMMY= tryldflag LDFLAGS_DUMMY -Wl,-Bsymbolic-functions || { +test "$shared" = "yes" && fail "$0: error: linker cannot build shared library" printf "warning: disabling dynamic linking support\n" shared=no } +} # Find compiler runtime library test -z "$LIBCC" && tryldflag LIBCC -lgcc && tryldflag LIBCC -lgcc_eh @@ -495,27 +496,6 @@ printf "no\n" fail "$0: error: unsupported long double type" fi -# -# Check for known bug in GCC 4.9.0 that results in a broken libc. -# -if test "$cc_is_gcc" = yes ; then -printf "checking for gcc constant folding bug with weak aliases... " -echo 'static int x = 0;' > "$tmpc" -echo 'extern int y __attribute__((__weak__, __alias__("x")));' >> "$tmpc" -echo 'extern int should_appear;' >> "$tmpc" -echo 'int foo() { return y ? should_appear : 0; }' >> "$tmpc" -case "$($CC $CFLAGS_C99FSE -I./arch/$ARCH -I./include \ - $CPPFLAGS $CFLAGS_AUTO $CFLAGS -S -o - "$tmpc" 2>/dev/null)" in -*should_appear*) -printf "no\n" -;; -*) -printf "yes\n" -fail "$0: error: broken compiler; try CFLAGS=-fno-toplevel-reorder" -;; -esac -fi - printf "creating config.mak... " cmdline=$(quote "$0") @@ -538,7 +518,7 @@ libdir = $libdir includedir = $includedir syslibdir = $syslibdir CC = $CC -CFLAGS= $CFLAGS_AUTO $CFLAGS +CFLAGS = $CFLAGS_AUTO $CFLAGS CFLAGS_C99FSE = $CFLAGS_C99FSE CFLAGS_MEMOPS = $CFLAGS_MEMOPS CPPFLAGS = $CPPFLAGS