From f5106d93713275641e444548184afd89265e8c04 Mon Sep 17 00:00:00 2001 From: simonpj Date: Mon, 31 Jan 2005 14:53:14 +0000 Subject: [PATCH] [project @ 2005-01-31 14:53:13 by simonpj] Compile utilities and lib/compat with GhcHcOpts, in case it is profiled --- ghc/lib/compat/Makefile | 4 ++++ ghc/utils/ghc-pkg/Makefile | 5 +++++ ghc/utils/hsc2hs/Makefile | 5 +++++ 3 files changed, 14 insertions(+) diff --git a/ghc/lib/compat/Makefile b/ghc/lib/compat/Makefile index 30c5d18..56220e9 100644 --- a/ghc/lib/compat/Makefile +++ b/ghc/lib/compat/Makefile @@ -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 += \ diff --git a/ghc/utils/ghc-pkg/Makefile b/ghc/utils/ghc-pkg/Makefile index 90230f4..f8ae77e 100644 --- a/ghc/utils/ghc-pkg/Makefile +++ b/ghc/utils/ghc-pkg/Makefile @@ -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 diff --git a/ghc/utils/hsc2hs/Makefile b/ghc/utils/hsc2hs/Makefile index f107167..67aa40d 100644 --- a/ghc/utils/hsc2hs/Makefile +++ b/ghc/utils/hsc2hs/Makefile @@ -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) -- 1.7.10.4