]> gitweb @ CieloNegro.org - pkgsrc-ghc.git/blob - patches/patch-rts_ghc.mk
5402cec289c4464f7c516ca8bcb5356d71dfa029
[pkgsrc-ghc.git] / patches / patch-rts_ghc.mk
1 $NetBSD$
2
3 Hunk #1:
4   Specify a C compiler to build C sources when we're bootstrapping.
5
6 Hunk #2:
7   Missing dependency on generated headers.
8
9 Hunk #3:
10   This is pkgsrc specific: /usr/sbin/dtrace gets confused when we have
11   ghc wrappers in the PATH so we have to hide them.
12
13
14 --- rts/ghc.mk.orig     2012-02-01 18:10:32.000000000 +0000
15 +++ rts/ghc.mk
16 @@ -15,6 +15,7 @@
17  
18  # We build the RTS with stage 1
19  rts_dist_HC = $(GHC_STAGE1)
20 +rts_dist_CC = $(CC_STAGE1)
21  
22  # merge GhcLibWays and GhcRTSWays but strip out duplicates
23  rts_WAYS = $(GhcLibWays) $(filter-out $(GhcLibWays),$(GhcRTSWays))
24 @@ -457,6 +458,10 @@ $(eval $(call dependencies,rts,dist,1))
25  
26  $(rts_dist_depfile_c_asm) : $(libffi_HEADERS) $(DTRACEPROBES_H)
27  
28 +ifeq "$(BootingFromHc)" "YES"
29 +$(rts_C_SRCS) : $(libffi_HEADERS) $(DTRACEPROBES_H)
30 +endif
31 +
32  # -----------------------------------------------------------------------------
33  # compile dtrace probes if dtrace is supported
34  
35 @@ -479,7 +484,7 @@ endif
36  
37  DTRACEPROBES_SRC = rts/RtsProbes.d
38  $(DTRACEPROBES_H): $(DTRACEPROBES_SRC) includes/ghcplatform.h | $$(dir $$@)/.
39 -       "$(DTRACE)" $(filter -I%,$(rts_CC_OPTS)) -C $(DTRACE_FLAGS) -h -o $@ -s $<
40 +       env PATH="/usr/bin" "$(DTRACE)" $(filter -I%,$(rts_CC_OPTS)) -C $(DTRACE_FLAGS) -h -o $@ -s $<
41  endif
42  
43  # -----------------------------------------------------------------------------