X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=configure;h=b1cf998003cf7944215abca02e462c083bc19511;hb=76f2bcc7d673d0a1b06ea4b2545b4096979ad518;hp=30f409fdfbe4776a8e4041ac96f1972ef92f4e20;hpb=9ca4dae5d895cf816eb1815511aba77a90f6acd7;p=musl diff --git a/configure b/configure index 30f409fd..b1cf9980 100755 --- a/configure +++ b/configure @@ -123,7 +123,7 @@ target= optimize=auto debug=no warnings=no -shared=yes +shared=auto static=yes wrapper=auto @@ -298,12 +298,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 +409,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 @@ -538,7 +538,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