X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2FMakefile;h=96057bc58d36585603042e521a06a2675e5d7462;hp=a64cd12fe71912f1bf6aa44c458c0c69b0039058;hb=d7b3ad9be373e02ea8b679d978f6ca898436892d;hpb=be745f257384dfedb81f154a961daaa709010ba1 diff --git a/compiler/Makefile b/compiler/Makefile index a64cd12..96057bc 100644 --- a/compiler/Makefile +++ b/compiler/Makefile @@ -52,9 +52,6 @@ count : # - for stage N, object files and .hi files are placed inside # the directory stageN, in subdirectories as per the sources. # -# - .hi-boot files are *linked* into the stageN tree, because in GHC 5.05+ -# the .hi-boot file must reside in the same place as the .hi file. -# # - we use explicit -o and -ohi options to direct the output from C & # Haskell compilations. # @@ -80,8 +77,8 @@ count : # There are other plausible designs that might work, but each has different # problems: # -# - using -odir and -hidir: GHC <= 4.08 doesn't support -hidir, and -# anyway -odir puts all the objects in one directory (strips off the +# - using -odir and -hidir: +# -odir puts all the objects in one directory (strips off the # subdirectory part), which eventually forces us to use VPATH to find # the sources. I have a really bad feeling about VPATH. # @@ -113,27 +110,6 @@ endif endif boot :: stage_dirs -# On Windows, we can't use symbolic links for the -hi-boot files -# because GHC itself is a Mingw program and does not understand -# symbolic links. So we have to copy the files instead of link them. -# That means that if you modify a .hi-boot file in Windows, you -# have to to say 'make boot' again. -# -# PS: 'ln -s foo baz' takes 'foo' relative to the path to 'baz' -# whereas 'cp foo baz' treats the two paths independently. -# Hence the "../.." in the ln command line -ifeq "$(UsingHsBoot)" "NO" -ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32" - for i in */*hi-boot*; do \ - cp -u -f $$i stage$(stage)/$$i; \ - done -else - for i in */*hi-boot*; do \ - ($(RM) -f stage$(stage)/$$i \ - && $(LN_S) ../../$$i stage$(stage)/$$i) || true ; \ - done -endif -endif ifeq "$(stage)" "1" HC=$(GHC) @@ -160,12 +136,7 @@ odir=stage$(stage) SRC_HC_OPTS += $(patsubst %, -i$(odir)/%, $(ALL_DIRS)) -SRC_HC_OPTS += -Wall -fno-warn-name-shadowing -# Turn off orphan warnings, but only if the flag exists (i.e. not if we -# are building stage 1 and using GHC < 6.3). -ifneq "$(stage)" "1 NO" -SRC_HC_OPTS += -fno-warn-orphans -endif +SRC_HC_OPTS += -Wall -fno-warn-name-shadowing -fno-warn-orphans HS_OBJS = $(patsubst %, $(odir)/%, $(addsuffix .$(way_)o,$(basename $(HS_SRCS)))) C_OBJS = $(patsubst %, $(odir)/%, $(addsuffix .$(way_)o,$(basename $(C_SRCS)))) @@ -283,12 +254,6 @@ $(CONFIG_HS) : $(FPTOOLS_TOP)/mk/config.mk @echo "cGHC_CP = \"$(GHC_CP)\"" >> $(CONFIG_HS) @echo "cGHC_PERL :: String" >> $(CONFIG_HS) @echo "cGHC_PERL = \"$(GHC_PERL)\"" >> $(CONFIG_HS) -ifeq ($(GhcWithIlx),YES) - @echo "cILX2IL :: String" >> $(CONFIG_HS) - @echo "cILX2IL = \"$(ILX2IL)\"" >> $(CONFIG_HS) - @echo "cILASM :: String" >> $(CONFIG_HS) - @echo "cILASM = \"$(ILASM)\"" >> $(CONFIG_HS) -endif @echo "cEnableWin32DLLs :: String" >> $(CONFIG_HS) @echo "cEnableWin32DLLs = \"$(EnableWin32DLLs)\"" >> $(CONFIG_HS) @echo "cCONTEXT_DIFF :: String" >> $(CONFIG_HS) @@ -445,16 +410,6 @@ else SRC_HC_OPTS += -DOMIT_NATIVE_CODEGEN endif -ifeq ($(GhcWithIlx),YES) -ALL_DIRS += ilxGen -SRC_HC_OPTS += -DILX -endif - -ifeq ($(GhcWithJavaGen),YES) -ALL_DIRS += javaGen -SRC_HC_OPTS += -DJAVA -endif - ifeq "$(BootingFromHc)" "YES" # HC files are always from a self-booted compiler bootstrapped = YES @@ -588,11 +543,6 @@ endif # Disaster! Then the hc file sees the GHC 5.02 (or whatever) # include files. For the moment we've reverted to using # an explicit path in the .hs sources -# -# For the benefit of <5.00 compilers, do include GHC_INCLUDE_DIR -# when generating dependencies. (=> it gets passed onto mkdependHS, -# which needs it). -SRC_MKDEPENDHS_OPTS += -I$(GHC_INCLUDE_DIR) # We need System.Posix (or Posix when ghc < 6.2) ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32" @@ -621,39 +571,12 @@ ifeq "$(BootingFromHc)" "YES" SRC_CC_OPTS += -D__GLASGOW_HASKELL__=$(ProjectVersionInt) endif -# Special flags for particular modules -# The standard suffix rule for compiling a Haskell file -# adds these flags to the command line - -# There used to be a -fforce-recomp flag on PrimOp, but why? -# It's an expensive module to recompile! -prelude/PrimOp_HC_OPTS = -H80m - - -main/ParsePkgConf_HC_OPTS += -fno-warn-incomplete-patterns -parser/Parser_HC_OPTS += -fno-warn-incomplete-patterns - -# Careful optimisation of the parser: we don't want to throw everything -# at it, because that takes too long and doesn't buy much, but we do want -# to inline certain key external functions, so we instruct GHC not to -# throw away inlinings as it would normally do in -O0 mode: -parser/Parser_HC_OPTS += -O0 -fno-ignore-interface-pragmas - ifeq "$(HOSTPLATFORM)" "hppa1.1-hp-hpux9" rename/RnMonad_HC_OPTS = -O2 -O2-for-C endif # basicTypes/SrcLoc_HC_OPTS = -funbox-strict-fields -# We always optimise some low-level modules, otherwise performance of -# a non-optimised compiler is severely affected. -main/BinIface_HC_OPTS += -O -utils/Binary_HC_OPTS += -O -funbox-strict-fields -utils/FastMutInt_HC_OPTS += -O -utils/Encoding_HC_OPTS += -O -utils/StringBuffer_HC_OPTS += -O -funbox-strict-fields -utils/FastString_HC_OPTS += -O -funbox-strict-fields - # ---- Profiling ---- #simplCore/Simplify_HC_OPTS = -auto-all #simplCore/SimplEnv_HC_OPTS = -auto-all @@ -678,8 +601,6 @@ ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32" main/SysTools_HC_OPTS += '-\#include ' '-\#include ' endif -parser/Lexer_HC_OPTS += -funbox-strict-fields - # ghc_strlen percolates through so many modules that it is easier to get its # prototype via a global option instead of a myriad of per-file OPTIONS SRC_HC_OPTS += '-\#include "cutils.h"'