X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=pkgsrc-ghc.git;a=blobdiff_plain;f=patches%2Fpatch-rts_ghc.mk;h=5402cec289c4464f7c516ca8bcb5356d71dfa029;hp=9a30c89a40a0aa2f4ff09b80a9a1808bf22c68ee;hb=9795cf147d263fd5fad5d40948bc965e9219dd64;hpb=f4afb39c623b1c077a5ffeddbad2b4f451f0d975 diff --git a/patches/patch-rts_ghc.mk b/patches/patch-rts_ghc.mk index 9a30c89..5402cec 100644 --- a/patches/patch-rts_ghc.mk +++ b/patches/patch-rts_ghc.mk @@ -1,38 +1,43 @@ $NetBSD$ -The first section: - HC bootstrapping has bitrotted further. We need to build RtsProbes.h - before compiling Capability.hc but rts/ghc.mk doesn't have such - rule. +Hunk #1: + Specify a C compiler to build C sources when we're bootstrapping. -The second section: - This is pkgsrc specific. /usr/sbin/dtrace gets confused when we have +Hunk #2: + Missing dependency on generated headers. + +Hunk #3: + This is pkgsrc specific: /usr/sbin/dtrace gets confused when we have ghc wrappers in the PATH so we have to hide them. ---- rts/ghc.mk.orig 2011-03-26 18:10:07.000000000 +0000 +--- rts/ghc.mk.orig 2012-02-01 18:10:32.000000000 +0000 +++ rts/ghc.mk -@@ -452,12 +452,14 @@ rts_dist_MKDEPENDC_OPTS += -DPROFILING - - ifeq "$(USE_DTRACE)" "YES" +@@ -15,6 +15,7 @@ - rts_dist_MKDEPENDC_OPTS += -Irts/dist/build -+rts_CC_OPTS += -Irts/dist/build + # We build the RTS with stage 1 + rts_dist_HC = $(GHC_STAGE1) ++rts_dist_CC = $(CC_STAGE1) - endif + # merge GhcLibWays and GhcRTSWays but strip out duplicates + rts_WAYS = $(GhcLibWays) $(filter-out $(GhcLibWays),$(GhcRTSWays)) +@@ -457,6 +458,10 @@ $(eval $(call dependencies,rts,dist,1)) - $(eval $(call build-dependencies,rts,dist,1)) + $(rts_dist_depfile_c_asm) : $(libffi_HEADERS) $(DTRACEPROBES_H) - $(rts_dist_depfile_c_asm) : libffi/dist-install/build/ffi.h $(DTRACEPROBES_H) -+$(patsubst rts/%.c,rts/dist/build/%.o,$(rts_C_SRCS)) : $(DTRACEPROBES_H) ++ifeq "$(BootingFromHc)" "YES" ++$(rts_C_SRCS) : $(libffi_HEADERS) $(DTRACEPROBES_H) ++endif ++ + # ----------------------------------------------------------------------------- + # compile dtrace probes if dtrace is supported - #----------------------------------------------------------------------------- - # libffi stuff -@@ -489,7 +491,7 @@ endif +@@ -479,7 +484,7 @@ endif DTRACEPROBES_SRC = rts/RtsProbes.d $(DTRACEPROBES_H): $(DTRACEPROBES_SRC) includes/ghcplatform.h | $$(dir $$@)/. - "$(DTRACE)" $(filter -I%,$(rts_CC_OPTS)) -C $(DTRACE_FLAGS) -h -o $@ -s $< -+ env PATH=/usr/bin "$(DTRACE)" $(filter -I%,$(rts_CC_OPTS)) -C $(DTRACE_FLAGS) -h -o $@ -s $< ++ env PATH="/usr/bin" "$(DTRACE)" $(filter -I%,$(rts_CC_OPTS)) -C $(DTRACE_FLAGS) -h -o $@ -s $< endif # -----------------------------------------------------------------------------