X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=configure;h=e3d97c2c9ba1f578a9b1a3b827e6b3d03e7580df;hp=df1d301114edfb8dfa2aa998e8c39cafdc994a69;hb=3b94daba711090f1936f59fae6f7cbcba963b29e;hpb=64d2f8e82a877a52a3406ab77b930ea110aac228 diff --git a/configure b/configure index df1d3011..e3d97c2c 100755 --- a/configure +++ b/configure @@ -2,7 +2,7 @@ usage () { cat </dev/null)" ; then +if fnmatch '*gcc\ version*' "$("$CC" -v 2>&1)" ; then echo yes printf "checking whether to build musl-gcc wrapper... " wrapper=yes @@ -166,21 +167,21 @@ fi # -# Find the build architecture +# Find the target architecture # -printf "checking build system type... " -test -n "$build" || build=$("$CC" -dumpmachine 2>/dev/null) || build=unknown -printf "%s\n" "$build" +printf "checking target system type... " +test -n "$target" || target=$("$CC" -dumpmachine 2>/dev/null) || target=unknown +printf "%s\n" "$target" # # Convert to just ARCH # -case "$build" in +case "$target" in arm*) ARCH=arm ;; i?86*) ARCH=i386 ;; x86_64*) ARCH=x86_64 ;; -unknown) fail "$0: unable to detect built target; try $0 --build=..." ;; -*) fail "$0: unknown or unsupported build target \"$build\"" ;; +unknown) fail "$0: unable to detect target arch; try $0 --target=..." ;; +*) fail "$0: unknown or unsupported target \"$target\"" ;; esac # @@ -192,6 +193,7 @@ tryflag CFLAGS_C99FSE -ffreestanding \ || tryflag CFLAGS_C99FSE -fno-builtin tryflag CFLAGS_C99FSE -fexcess-precision=standard \ || tryflag CFLAGS_C99FSE -ffloat-store +tryflag CFLAGS_C99FSE -frounding-math # # Setup basic default CFLAGS: debug, optimization, and -pipe