X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=configure;h=e80fdfb3f690cd94d2204befdd0925c81bf33870;hb=5fc1487832e16aa2119e735a388d5f36c8c139e2;hp=5d956723cead5e0f86d06e6f7c5cebae153a33cc;hpb=8945667fadc2eb71b7924bb4c5a69507fd362f4a;p=musl diff --git a/configure b/configure index 5d956723..e80fdfb3 100755 --- a/configure +++ b/configure @@ -123,8 +123,9 @@ target= optimize=auto debug=no warnings=no -shared=yes +shared=auto static=yes +wrapper=auto for arg ; do case "$arg" in @@ -199,23 +200,33 @@ exit 1 fi # -# Only build musl-gcc wrapper if toolchain does not already target musl +# Need to know if the compiler is gcc to decide whether to build the +# musl-gcc wrapper, and for critical bug detection in some gcc versions. # -if test -z "$wrapper" ; then printf "checking whether compiler is gcc... " -if fnmatch '*gcc\ version*' "$($CC -v 2>&1)" ; then -echo yes +if fnmatch '*gcc\ version*' "$(LC_ALL=C $CC -v 2>&1)" ; then +cc_is_gcc=yes +else +cc_is_gcc=no +fi +echo "$cc_is_gcc" + +# +# Only build musl-gcc wrapper if toolchain does not already target musl +# +if test "$wrapper" = auto ; then printf "checking whether to build musl-gcc wrapper... " +if test "$cc_is_gcc" = yes ; then wrapper=yes while read line ; do case "$line" in */ld-musl-*) wrapper=no ;; esac done <