Don't put all of $CFLAGS into $SRC_CC_OPTS
authorIan Lynagh <igloo@earth.li>
Thu, 16 Jul 2009 13:13:09 +0000 (13:13 +0000)
committerIan Lynagh <igloo@earth.li>
Thu, 16 Jul 2009 13:13:09 +0000 (13:13 +0000)
Instead, we just put the flags we need in there (e.g. -m64 on OS X 64).
This fixes a problem found by Simon M, where we were compiling
everything with -g, leading to a bloated RTS.

configure.ac

index f393ded..c6ce56c 100644 (file)
@@ -175,6 +175,9 @@ then
 fi
 AC_SUBST([WithGhc])
 
+dnl ** Without optimization some INLINE trickery fails for GHCi
+SRC_CC_OPTS="-O"
+
 dnl--------------------------------------------------------------------
 dnl * Choose host(/target/build) platform
 dnl--------------------------------------------------------------------
@@ -244,6 +247,8 @@ x86_64-apple-darwin)
     soext='.dylib'
     CFLAGS="$CFLAGS -m64"
     LDFLAGS="$LDFLAGS -m64"
+    SRC_CC_OPTS="$SRC_CC_OPTS -m64"
+    SRC_LD_OPTS="$SRC_LD_OPTS -m64"
     ;;
 esac
 
@@ -551,12 +556,6 @@ FP_GCC_EXTRA_FLAGS
 dnl ** figure out how to invoke cpp directly (gcc -E is no good)
 AC_PROG_CPP
 
-dnl ** Without optimization some INLINE trickery fails for GHCi
-SRC_CC_OPTS="-O"
-
-SRC_CC_OPTS="$SRC_CC_OPTS $CFLAGS"
-SRC_LD_OPTS="$SRC_LD_OPTS $LDFLAGS"
-
 AC_SUBST(SRC_CC_OPTS)
 AC_SUBST(SRC_LD_OPTS)