X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Futils%2Fhsc2hs%2FMakefile;h=ccaf68eec8b271c4beb92639ce6ccbb8b13f273c;hb=1957057da8b5fa97478cfaf3aebd78294f5215fb;hp=3ec18d8e4f25f65e9cc28def2f85d1a38ff37585;hpb=55aa70cdc5ebc3e1cb9d73907f3e9c72f82b6796;p=ghc-hetmet.git diff --git a/ghc/utils/hsc2hs/Makefile b/ghc/utils/hsc2hs/Makefile index 3ec18d8..ccaf68e 100644 --- a/ghc/utils/hsc2hs/Makefile +++ b/ghc/utils/hsc2hs/Makefile @@ -10,8 +10,13 @@ INCLUDE_DIR=ghc/includes INSTALLING=1 -SRC_HC_OPTS += -i$(GHC_LIB_COMPAT_DIR) -SRC_LD_OPTS += -L$(GHC_LIB_COMPAT_DIR) -lghccompat +# This causes libghccompat.a to be used: +include $(GHC_LIB_COMPAT_DIR)/compat.mk + +# 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" @@ -29,9 +34,6 @@ endif # for calling the C preprocessor via GHC has changed a few times, making a # clean solution impossible. So we revert to a hack in Main.hs... SRC_HC_OPTS += -Wall -ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32" -SRC_HC_OPTS += -Dmingw32_HOST_OS=1 -endif ifneq "$(HOSTPLATFORM)" "i386-unknown-mingw32" INSTALLED_SCRIPT_PROG = hsc2hs