Date: Tue, 21 Apr 2015 13:38:21 -0400 From: Rich Felker <dalias@...c.org> To: musl@...ts.openwall.com Subject: Re: [PATCH] configure: check for -march and -mtune passed via CC On Tue, Apr 21, 2015 at 10:34:05AM -0700, Andre McCurdy wrote: > Some build environments pass -march and -mtune as part of CC, therefore > update configure to check both CC and CFLAGS before making the decision > to fall back to generic -march and -mtune options for x86. > > Signed-off-by: Andre McCurdy <armccurdy@...il.com> > --- > configure | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/configure b/configure > index e35c9b6..f325cda 100755 > --- a/configure > +++ b/configure > @@ -391,10 +391,12 @@ tryflag CFLAGS_AUTO -Wa,--noexecstack > # extensions enabled by default. This is bad for making static binaries. > # We cheat and use i486 rather than i386 because i386 really does not > # work anyway (issues with atomic ops). > +# Some build environments pass -march and -mtune options via CC, so > +# check both CC and CFLAGS. > # > if test "$ARCH" = "i386" ; then > -fnmatch '-march=*|*\ -march=*' "$CFLAGS" || tryldflag CFLAGS_AUTO -march=i486 > -fnmatch '-mtune=*|*\ -mtune=*' "$CFLAGS" || tryldflag CFLAGS_AUTO -mtune=generic > +fnmatch '-march=*|*\ -march=*' "$CC $CFLAGS" || tryldflag CFLAGS_AUTO -march=i486 > +fnmatch '-mtune=*|*\ -mtune=*' "$CC $CFLAGS" || tryldflag CFLAGS_AUTO -mtune=generic It's questionable whether we should have this code to begin with, but as long as we do, I agree the change you proposed is correct. I'll apply it. Thanks! Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.