diff options
-rw-r--r-- | compiler/ghc.mk | 2 | ||||
-rw-r--r-- | mk/config.mk.in | 6 | ||||
-rw-r--r-- | rts/ghc.mk | 7 | ||||
-rw-r--r-- | rules/build-package-way.mk | 2 |
4 files changed, 10 insertions, 7 deletions
diff --git a/compiler/ghc.mk b/compiler/ghc.mk index e4a8368795..a3005db41b 100644 --- a/compiler/ghc.mk +++ b/compiler/ghc.mk @@ -493,7 +493,7 @@ compiler/main/Constants_HC_OPTS += -fforce-recomp # LibFFI.hs #includes ffi.h compiler/stage2/build/LibFFI.hs : $(libffi_HEADERS) # On Windows it seems we also need to link directly to libffi -ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32" +ifeq "$(HostOS_CPP)" "mingw32" define windowsDynLinkToFfi # $1 = way ifneq "$$(findstring dyn, $1)" "" diff --git a/mk/config.mk.in b/mk/config.mk.in index da13af1d93..fe0feb0121 100644 --- a/mk/config.mk.in +++ b/mk/config.mk.in @@ -119,7 +119,7 @@ SharedLibsPlatformList = \ i386-unknown-freebsd x86_64-unknown-freebsd \ i386-unknown-openbsd x86_64-unknown-openbsd \ i386-unknown-netbsd x86_64-unknown-netbsd \ - i386-unknown-mingw32 \ + i386-unknown-mingw32 x86_64-unknown-mingw32 \ i386-apple-darwin x86_64-apple-darwin powerpc-apple-darwin ifeq "$(SOLARIS_BROKEN_SHLD)" "NO" @@ -632,7 +632,11 @@ endif # Mingwex Library # HaveLibMingwEx = @HaveLibMingwEx@ +ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32" DLLTOOL = inplace/mingw/bin/dlltool.exe +else ifeq "$(TARGETPLATFORM)" "x86_64-unknown-mingw32" +DLLTOOL = inplace/mingw/bin/x86_64-w64-mingw32-dlltool.exe +endif #----------------------------------------------------------------------------- # Flex (currently unused, could be moved to glafp-utils) diff --git a/rts/ghc.mk b/rts/ghc.mk index 6155002b83..70a7330cd8 100644 --- a/rts/ghc.mk +++ b/rts/ghc.mk @@ -81,13 +81,12 @@ rts/libs.depend : $(GHC_PKG_INPLACE) # These are made from rts/win32/libHS*.def which contain lists of # all the symbols in those libraries used by the RTS. # -ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32" +ifeq "$(HostOS_CPP)" "mingw32" ALL_RTS_DEF_LIBNAMES = base ghc-prim ALL_RTS_DEF_LIBS = \ rts/dist/build/win32/libHSbase.dll.a \ - rts/dist/build/win32/libHSghc-prim.dll.a \ - libffi/build/inst/lib/libffi.dll.a + rts/dist/build/win32/libHSghc-prim.dll.a # -- import libs for the regular Haskell libraries define make-importlib-def # args $1 = lib name @@ -171,7 +170,7 @@ rts_dist_$1_CC_OPTS += -DRtsWay=\"rts_$1\" # Making a shared library for the RTS. ifneq "$$(findstring dyn, $1)" "" -ifeq "$$(HOSTPLATFORM)" "i386-unknown-mingw32" +ifeq "$$(HostOS_CPP)" "mingw32" $$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) rts/libs.depend rts/dist/build/$$(LIBFFI_DLL) "$$(RM)" $$(RM_OPTS) $$@ "$$(rts_dist_HC)" -package-name rts -shared -dynamic -dynload deploy \ diff --git a/rules/build-package-way.mk b/rules/build-package-way.mk index dec2c551ee..4b603c2a2d 100644 --- a/rules/build-package-way.mk +++ b/rules/build-package-way.mk @@ -62,7 +62,7 @@ ifeq "$3" "dyn" # Link a dynamic library # On windows we have to supply the extra libs this one links to when building it. -ifeq "$$(HOSTPLATFORM)" "i386-unknown-mingw32" +ifeq "$$(HostOS_CPP)" "mingw32" $$($1_$2_$3_LIB) : $$($1_$2_$3_ALL_OBJS) $$(ALL_RTS_LIBS) $$($1_$2_$3_DEPS_LIBS) "$$($1_$2_HC)" $$($1_$2_$3_ALL_HC_OPTS) $$($1_$2_$3_ALL_OBJS) \ -shared -dynamic -dynload deploy \ |