X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=mk%2Fconfig.mk.in;h=4d93905e33dc7fc9803bf4dec282400f7dd827c0;hb=f2935c8466a1d88354b1be4a7ccf60dc90fb1e20;hp=5b04f6b3550672846ffc89bab93a8e52452b3ec7;hpb=99b6e6ac44c6c610b0d60e3b70a2341c83d23106;p=ghc-hetmet.git diff --git a/mk/config.mk.in b/mk/config.mk.in index 5b04f6b..4d93905 100644 --- a/mk/config.mk.in +++ b/mk/config.mk.in @@ -97,6 +97,16 @@ GhcStage1HcOpts= GhcStage2HcOpts=-O2 GhcStage3HcOpts=-O2 +# These options modify whether or not a built compiler for a bootstrap +# stage defaults to using the new code generation path. The new +# code generation path is a bit slower, so for development just +# GhcStage2DefaultNewCodegen=YES, but it's also a good idea to try +# building all libraries and the stage2 compiler with the +# new code generator, which involves GhcStage1DefaultNewCodegen=YES. +GhcStage1DefaultNewCodegen=NO +GhcStage2DefaultNewCodegen=NO +GhcStage3DefaultNewCodegen=NO + GhcDebugged=NO GhcDynamic=NO @@ -104,12 +114,18 @@ GhcDynamic=NO GhcProfiled=NO # Do we support shared libs? -PlatformSupportsSharedLibs = $(if $(filter $(TARGETPLATFORM),\ - i386-unknown-linux x86_64-unknown-linux \ +SharedLibsPlatformList = i386-unknown-linux x86_64-unknown-linux \ i386-unknown-freebsd x86_64-unknown-freebsd \ i386-unknown-openbsd x86_64-unknown-openbsd \ i386-unknown-mingw32 \ - i386-apple-darwin powerpc-apple-darwin),YES,NO) + i386-apple-darwin powerpc-apple-darwin + +ifeq ($(SOLARIS_BROKEN_SHLD), NO) +SharedLibsPlatformList := $(SharedLibsPlatformList) i386-unknown-solaris2 +endif + +PlatformSupportsSharedLibs = $(if $(filter $(TARGETPLATFORM),\ + $(SharedLibsPlatformList)),YES,NO) # Build a compiler that will build *unregisterised* libraries and # binaries by default. Unregisterised code is supposed to compile and @@ -145,9 +161,6 @@ GhcWithNativeCodeGen=$(strip\ $(if $(filter YESYESNO,\ $(OsSupportsNCG)$(ArchSupportsNCG)$(GhcUnregisterised)),YES,NO)) -# Build a compiler with the llvm code generator backend -GhcWithLlvmCodeGen=NO - HaveLibDL = @HaveLibDL@ # ArchSupportsSMP should be set iff there is support for that arch in @@ -296,13 +309,14 @@ PackageSourceURL = http://darcs.haskell.org/packages/$(PACKAGE)/%{FILE} # doing object-file splitting ArchSupportsSplitObjs=$(strip $(if $(filter $(TargetArch_CPP),i386 x86_64 powerpc sparc),YES,NO)) -# Object splitting is disabled on darwin due to #4013 -OsSupportsSplitObjs=$(strip $(if $(filter $(TargetOS_CPP),mingw32 cygwin32 linux solaris2 freebsd dragonfly netbsd openbsd),YES,NO)) +OsSupportsSplitObjs=$(strip $(if $(filter $(TargetOS_CPP),mingw32 cygwin32 linux darwin solaris2 freebsd dragonfly netbsd openbsd),YES,NO)) +SplitObjsBroken = @SplitObjsBroken@ # lazy test, so that $(GhcUnregisterised) can be set in build.mk SupportsSplitObjs=$(strip \ $(if $(and $(filter YES,$(ArchSupportsSplitObjs)),\ $(filter YES,$(OsSupportsSplitObjs)),\ + $(filter NO,$(SplitObjsBroken)),\ $(filter NO,$(BootingFromHc)),\ $(filter NO,$(GhcUnregisterised))),\ YES,NO)) @@ -426,7 +440,6 @@ GHC_HP2PS_PGM = hp2ps$(exeext) GHC_GHCTAGS_PGM = ghctags$(exeext) GHC_HSC2HS_PGM = hsc2hs$(exeext) GHC_TOUCHY_PGM = touchy$(exeext) -GHC_MANGLER_PGM = ghc-asm GHC_SPLIT_PGM = ghc-split GHC_SYSMAN_PGM = SysMan GHC_GENPRIMOP_PGM = genprimopcode$(exeext) @@ -436,7 +449,6 @@ GHC_PKG_PGM = ghc-pkg$(exeext) GHC_LTX_PGM = ltx$(exeext) GHC_MKDIRHIER_PGM = mkdirhier GHC_LNDIR_PGM = lndir -GHC_DUMMY_GHC_PGM = dummy-ghc$(exeext) ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32" GHC_CP = "xcopy /y" @@ -447,7 +459,6 @@ GHC_PERL = $(PERL) endif HP2PS = $(GHC_HP2PS_DIR)/$(GHC_HP2PS_PGM) -MANGLER = $(INPLACE_LIB)/$(GHC_MANGLER_PGM) SPLIT = $(INPLACE_LIB)/$(GHC_SPLIT_PGM) SYSMAN = $(GHC_SYSMAN_DIR)/$(GHC_SYSMAN_PGM) LTX = $(GHC_LTX_DIR)/$(GHC_LTX_PGM) @@ -462,7 +473,6 @@ GHC_PKG_INPLACE = $(INPLACE_BIN)/$(GHC_PKG_PGM) GHCTAGS_INPLACE = $(INPLACE_BIN)/$(GHC_GHCTAGS_PGM) HSC2HS_INPLACE = $(INPLACE_BIN)/$(GHC_HSC2HS_PGM) GENPRIMOP_INPLACE = $(INPLACE_BIN)/$(GHC_GENPRIMOP_PGM) -DUMMY_GHC_INPLACE = $(INPLACE_BIN)/$(GHC_DUMMY_GHC_PGM) GENERATED_FILE = chmod a-w EXECUTABLE_FILE = chmod +x @@ -530,18 +540,10 @@ endif # the flag --with-gcc= instead. The reason is that the configure script # needs to know which gcc you're using in order to perform its tests. -HaveGcc = @HaveGcc@ -UseGcc = YES WhatGccIsCalled = @WhatGccIsCalled@ GccVersion = @GccVersion@ -GccLT34 = @GccLT34@ -ifeq "$(strip $(HaveGcc))" "YES" -ifneq "$(strip $(UseGcc))" "YES" - CC = cc -else - CC = $(WhatGccIsCalled) -endif -endif +GccLT34 = @GccLT34@ +CC = $(WhatGccIsCalled) # C compiler and linker flags from configure (e.g. -m to select # correct C compiler backend). The stage number is the stage of GHC @@ -549,9 +551,12 @@ endif CONF_CC_OPTS_STAGE0 = @CONF_CC_OPTS_STAGE0@ CONF_CC_OPTS_STAGE1 = @CONF_CC_OPTS_STAGE1@ CONF_CC_OPTS_STAGE2 = @CONF_CC_OPTS_STAGE2@ -CONF_LD_OPTS_STAGE0 = @CONF_LD_OPTS_STAGE0@ -CONF_LD_OPTS_STAGE1 = @CONF_LD_OPTS_STAGE1@ -CONF_LD_OPTS_STAGE2 = @CONF_LD_OPTS_STAGE2@ +CONF_GCC_LINKER_OPTS_STAGE0 = @CONF_GCC_LINKER_OPTS_STAGE0@ +CONF_GCC_LINKER_OPTS_STAGE1 = @CONF_GCC_LINKER_OPTS_STAGE1@ +CONF_GCC_LINKER_OPTS_STAGE2 = @CONF_GCC_LINKER_OPTS_STAGE2@ +CONF_LD_LINKER_OPTS_STAGE0 = @CONF_LD_LINKER_OPTS_STAGE0@ +CONF_LD_LINKER_OPTS_STAGE1 = @CONF_LD_LINKER_OPTS_STAGE1@ +CONF_LD_LINKER_OPTS_STAGE2 = @CONF_LD_LINKER_OPTS_STAGE2@ CONF_CPP_OPTS_STAGE0 = @CONF_CPP_OPTS_STAGE0@ CONF_CPP_OPTS_STAGE1 = @CONF_CPP_OPTS_STAGE1@ CONF_CPP_OPTS_STAGE2 = @CONF_CPP_OPTS_STAGE2@ @@ -560,6 +565,12 @@ ifeq "$(TARGETPLATFORM)" "ia64-unknown-linux" CONF_CC_OPTS += -G0 endif +# The .hsc files aren't currently safe for cross-compilation on Windows: +# libraries\haskeline\.\System\Console\Haskeline\Backend\Win32.hsc:160 +# directive "let" is not safe for cross-compilation +ifneq "$(Windows)" "YES" +SRC_HSC2HS_OPTS += --cross-safe +endif SRC_HSC2HS_OPTS += $(addprefix --cflag=,$(filter-out -O,$(SRC_CC_OPTS) $(CONF_CC_OPTS_STAGE0))) SRC_HSC2HS_OPTS += $(foreach d,$(GMP_INCLUDE_DIRS),-I$(d)) @@ -600,16 +611,18 @@ CTAGS = $(ETAGS) RAWCPP_FLAGS = -undef -traditional FIND = @FindCmd@ SORT = @SortCmd@ -INSTALL = @INSTALL@ + # # Sigh - the autoconf macro for INSTALL will subst a relative path to the fallback # install-sh script (if chosen). This not terribly useful to us, so we convert # it into an abs. path. # +INSTALL = @INSTALL@ INSTALL := $(subst .././install-sh,$(TOP)/install-sh,$(INSTALL)) + LATEX = latex -PDFLATEX = pdflatex -BIBTEX = bibtex +PDFLATEX = pdflatex +BIBTEX = bibtex LN_S = @LN_S@ MV = mv NROFF = nroff @@ -623,6 +636,7 @@ TR = tr SHELL = /bin/sh HaveDtrace = @HaveDtrace@ +USE_DTRACE = $(HaveDtrace) DTRACE = @DtraceCmd@ LD = @LdCmd@ @@ -637,6 +651,10 @@ LD_X = @LdXFlag@ # overflowing command-line length limits. LdIsGNULd = @LdIsGNULd@ +# Set to YES if ld has the --build-id flag. Sometimes we need to +# disable it with --build-id=none. +LdHasBuildId = @LdHasBuildId@ + # On MSYS, building with SplitObjs=YES fails with # ar: Bad file number # see #3201. We need to specify a smaller max command-line size @@ -724,10 +742,6 @@ HAPPY_VERSION = @HappyVersion@ # SRC_HAPPY_OPTS = -agc --strict -# Temp. to work around performance problems in the HEAD around 8/12/2003, -# A Happy compiled with this compiler needs more stack. -SRC_HAPPY_OPTS += +RTS -K2m -RTS - # # Alex #