[project @ 1998-08-14 11:30:14 by sof]
[ghc-hetmet.git] / ghc / compiler / Makefile
index 5674098..82bbae2 100644 (file)
@@ -1,5 +1,5 @@
 # -----------------------------------------------------------------------------
-# $Id: Makefile,v 1.37 1998/03/08 22:44:44 simonpj Exp $
+# $Id: Makefile,v 1.43 1998/07/02 08:44:24 simonm Exp $
 
 TOP = ..
 include $(TOP)/mk/boilerplate.mk
@@ -29,7 +29,7 @@ LIBRARY=libhsp.a
 # be to do ` env PATH=$(PATH) make hsc 'to minimise the environment. (or the
 # equivalent of `env' if it doesn't exist locally).
 #
-HS_PROG=hsc
+HS_PROG=hsc$(_way)
 
 
 # -----------------------------------------------------------------------------
@@ -132,8 +132,6 @@ SRC_HC_OPTS += -recomp $(GhcHcOpts)
 #      The standard suffix rule for compiling a Haskell file
 #      adds these flags to the command line
 
-absCSyn/CStrings_HC_OPTS       = -monly-3-regs
-
 # Was 6m with 2.10
 absCSyn/PprAbsC_HC_OPTS        = -H10m
 
@@ -165,11 +163,12 @@ reader/Lex_HC_OPTS                = -K2m -H16m -fvia-C -DPROJECTVERSION=$(GhcProjectVersionInt
 reader/ReadPrefix_HC_OPTS      = -fvia-C '-\#include"hspincl.h"' -H10m
 
 rename/ParseIface_HC_OPTS      += -Onot -H30m -fno-warn-incomplete-patterns
+rename/ParseIface_HAPPY_OPTS    += -g
 
 ifeq "$(TARGETPLATFORM)" "hppa1.1-hp-hpux9"
 rename/RnMonad_HC_OPTS                 = -fvia-C -O2 -O2-for-C
-else
 endif
+
 rename/RnEnv_HC_OPTS           = -fvia-C
 rename/RnSource_HC_OPTS                = -H12m
 rename/RnIfaces_HC_OPTS                = -H8m -fvia-C
@@ -186,13 +185,31 @@ typecheck/TcHsSyn_HC_OPTS = -H15m
 typecheck/TcExpr_HC_OPTS       = -H15m
 
 typecheck/TcEnv_HC_OPTS                = -H10m
-utils/Argv_HC_OPTS             = -fvia-C -monly-3-regs
+utils/Argv_HC_OPTS             = -fvia-C
 utils/SST_HC_OPTS              = -fvia-C
-utils/PrimPacked_HC_OPTS       = -fvia-C -monly-3-regs
-utils/FastString_HC_OPTS       = -fvia-C -monly-3-regs
+utils/FastString_HC_OPTS       = -fvia-C
 utils/StringBuffer_HC_OPTS     = -fvia-C -fno-prune-tydecls
 utils/Digraph_HC_OPTS          = -fglasgow-exts -fvia-C
-utils/Outputable_HC_OPTS       = -monly-3-regs
+utils/DirUtils_HC_OPTS                 = -fvia-C
+
+ifeq "$(alpha_HOST_ARCH)" "1"
+# "stbu" bug in alpha native code generator...
+basicTypes/Unique_HC_OPTS      = -fvia-C
+endif
+
+# flags for PrimPacked:
+#
+# -monly-3-regs 
+#      because it contains a 'ccall strlen', which gets inlined by
+#      gcc, causing a lack of registers.
+#
+# -optC-funfolding-interface-threshold10
+#      To stop the definition of 'strLength', which calls strlen, getting
+#      into the interface file and spreading the -monly-3-regs virus.
+#      We need -optC here because the driver before 3.02 didn't understand
+#      the -funfolding flags.
+
+utils/PrimPacked_HC_OPTS       = -fvia-C -monly-3-regs -optC-funfolding-interface-threshold10
 
 # Strictness analyser misbehaving in 2.10, fails to terminate on
 # UpdAnal.lhs due to weird recursive datatype.  Bug was exposed by a