[project @ 2005-01-31 14:53:13 by simonpj]
authorsimonpj <unknown>
Mon, 31 Jan 2005 14:53:14 +0000 (14:53 +0000)
committersimonpj <unknown>
Mon, 31 Jan 2005 14:53:14 +0000 (14:53 +0000)
Compile utilities and lib/compat with GhcHcOpts, in case it is profiled

ghc/lib/compat/Makefile
ghc/utils/ghc-pkg/Makefile
ghc/utils/hsc2hs/Makefile

index 30c5d18..56220e9 100644 (file)
@@ -17,6 +17,10 @@ MKDEPENDC_OPTS += -I$(GHC_INCLUDE_DIR)
 
 UseGhcForCc = YES
 
+# This library is linked to the compiler, at least in stage1, so we
+# better make sure it is built the same "way":
+SRC_HC_OPTS += $(GhcHcOpts)
+
 ifeq "$(ghc_ge_603)" "YES"
 # These modules are all provided in GHC 6.3+
 EXCLUDED_SRCS += \
index 90230f4..f8ae77e 100644 (file)
@@ -17,6 +17,11 @@ SRC_LD_OPTS += -L$(GHC_LIB_COMPAT_DIR) -lghccompat
 HC_BOOT_LD_OPTS += -L$(GHC_LIB_COMPAT_DIR)
 HC_BOOT_LIBS += -lghccompat
 
+# This is required because libghccompat.a must be built with
+# $(GhcHcOpts) because it is linked to the compiler, and hence
+# we must also build with $(GhcHcOpts) here:
+SRC_HC_OPTS += $(GhcHcOpts)
+
 ifeq "$(Windows)" "YES"
 # not very nice, but required for -lghccompat on Windows
 SRC_LD_OPTS += -lshell32
index f107167..67aa40d 100644 (file)
@@ -13,6 +13,11 @@ INSTALLING=1
 SRC_HC_OPTS += -i$(GHC_LIB_COMPAT_DIR)
 SRC_LD_OPTS += -L$(GHC_LIB_COMPAT_DIR) -lghccompat
 
+# This is required because libghccompat.a must be built with
+# $(GhcHcOpts) because it is linked to the compiler, and hence
+# we must also build with $(GhcHcOpts) here:
+SRC_HC_OPTS += $(GhcHcOpts)
+
 HS_PROG           = hsc2hs-bin
 ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32"
 HS_PROG           = hsc2hs$(exeext)