X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2Fghc.mk;h=c3d7eb6e6bfaaa538581d7318cf924db069d1107;hb=f4b727487a65e6b611bbaafbd2207bd63a8df706;hp=7276e72bcde96dac65cd3f2f13485bc8610c570c;hpb=fcf0225457abec189ea630163fa56bc48c2d796d;p=ghc-hetmet.git diff --git a/rts/ghc.mk b/rts/ghc.mk index 7276e72..c3d7eb6 100644 --- a/rts/ghc.mk +++ b/rts/ghc.mk @@ -18,9 +18,10 @@ rts_dist_HC = $(GHC_STAGE1) # merge GhcLibWays and GhcRTSWays but strip out duplicates rts_WAYS = $(GhcLibWays) $(filter-out $(GhcLibWays),$(GhcRTSWays)) +rts_dist_WAYS = $(rts_WAYS) -ALL_RTS_LIBS = $(foreach way,$(rts_WAYS),rts/dist/build/libHSrts$($(way)_libsuf)) \ - rts/dist/build/libHSrtsmain.a +ALL_RTS_LIBS = rts/dist/build/libHSrtsmain.a \ + $(foreach way,$(rts_WAYS),rts/dist/build/libHSrts$($(way)_libsuf)) all_rts : $(ALL_RTS_LIBS) # ----------------------------------------------------------------------------- @@ -88,9 +89,7 @@ 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 \ - rts/dist/build/win32/libHSffi.dll.a \ - gmp/libgmp.dll.a - + rts/dist/build/win32/libHSffi.dll.a # -- import libs for the regular Haskell libraries define make-importlib-def # args $1 = lib name @@ -143,7 +142,8 @@ $(call cmm-suffix-rules,rts,dist,$1) $(call hs-suffix-rules-srcdir,rts,dist,$1,$$(dir)) # hs-suffix-rules-srcdir is needed when BootingFromHc to get the .hc rules -rts_$1_LIB = rts/dist/build/libHSrts$$($1_libsuf) +rts_$1_LIB_NAME = libHSrts$$($1_libsuf) +rts_$1_LIB = rts/dist/build/$$(rts_$1_LIB_NAME) rts_$1_C_OBJS = $$(patsubst rts/%.c,rts/dist/build/%.$$($1_osuf),$$(rts_C_SRCS)) $$(patsubst %.c,%.$$($1_osuf),$$(rts_$1_EXTRA_C_SRCS)) rts_$1_S_OBJS = $$(patsubst rts/%.S,rts/dist/build/%.$$($1_osuf),$$(rts_S_SRCS)) @@ -160,6 +160,10 @@ $$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) rts/libs.depend "$$(RM)" $$(RM_OPTS) $$@ "$$(rts_dist_HC)" -shared -dynamic -dynload deploy \ -no-auto-link-packages `cat rts/libs.depend` $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) -o $$@ +ifeq "$(darwin_TARGET_OS)" "1" + # Ensure library's install name is correct before anyone links with it. + install_name_tool -id $(ghclibdir)/$$(rts_$1_LIB_NAME) $$@ +endif else $$(rts_$1_LIB) : $$(rts_$1_OBJS) rts/libs.depend "$$(RM)" $$(RM_OPTS) $$@ @@ -318,8 +322,8 @@ rts/dist/build/sm/Evac_thr_HC_OPTS += -optc-funroll-loops # These files are just copies of sm/Evac.c and sm/Scav.c respectively, # but compiled with -DPARALLEL_GC. -rts/dist/build/sm/Evac_thr_HC_OPTS += -optc-DPARALLEL_GC -Irts/sm -rts/dist/build/sm/Scav_thr_HC_OPTS += -optc-DPARALLEL_GC -Irts/sm +rts/dist/build/sm/Evac_thr_CC_OPTS += -DPARALLEL_GC -Irts/sm +rts/dist/build/sm/Scav_thr_CC_OPTS += -DPARALLEL_GC -Irts/sm #----------------------------------------------------------------------------- # Add PAPI library if needed @@ -351,15 +355,8 @@ endif # ----------------------------------------------------------------------------- # dependencies -# Hack: we define every way-related option here, so that we get (hopefully) -# a superset of the dependencies. To do this properly, we should generate -# a different set of dependencies for each way. Further hack: PROFILING and -# TICKY_TICKY can't be used together, so we omit TICKY_TICKY for now. -rts_MKDEPENDC_OPTS += -DPROFILING -DTHREADED_RTS -DDEBUG -rts_MKDEPENDC_OPTS += -Irts/sm - rts_WAYS_DASHED = $(subst $(space),,$(patsubst %,-%,$(strip $(rts_WAYS)))) -rts_dist_depfile = rts/dist/build/.depend$(rts_WAYS_DASHED) +rts_dist_depfile_base = rts/dist/build/.depend$(rts_WAYS_DASHED) rts_dist_C_SRCS = $(rts_C_SRCS) $(rts_thr_EXTRA_C_SRCS) rts_dist_S_SRCS = $(rts_S_SRCS) @@ -367,7 +364,7 @@ rts_dist_C_FILES = $(rts_C_SRCS) $(rts_thr_EXTRA_C_SRCS) $(rts_S_SRCS) $(eval $(call build-dependencies,rts,dist)) -$(rts_dist_depfile) : libffi/dist-install/build/ffi.h +$(rts_dist_depfile_c_asm) : libffi/dist-install/build/ffi.h #----------------------------------------------------------------------------- # libffi stuff