X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Flib%2Fstd%2FMakefile;h=8a7c780dd41f6c4ad0c70c491b6370175e2bb4dc;hb=6705e0ed6b24ec0bec7517f1386a37db928e5e13;hp=840302d9f23efcc61fc7663e551c10dcfe1aa3f4;hpb=c5467fbf3e79690f9c44ba2a144b746098d32a28;p=ghc-hetmet.git diff --git a/ghc/lib/std/Makefile b/ghc/lib/std/Makefile index 840302d..8a7c780 100644 --- a/ghc/lib/std/Makefile +++ b/ghc/lib/std/Makefile @@ -34,11 +34,13 @@ endif PACKAGE = std BOOT_SRCS += PrelPrimopWrappers.hs +CLEAN_FILES += PrelPrimopWrappers.hs #----------------------------------------------------------------------------- # Setting the GHC compile options -SRC_HC_OPTS += -cpp -fglasgow-exts $(GhcLibHcOpts) +# -fvia-C added because NCG still can't cope with some primops used in the standard library +SRC_HC_OPTS += -fvia-C -cpp -fglasgow-exts $(GhcLibHcOpts) SRC_HSC2HS_OPTS += -Icbits ifdef USE_REPORT_PRELUDE @@ -56,8 +58,6 @@ PrelIO_HC_OPTS += -fno-ignore-asserts # Special options PrelStorable_HC_OPTS = -monly-3-regs PrelCError_HC_OPTS = +RTS -K4m -RTS -PrelInt_HC_OPTS = -monly-3-regs -PrelWord_HC_OPTS = -monly-3-regs #----------------------------------------------------------------------------- # Dependency generation @@ -65,12 +65,19 @@ PrelWord_HC_OPTS = -monly-3-regs SRC_MKDEPENDHS_OPTS += -I$(GHC_INCLUDE_DIR) #----------------------------------------------------------------------------- +# Pre-processing (.pp) files +SRC_CPP_OPTS += -I$(GHC_INCLUDE_DIR) -traditional +SRC_CPP_OPTS += ${GhcLibCppOpts} + +#----------------------------------------------------------------------------- # Rules PrelPrimopWrappers.hs: ../../compiler/prelude/primops.txt - rm -f PrelPrimopWrappers.hs - ../../utils/genprimopcode/genprimopcode --make-haskell-wrappers \ - < ../../compiler/prelude/primops.txt > PrelPrimopWrappers.hs + rm -f $@ + ../../utils/genprimopcode/genprimopcode --make-haskell-wrappers < $< > $@ + +PrelGHC.$(way_)hi : PrelGHC.hi-boot + cp $< $@ boot :: PrelGHC.hi $(foreach way, $(WAYS), PrelGHC.$(way)_hi) @@ -88,7 +95,7 @@ HS_SRCS := $(filter-out PrelMain.lhs, $(HS_SRCS)) all :: PrelMain.dll_o endif -CLEAN_FILES += PrelGHC.hi $(foreach way, $(WAYS), PrelGHC.$(way)_hi) +CLEAN_FILES += PrelGHC.hi-boot PrelGHC.hi $(foreach way, $(WAYS), PrelGHC.$(way)_hi) #----------------------------------------------------------------------------- @@ -103,6 +110,8 @@ CLEAN_FILES += PrelGHC.hi $(foreach way, $(WAYS), PrelGHC.$(way)_hi) # we don't want PrelMain in the GHCi library. GHCI_LIBOBJS = $(filter-out PrelMain.$(way_)o,$(HS_OBJS)) +# Turn off standard rule which creates HSstd.o from LIBOBJS. +DONT_WANT_STD_GHCI_LIB_RULE=YES ifneq "$(TARGETPLATFORM)" "i386-unknown-mingw32" # Standard rule @@ -112,14 +121,14 @@ HSstd.o :: $(GHCI_LIBOBJS) else # Rule for Win32 platform # Keep HSstd.o as a pseudo-target (I think) + HSstd.o :: $(GHCI_LIBOBJS) ld -r -x -o HSstd1.o $(filter Prel%, $(GHCI_LIBOBJS)) ld -r -x -o HSstd2.o $(filter-out Prel%, $(GHCI_LIBOBJS)) + @touch HSstd.o endif # TARGETPLATFORM = i386-unknown-mingw32 - - #----------------------------------------------------------------------------- # Installation; need to install .hi files as well as libraries # @@ -172,7 +181,7 @@ ilxcheck: ifeq "$(ILXized)" "YES" -SRC_HC_OPTS += -optI--assembly-name -optIstd.$(way_)o -optI--module +SRC_HC_OPTS += -optI--assembly-name -optIstd.$(way_)o -optI--module -DILX HS_ILX+=PrelGHC.$(way_)o PrelGHC.$(way_)o: PrelGHC.ilx.real @@ -181,21 +190,11 @@ PrelGHC.$(way_)o: PrelGHC.ilx.real $(ILASM) /QUIET /DLL /OUT=$@ $@.il # mv $@.tmp $@ -PrelGHC.$(way_)hi: PrelGHC.hi-boot - cp $< $@ - -std.dll: $(HS_OBJS) - al -out:$@ $(HS_OBJS) - std.$(way_)mvl: $(HS_IL) ((ILVALID_HOME=c:\\devel\\fcom\\src\\ ILVALID_MSCORLIB=mscorlib.vlb $(ILVALID) c:\\devel\\fcom\\src\\bin\\msilxlib$(ilx2il_suffix).vlb $(HS_IL)) 2>&1) | tee $@ std.$(way_)vlb: std.dll -# echo "call devcorb2gen fastchecked" > tmp.bat - echo "copy c:\\devel\\fcom\\bin\\msilxlib.$(ILX_WAY).dll msilxlib.$(ILX_WAY).dll" > tmp.bat - echo "copy c:\\devel\\fcom\\bin\\mkvlb.exe ." >> tmp.bat - echo "copy c:\\devel\\fcom\\bin\\mkvlb.pdb ." >> tmp.bat - echo ".\\mkvlb.exe -V -o $@.tmp std" >> tmp.bat + mkvlb.exe -V -o $@.tmp std cmd /c tmp.bat mv $@.tmp $@ @@ -214,3 +213,6 @@ endif # ILXized include $(TOP)/mk/target.mk + +# PrelIO.hsc includes PrelHandle_hsc.h +PrelIO.hsc : PrelHandle_hsc.h