summaryrefslogtreecommitdiff
path: root/rts
diff options
context:
space:
mode:
authorgwright@antiope.com <unknown>2010-12-21 13:32:33 +0000
committergwright@antiope.com <unknown>2010-12-21 13:32:33 +0000
commit834a2186da7f4ea29d4984a5f809183cb299754a (patch)
treee608ac3766d7bed81d9f8b27d9acd2c300121d21 /rts
parentbbb8a7e72110fad6d6dc27a80dc245f3ff7dd4f5 (diff)
downloadhaskell-834a2186da7f4ea29d4984a5f809183cb299754a.tar.gz
Fix #4829 (build does not respect --with-gcc option)
This patch fixes what seems to be the last problem with the --with-gcc option. On OS X, we need to pass the path to gcc to dtrace as the preprocessor. (Internally, dtrace on OS X sets the default preprocessor to /usr/bin/gcc.) ATM, dtrace is only supported on OS X, so we don't need any conditionalization. If dtrace is ported to other platforms, we might need to change this. However, usage on other platforms will probably be similar to OS X, since many of Apple's changes are to use the gnu toolchain instead of the Sun toolchain.
Diffstat (limited to 'rts')
-rw-r--r--rts/ghc.mk7
1 files changed, 6 insertions, 1 deletions
diff --git a/rts/ghc.mk b/rts/ghc.mk
index 0c224e9090..8825219225 100644
--- a/rts/ghc.mk
+++ b/rts/ghc.mk
@@ -460,9 +460,14 @@ ifeq "$(HaveDtrace)" "YES"
rts_CC_OPTS += -DDTRACE
rts_HC_OPTS += -DDTRACE
+# Apple's dtrace (the only one supported by ghc at the moment) uses
+# gcc as its preprocessor. If gcc isn't at /usr/bin/gcc, or we need
+# to force it to use a different gcc, we need to give the path in
+# the option cpppath.
+
DTRACEPROBES_SRC = rts/RtsProbes.d
$(DTRACEPROBES_H): $(DTRACEPROBES_SRC) includes/ghcplatform.h | $(dir $@)/.
- "$(DTRACE)" $(filter -I%,$(rts_CC_OPTS)) -C -h -o $@ -s $<
+ "$(DTRACE)" $(filter -I%,$(rts_CC_OPTS)) -C -x cpppath=$(WhatGccIsCalled) -h -o $@ -s $<
endif