X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=configure;h=f940af9acc9c22146a6ca34e9cb4fa34e3e077ec;hb=5ce3737931bb411a8d167356d4d0287b53b0cbdc;hp=af8b45f0b11ea0056849e2ac8e7dc2fa5631470e;hpb=c0ede9e4046a0882d83ae4b45c7dfac86fb7c15d;p=musl diff --git a/configure b/configure index af8b45f0..f940af9a 100755 --- a/configure +++ b/configure @@ -31,7 +31,7 @@ Optional features: --enable-optimize=... optimize listed components for speed over size [auto] --enable-debug build with debugging information [disabled] --enable-warnings build with recommended warnings flags [disabled] - --enable-visibility use global visibility options to optimize PIC [auto] + --enable-visibility use global visibility options to optimize PIC [no] --enable-wrapper=... build given musl toolchain wrapper [auto] --disable-shared inhibit building shared library [enabled] --disable-static inhibit building static library [enabled] @@ -135,7 +135,7 @@ target= optimize=auto debug=no warnings=no -visibility=auto +visibility=no shared=auto static=yes wrapper=auto @@ -163,6 +163,7 @@ case "$arg" in --disable-debug|--enable-debug=no) debug=no ;; --enable-warnings|--enable-warnings=yes) warnings=yes ;; --disable-warnings|--enable-warnings=no) warnings=no ;; +--enable-visibility=auto) visibility=auto ;; --enable-visibility|--enable-visibility=yes) visibility=yes ;; --disable-visibility|--enable-visibility=no) visibility=no ;; --enable-wrapper|--enable-wrapper=yes) wrapper=detect ;; @@ -249,6 +250,7 @@ fi # tryflag CFLAGS_TRY -Werror=unknown-warning-option tryflag CFLAGS_TRY -Werror=unused-command-line-argument +tryflag CFLAGS_TRY -Werror=ignored-optimization-argument tryldflag LDFLAGS_TRY -Werror=unknown-warning-option tryldflag LDFLAGS_TRY -Werror=unused-command-line-argument @@ -318,13 +320,15 @@ i?86*) ARCH=i386 ;; x86_64-x32*|x32*|x86_64*x32) ARCH=x32 ;; x86_64-nt64*) ARCH=nt64 ;; x86_64*) ARCH=x86_64 ;; -mips64*) ARCH=mips64 ;; +m68k*) ARCH=m68k ;; +mips64*|mipsisa64*) ARCH=mips64 ;; mips*) ARCH=mips ;; microblaze*) ARCH=microblaze ;; or1k*) ARCH=or1k ;; powerpc64*) ARCH=powerpc64 ;; powerpc*) ARCH=powerpc ;; sh[1-9bel-]*|sh|superh*) ARCH=sh ;; +s390x*) ARCH=s390x ;; unknown) fail "$0: unable to detect target arch; try $0 --target=..." ;; *) fail "$0: unknown or unsupported target \"$target\"" ;; esac @@ -503,6 +507,13 @@ tryflag CFLAGS_AUTO -Werror=implicit-int tryflag CFLAGS_AUTO -Werror=pointer-sign tryflag CFLAGS_AUTO -Werror=pointer-arith +# +# GCC ignores unused arguements by default, but Clang needs this extra +# parameter to stop printing warnings about LDFLAGS passed during +# compiling stage and CFLAGS passed during linking stage. +# +tryflag CFLAGS_AUTO -Qunused-arguments + if test "x$warnings" = xyes ; then tryflag CFLAGS_AUTO -Wall tryflag CFLAGS_AUTO -Wno-parentheses @@ -580,14 +591,18 @@ tryldflag LDFLAGS_AUTO -Wl,--no-undefined # versions built without shared library support and pcc are broken. tryldflag LDFLAGS_AUTO -Wl,--exclude-libs=ALL -# Linking with -Bsymbolic-functions is no longer mandatory for -# the dynamic linker to work, but enable it if it works as -# a linking optimization. -tryldflag LDFLAGS_AUTO -Wl,-Bsymbolic-functions +# Public data symbols must be interposable to allow for copy +# relocations, but otherwise we want to bind symbols at libc link +# time to eliminate startup relocations and PLT overhead. Use +# --dynamic-list rather than -Bsymbolic-functions for greater +# control over what symbols are left unbound. +tryldflag LDFLAGS_AUTO -Wl,--dynamic-list="$srcdir/dynamic.list" # Find compiler runtime library test -z "$LIBCC" && tryldflag LIBCC -lgcc && tryldflag LIBCC -lgcc_eh test -z "$LIBCC" && tryldflag LIBCC -lcompiler_rt +test -z "$LIBCC" && try_libcc=`$CC -print-libgcc-file-name 2>/dev/null` \ + && tryldflag LIBCC "$try_libcc" test -z "$LIBCC" && try_libcc=`$CC -print-file-name=libpcc.a 2>/dev/null` \ && tryldflag LIBCC "$try_libcc" printf "using compiler runtime libraries: %s\n" "$LIBCC" @@ -601,6 +616,10 @@ trycppif __ILP32__ "$t" && ARCH=x32 fi if test "$ARCH" = "arm" ; then +if trycppif __thumb2__ "$t" ; then +tryflag CFLAGS_AUTO -Wa,-mimplicit-it=always +tryflag CFLAGS_AUTO -Wa,-mthumb +fi trycppif __ARMEB__ "$t" && SUBARCH=${SUBARCH}eb trycppif __ARM_PCS_VFP "$t" && SUBARCH=${SUBARCH}hf # Versions of clang up until at least 3.8 have the wrong constraint codes @@ -623,6 +642,13 @@ if test "$ARCH" = "aarch64" ; then trycppif __AARCH64EB__ "$t" && SUBARCH=${SUBARCH}_be fi +if test "$ARCH" = "m68k" ; then +if trycppif "__HAVE_68881__" ; then : ; +elif trycppif "__mcffpu__" ; then SUBARCH="-fp64" +else SUBARCH="-sf" +fi +fi + if test "$ARCH" = "mips" ; then trycppif "__mips_isa_rev >= 6" "$t" && SUBARCH=${SUBARCH}r6 trycppif "_MIPSEL || __MIPSEL || __MIPSEL__" "$t" && SUBARCH=${SUBARCH}el @@ -692,9 +718,8 @@ esac # printf "checking whether compiler's long double definition matches float.h... " echo '#include ' > "$tmpc" -echo '#if LDBL_MANT_DIG == 53' >> "$tmpc" -echo 'typedef char ldcheck[9-(int)sizeof(long double)];' >> "$tmpc" -echo '#endif' >> "$tmpc" +echo '#define C(m,s) (m==LDBL_MANT_DIG && s==sizeof(long double))' >> "$tmpc" +echo 'typedef char ldcheck[(C(53,8)||C(64,12)||C(64,16)||C(113,16))*2-1];' >> "$tmpc" if $CC $CFLAGS_C99FSE \ -I$srcdir/arch/$ARCH -I$srcdir/arch/generic -I$srcdir/include \ $CPPFLAGS $CFLAGS -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then