X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FMakefile;h=c1819f2cd269bcebd213caa4508bda25dc2240a0;hb=28a464a75e14cece5db40f2765a29348273ff2d2;hp=4920e16a0c561c41abe498087b107a1b74f150b0;hpb=f77d420437be751934f9a0cbcde17091443af748;p=ghc-hetmet.git diff --git a/ghc/compiler/Makefile b/ghc/compiler/Makefile index 4920e16..c1819f2 100644 --- a/ghc/compiler/Makefile +++ b/ghc/compiler/Makefile @@ -216,6 +216,8 @@ $(CONFIG_HS) : $(FPTOOLS_TOP)/mk/config.mk Makefile @echo "cRAWCPP_FLAGS = \"$(RAWCPP_FLAGS)\"" >> $(CONFIG_HS) @echo "cGCC = \"$(WhatGccIsCalled)\"" >> $(CONFIG_HS) @echo "cMKDLL = \"$(BLD_DLL)\"" >> $(CONFIG_HS) + @echo "cLdIsGNULd = \"$(LdIsGNULd)\"" >> $(CONFIG_HS) + @echo "cLD_X = \"$(LD_X)\"" >> $(CONFIG_HS) @echo "cPROJECT_DIR = \"$(PROJECT_DIR)\"" >> $(CONFIG_HS) @echo "cGHC_DRIVER_DIR_REL = \"$(GHC_DRIVER_DIR_REL)\"" >> $(CONFIG_HS) @echo "cGHC_TOUCHY_PGM = \"$(GHC_TOUCHY_PGM)\"" >> $(CONFIG_HS) @@ -259,9 +261,9 @@ stage1/$(PLATFORM_H) : stage_dirs $(FPTOOLS_TOP)/mk/config.mk Makefile @echo "#ifndef __PLATFORM_H__" >$@ @echo "#define __PLATFORM_H__" >>$@ @echo >> $@ - @echo "#define BuildPlatform_TYPE $(BuildPlatform_CPP)" >> $@ - @echo "#define HostPlatform_TYPE $(HostPlatform_CPP)" >> $@ - @echo "#define TargetPlatform_TYPE $(TargetPlatform_CPP)" >> $@ + @echo "#define BuildPlatform_NAME \"$(BUILDPLATFORM)\"" >> $@ + @echo "#define HostPlatform_NAME \"$(HOSTPLATFORM)\"" >> $@ + @echo "#define TargetPlatform_NAME \"$(TARGETPLATFORM)\"" >> $@ @echo >> $@ @echo "#define $(BuildPlatform_CPP)_BUILD 1" >> $@ @echo "#define $(HostPlatform_CPP)_HOST 1" >> $@ @@ -305,9 +307,9 @@ stage2/$(PLATFORM_H) : stage_dirs $(FPTOOLS_TOP)/mk/config.mk Makefile @echo "#ifndef __PLATFORM_H__" >$@ @echo "#define __PLATFORM_H__" >>$@ @echo >> $@ - @echo "#define BuildPlatform_TYPE $(HostPlatform_CPP)" >> $@ - @echo "#define HostPlatform_TYPE $(TargetPlatform_CPP)" >> $@ - @echo "#define TargetPlatform_TYPE $(TargetPlatform_CPP)" >> $@ + @echo "#define BuildPlatform_NAME \"$(HOSTPLATFORM)\"" >> $@ + @echo "#define HostPlatform_NAME \"$(TARGETPLATFORM)\"" >> $@ + @echo "#define TargetPlatform_NAME \"$(TARGETPLATFORM)\"" >> $@ @echo >> $@ @echo "#define $(HostPlatform_CPP)_BUILD 1" >> $@ @echo "#define $(TargetPlatform_CPP)_HOST 1" >> $@ @@ -557,11 +559,14 @@ ifeq "$(bootstrapped)" "YES" utils/Binary_HC_OPTS = -funbox-strict-fields endif -# BinIface and Binary take ages to both compile and run if you don's use -O +# 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 utils/FastMutInt_HC_OPTS += -O - +utils/Encoding_HC_OPTS += -O +utils/StringBuffer_HC_OPTS += -O +utils/FastString_HC_OPTS += -O # ---- Profiling ---- #simplCore/Simplify_HC_OPTS = -auto-all @@ -677,7 +682,11 @@ $(odir)/ghc-inplace : $(HS_PROG) ghc-inplace : stage1/ghc-inplace $(LN_S) -f $< $@ -CLEAN_FILES += $(odir)/ghc-inplace ghc-inplace +ifeq "$(stage)" "1" +CLEAN_FILES += ghc-inplace +endif + +CLEAN_FILES += $(odir)/ghc-inplace #----------------------------------------------------------------------------- # install @@ -752,6 +761,9 @@ VERSION = $(ProjectVersion) PKG_DEPENDS += base haskell98 PACKAGE_CPP_OPTS += -DPKG_DEPENDS='$(PKG_DEPENDS)' +# Omit Main from the library, the client will want to plug their own Main in +LIBOBJS = $(filter-out $(odir)/main/Main.o $(odir)/parser/hschooks.o, $(OBJS)) + # disable splitting: it won't really help with GHC, and the specialised # build system for ghc/compiler isn't set up to handle it. SplitObjs = NO