projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
06c0128
)
Use gcc to build C programs for stages >= 1
author
Ian Lynagh
<igloo@earth.li>
Fri, 16 Jul 2010 22:37:03 +0000
(22:37 +0000)
committer
Ian Lynagh
<igloo@earth.li>
Fri, 16 Jul 2010 22:37:03 +0000
(22:37 +0000)
ghc/hschooks.c
patch
|
blob
|
history
rules/build-prog.mk
patch
|
blob
|
history
diff --git
a/ghc/hschooks.c
b/ghc/hschooks.c
index
2224b02
..
f3c4b4d
100644
(file)
--- a/
ghc/hschooks.c
+++ b/
ghc/hschooks.c
@@
-5,7
+5,7
@@
in instead of the defaults.
*/
#include "Rts.h"
-#if __GLASGOW_HASKELL__ <611
+#if defined(__GLASGOW_HASKELL__) && (__GLASGOW_HASKELL__ <611)
#include "RtsFlags.h"
#endif
diff --git
a/rules/build-prog.mk
b/rules/build-prog.mk
index
0efac4c
..
0e0a665
100644
(file)
--- 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),\