From: Rich Felker Date: Thu, 25 Oct 2012 18:52:12 +0000 (-0400) Subject: configure: test not just compiling but linking with -march/-mtune X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=commitdiff_plain;h=80a45458e0d9b75d508110bd880d0ae0432b0356;hp=c8cb6bcdf009e94c12c6e256b8e24a9bc5fdaf05 configure: test not just compiling but linking with -march/-mtune pcc wrongly passes any option beginning with -m to the linker, and will break at link time if these options were added to CFLAGS. testing linking lets us catch this at configure time and skip them. --- diff --git a/configure b/configure index c1bcac7c..327734ae 100755 --- a/configure +++ b/configure @@ -269,8 +269,8 @@ tryflag CFLAGS_AUTO -falign-jumps=1 # work anyway (issues with atomic ops). # if test "$ARCH" = "i386" ; then -fnmatch '-march=*|*\ -march=*' "$CFLAGS" || tryflag CFLAGS_AUTO -march=i486 -fnmatch '-mtune=*|*\ -mtune=*' "$CFLAGS" || tryflag CFLAGS_AUTO -mtune=generic +fnmatch '-march=*|*\ -march=*' "$CFLAGS" || tryldflag CFLAGS_AUTO -march=i486 +fnmatch '-mtune=*|*\ -mtune=*' "$CFLAGS" || tryldflag CFLAGS_AUTO -mtune=generic fi if test "x$warnings" = xyes ; then