X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Futils%2Fhsc2hs%2FMakefile;h=67aa40d211f3a6fb7f9549b256bab2c4209de598;hb=e25528e60aef15cf6697b4a30217f1f1f22e9aa0;hp=dee408510f3de99b41c22b5ba9a95d0461411aef;hpb=26f9e593087c3b738a1961d37f4c4a0a6bab0a0c;p=ghc-hetmet.git diff --git a/ghc/utils/hsc2hs/Makefile b/ghc/utils/hsc2hs/Makefile index dee4085..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) @@ -21,8 +26,6 @@ ifeq "$(HOSTPLATFORM)" "i386-unknown-cygwinw32" HS_PROG = hsc2hs$(exeext) endif -ghc_ge_504 = $(shell if (test $(GhcCanonVersion) -ge 504); then echo YES; else echo NO; fi) - ifeq "$(ghc_ge_504)" "NO" SRC_HC_OPTS += -package util endif @@ -31,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