Skip to content

Commit

Permalink
FIX #2832: Setting SplitObjs=NO doesn't disable -split-objs in GHC
Browse files Browse the repository at this point in the history
Now ghc --info reports whether-split-objs is supported, rather than
whether the libraries were built using -split-objs.
  • Loading branch information
simonmar committed Mar 11, 2009
1 parent 21c190f commit 0b2bbce
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion compiler/Makefile
Expand Up @@ -246,7 +246,7 @@ $(CONFIG_HS) : $(FPTOOLS_TOP)/mk/config.mk
@echo "cHscIfaceFileVersion :: String" >> $(CONFIG_HS)
@echo "cHscIfaceFileVersion = \"$(HscIfaceFileVersion)\"" >> $(CONFIG_HS)
@echo "cSplitObjs :: String" >> $(CONFIG_HS)
@echo "cSplitObjs = \"$(SplitObjs)\"" >> $(CONFIG_HS)
@echo "cSplitObjs = \"$(SupportsSplitObjs)\"" >> $(CONFIG_HS)
@echo "cGhcWithInterpreter :: String" >> $(CONFIG_HS)
@echo "cGhcWithInterpreter = \"$(GhcWithInterpreter)\"" >> $(CONFIG_HS)
@echo "cGhcWithNativeCodeGen :: String" >> $(CONFIG_HS)
Expand Down
19 changes: 12 additions & 7 deletions mk/config.mk.in
Expand Up @@ -441,14 +441,19 @@ PackageSourceURL = http://darcs.haskell.org/packages/$(PACKAGE)/%{FILE}
# system needs to do other special magic if you are
# doing object-file splitting

ArchSupportsSplitObjs=$(strip $(if $(filter $(TargetArch_CPP),i386 x86_64 powerpc sparc),YES,NO))

# lazy test, so that $(GhcUnregisterised) can be set in build.mk
SplitObjs=$(strip $(if $(filter $(TargetArch_CPP),i386 x86_64 powerpc sparc),\
$(if $(filter YES,$(BootingFromHC)),\
NO,\
$(if $(filter NO,$(GhcUnregisterised)),\
YES,\
NO)),\
NO))
SupportsSplitObjs=$(strip $(if $(filter YES,$(ArchSupportsSplitObjs)),\
$(if $(filter NO,$(BootingFromHc)),\
$(if $(filter NO,$(GhcUnregisterised)),\
YES,\
NO),\
NO),\
NO))

# By default, enable SplitObjs for the libraries if this build supports it
SplitObjs=$(SupportsSplitObjs)

# Math library
LIBM=@LIBM@
Expand Down

0 comments on commit 0b2bbce

Please sign in to comment.