Skip to content

Commit

Permalink
Use gcc to build C programs for stages >= 1
Browse files Browse the repository at this point in the history
  • Loading branch information
igfoo committed Jul 16, 2010
1 parent 06c0128 commit 8e0dcfd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ghc/hschooks.c
Expand Up @@ -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

Expand Down
6 changes: 6 additions & 0 deletions rules/build-prog.mk
Expand Up @@ -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),\
Expand Down

0 comments on commit 8e0dcfd

Please sign in to comment.