From 95438e54b8128061b1b8751943e69a5af2e338f1 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 14 May 2012 18:59:00 +0200 Subject: configure: OSX: fix check for compiler-specific cflags The configure script adds some compiler-specific flags for GCC on OSX. This was done under a check for compiler binary name not being clang. Move the test to after $cc_vendor has been determined and check against that instead. The previous test worked for clang if you explicitly specified --cc=clang, but not if the default system "cc" command was used and mapped to clang. Recent versions of Xcode changed the default compiler (cc) to clang. This caused a lot of spam from clang, which complained about the unknown flags when compiling with no explicit --cc option. --- configure | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 53669f9102..a334b30922 100755 --- a/configure +++ b/configure @@ -1339,9 +1339,6 @@ fi if darwin; then extra_cflags="-mdynamic-no-pic $extra_cflags" - if test "$(basename $_cc)" != "clang" ; then - extra_cflags="-falign-loops=16 -shared-libgcc $extra_cflags" - fi _timer=timer-darwin.c fi @@ -2303,6 +2300,10 @@ else warn_cflags=yes fi +if darwin && test "$cc_vendor" = "gnu" ; then + extra_cflags="-falign-loops=16 -shared-libgcc $extra_cflags" +fi + if test "$cc_vendor" = "gnu" ; then cflag_check -Wundef && WARNFLAGS="-Wundef $WARNFLAGS" # -std=gnu99 is not a warning flag but is placed in WARN_CFLAGS because -- cgit v1.2.3