X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=configure;h=8680128113aa868c56e23d7c8dab7c61f7891098;hb=484c34fe1db184ff761db7866a8e667e093b2307;hp=6e489a1dfe747767b5989c87ce0caab7348877d8;hpb=5e46e8d4b0fee11a5d2ea12d0d21ed0bff6db855;p=musl diff --git a/configure b/configure index 6e489a1d..86801281 100755 --- a/configure +++ b/configure @@ -172,6 +172,8 @@ case "$arg" in --host=*|--target=*) target=${arg#*=} ;; --build=*) build=${arg#*=} ;; -* ) echo "$0: unknown option $arg" ;; +AR=*) AR=${arg#*=} ;; +RANLIB=*) RANLIB=${arg#*=} ;; CC=*) CC=${arg#*=} ;; CFLAGS=*) CFLAGS=${arg#*=} ;; CPPFLAGS=*) CPPFLAGS=${arg#*=} ;; @@ -320,8 +322,9 @@ mips64*|mipsisa64*) ARCH=mips64 ;; mips*) ARCH=mips ;; microblaze*) ARCH=microblaze ;; or1k*) ARCH=or1k ;; -powerpc64*) ARCH=powerpc64 ;; -powerpc*) ARCH=powerpc ;; +powerpc64*|ppc64*) ARCH=powerpc64 ;; +powerpc*|ppc*) ARCH=powerpc ;; +riscv64*) ARCH=riscv64 ;; sh[1-9bel-]*|sh|superh*) ARCH=sh ;; s390x*) ARCH=s390x ;; unknown) fail "$0: unable to detect target arch; try $0 --target=..." ;; @@ -507,7 +510,7 @@ tryflag CFLAGS_AUTO -Werror=pointer-arith # parameter to stop printing warnings about LDFLAGS passed during # compiling stage and CFLAGS passed during linking stage. # -tryflag CFLAGS_AUTO -Qunused-arguments +test "$cc_family" = clang && tryflag CFLAGS_AUTO -Qunused-arguments if test "x$warnings" = xyes ; then tryflag CFLAGS_AUTO -Wall @@ -573,12 +576,27 @@ printf "using compiler runtime libraries: %s\n" "$LIBCC" SUBARCH= t="$CFLAGS_C99FSE $CPPFLAGS $CFLAGS" +if test "$ARCH" = "i386" ; then +printf "checking whether compiler can use ebx in PIC asm constraints... " +cat > "$tmpc" </dev/null 2>&1 ; then +printf "yes\n" +else +printf "no\n" +CFLAGS_AUTO="$CFLAGS_AUTO -DBROKEN_EBX_ASM" +fi +fi + if test "$ARCH" = "x86_64" ; then trycppif __ILP32__ "$t" && ARCH=x32 fi if test "$ARCH" = "arm" ; then if trycppif __thumb2__ "$t" ; then +tryflag CFLAGS_AUTO -mimplicit-it=always tryflag CFLAGS_AUTO -Wa,-mimplicit-it=always tryflag CFLAGS_AUTO -Wa,-mthumb fi @@ -639,6 +657,11 @@ trycppif __LITTLE_ENDIAN__ "$t" && SUBARCH=${SUBARCH}le trycppif _SOFT_FLOAT "$t" && fail "$0: error: soft-float not supported on powerpc64" fi +if test "$ARCH" = "riscv64" ; then +trycppif __riscv_float_abi_soft "$t" && SUBARCH=${SUBARCH}-sf +trycppif __riscv_float_abi_single "$t" && SUBARCH=${SUBARCH}-sp +fi + if test "$ARCH" = "sh" ; then tryflag CFLAGS_AUTO -Wa,--isa=any trycppif __BIG_ENDIAN__ "$t" && SUBARCH=${SUBARCH}eb @@ -713,6 +736,8 @@ cat << EOF # This version of config.mak was generated by: # $cmdline # Any changes made here will be lost if configure is re-run +AR = ${AR:-\$(CROSS_COMPILE)ar} +RANLIB = ${RANLIB:-\$(CROSS_COMPILE)ranlib} ARCH = $ARCH SUBARCH = $SUBARCH ASMSUBARCH = $ASMSUBARCH