summaryrefslogtreecommitdiff
path: root/rules
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2010-07-16 22:37:03 +0000
committerIan Lynagh <igloo@earth.li>2010-07-16 22:37:03 +0000
commit8e0dcfd80c47a55aa94df2fc74ef12d780906a3e (patch)
treee30e3d1a1e21daf5a4c7dea11ae583936689b8c3 /rules
parent06c0128c1ee0f08c710bbb1a120acf08b5da9665 (diff)
downloadhaskell-8e0dcfd80c47a55aa94df2fc74ef12d780906a3e.tar.gz
Use gcc to build C programs for stages >= 1
Diffstat (limited to 'rules')
-rw-r--r--rules/build-prog.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/rules/build-prog.mk b/rules/build-prog.mk
index 0efac4c039..0e0a66504f 100644
--- a/rules/build-prog.mk
+++ b/rules/build-prog.mk
@@ -103,7 +103,13 @@ $(call build-dependencies,$1,$2,$3)
# Just the 'v' way for programs
$(call distdir-way-opts,$1,$2,v,$3)
+ifeq "$3" "0"
+# For stage 0, we use GHC to compile C sources so that we don't have to
+# worry about where the RTS header files are
$(call c-suffix-rules,$1,$2,v,YES)
+else
+$(call c-suffix-rules,$1,$2,v,NO)
+endif
$(call hs-suffix-rules,$1,$2,v)
$$(foreach dir,$$($1_$2_HS_SRC_DIRS),\