Use CONF_CC_OPTS
authorManuel M T Chakravarty <chak@cse.unsw.edu.au>
Thu, 17 Sep 2009 13:27:06 +0000 (13:27 +0000)
committerManuel M T Chakravarty <chak@cse.unsw.edu.au>
Thu, 17 Sep 2009 13:27:06 +0000 (13:27 +0000)
- Needed to get arch-dependent options, eg, on Snow Leopard

compiler/typecheck/TcBinds.lhs
libffi/ghc.mk
mk/config.mk.in
rules/build-package-data.mk

index 9bf8faf..a71da2e 100644 (file)
@@ -805,7 +805,8 @@ unifyCtxts :: [TcSigInfo] -> TcM [Inst]
 -- Post-condition: the returned Insts are full zonked
 unifyCtxts [] = panic "unifyCtxts []"
 unifyCtxts (sig1 : sigs)        -- Argument is always non-empty
-  = do  { mapM_ unify_ctxt sigs
+  = do  { traceTc $ text "unifyCtxts" <+> ppr (sig1 : sigs)
+       ; mapM_ unify_ctxt sigs
         ; theta <- zonkTcThetaType (sig_theta sig1)
         ; newDictBndrs (sig_loc sig1) theta }
   where
index ae41881..d3e57be 100644 (file)
@@ -122,8 +122,8 @@ $(libffi_STAMP_CONFIGURE):
            export PATH; \
            cd build && \
            CC=$(WhatGccIsCalled) \
-        CFLAGS="$(SRC_CC_OPTS) -w" \
-        LDFLAGS="$(SRC_LD_OPTS) -w" \
+        CFLAGS="$(SRC_CC_OPTS) $(CONF_CC_OPTS) -w" \
+        LDFLAGS="$(SRC_LD_OPTS) $(CONF_LD_OPTS) -w" \
         "$(SHELL)" configure \
                  --enable-static=yes \
                  --enable-shared=$(libffi_EnableShared) \
@@ -168,7 +168,7 @@ $(eval $(call all-target,libffi,libffi/libHSffi.a libffi/libHSffi_p.a))
 libffi/HSffi.o: libffi/libHSffi.a
        cd libffi && \
          touch empty.c; \
-         "$(CC)" $(SRC_CC_OPTS) -c empty.c -o HSffi.o
+         "$(CC)" $(SRC_CC_OPTS) $(CONF_CC_OPTS) -c empty.c -o HSffi.o
 
 $(eval $(call all-target,libffi,libffi/HSffi.o))
 
index 93b5555..edcf625 100644 (file)
@@ -551,7 +551,7 @@ ifeq "$(TARGETPLATFORM)" "ia64-unknown-linux"
 CONF_CC_OPTS += -G0
 endif
 
-SRC_HSC2HS_OPTS += $(addprefix --cflag=,$(filter-out -O,$(SRC_CC_OPTS)))
+SRC_HSC2HS_OPTS += $(addprefix --cflag=,$(filter-out -O,$(SRC_CC_OPTS) $(CONF_CC_OPTS)))
 SRC_HSC2HS_OPTS += $(foreach d,$(GMP_INCLUDE_DIRS),-I$(d))
 
 #-----------------------------------------------------------------------------
index 4fe60f9..88e2c63 100644 (file)
@@ -31,7 +31,7 @@ endif
 # We filter out -Werror from SRC_CC_OPTS, because when configure tests
 # for a feature it may not generate warning-free C code, and thus may
 # think that the feature doesn't exist if -Werror is on.
-$1_$2_CONFIGURE_OPTS += --configure-option=CFLAGS="$$(filter-out -Werror,$$(SRC_CC_OPTS)) $$($1_CC_OPTS) $$($1_$2_CC_OPTS)"
+$1_$2_CONFIGURE_OPTS += --configure-option=CFLAGS="$$(filter-out -Werror,$$(SRC_CC_OPTS)) $$(CONF_CC_OPTS) $$($1_CC_OPTS) $$($1_$2_CC_OPTS)"
 $1_$2_CONFIGURE_OPTS += --configure-option=LDFLAGS="$$(SRC_LD_OPTS) $$($1_LD_OPTS) $$($1_$2_LD_OPTS)"
 
 ifneq "$$(ICONV_INCLUDE_DIRS)" ""