diff options
author | Ben Gamari <ben@smart-cactus.org> | 2018-11-26 17:21:12 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-03-05 22:22:40 -0500 |
commit | 37f257afcd6a52cf4d76c60d766b1aeb520b9f05 (patch) | |
tree | ac800e46fbf94c16ce39170f4a720637b07dde06 /mk | |
parent | 646b6dfbe125aa756a935e840979ba11b4a882c0 (diff) | |
download | haskell-37f257afcd6a52cf4d76c60d766b1aeb520b9f05.tar.gz |
Rip out object splitting
The splitter is an evil Perl script that processes assembler code.
Its job can be done better by the linker's --gc-sections flag. GHC
passes this flag to the linker whenever -split-sections is passed on
the command line.
This is based on @DemiMarie's D2768.
Fixes Trac #11315
Fixes Trac #9832
Fixes Trac #8964
Fixes Trac #8685
Fixes Trac #8629
Diffstat (limited to 'mk')
-rw-r--r-- | mk/config.mk.in | 32 | ||||
-rw-r--r-- | mk/flavours/bench-cross-ncg.mk | 1 | ||||
-rw-r--r-- | mk/flavours/bench-cross.mk | 1 | ||||
-rw-r--r-- | mk/flavours/bench-llvm.mk | 1 | ||||
-rw-r--r-- | mk/flavours/bench.mk | 1 | ||||
-rw-r--r-- | mk/flavours/devel1.mk | 1 | ||||
-rw-r--r-- | mk/flavours/devel2.mk | 1 | ||||
-rw-r--r-- | mk/flavours/perf-cross-ncg.mk | 1 | ||||
-rw-r--r-- | mk/flavours/perf-cross.mk | 1 | ||||
-rw-r--r-- | mk/flavours/perf-llvm.mk | 1 | ||||
-rw-r--r-- | mk/flavours/perf.mk | 1 | ||||
-rw-r--r-- | mk/flavours/prof-llvm.mk | 1 | ||||
-rw-r--r-- | mk/flavours/prof.mk | 1 | ||||
-rw-r--r-- | mk/flavours/quick-cross-ncg.mk | 1 | ||||
-rw-r--r-- | mk/flavours/quick-cross.mk | 1 | ||||
-rw-r--r-- | mk/flavours/quick-llvm.mk | 1 | ||||
-rw-r--r-- | mk/flavours/quick.mk | 1 | ||||
-rw-r--r-- | mk/flavours/quickest.mk | 1 | ||||
-rw-r--r-- | mk/flavours/validate.mk | 1 |
19 files changed, 1 insertions, 49 deletions
diff --git a/mk/config.mk.in b/mk/config.mk.in index 2bff8432e4..55fb808c5a 100644 --- a/mk/config.mk.in +++ b/mk/config.mk.in @@ -327,39 +327,9 @@ GhcLibHcOpts=-O2 -haddock StripLibraries=NO # ---------------------------------------------------------------------------- -# Object-file splitting -# -# Set SplitObjs=YES or NO in your build.mk -# -# Don't use -split-objs in in GhcLibHcOpts, because the build -# system needs to do other special magic if you are -# doing object-file splitting - -ArchSupportsSplitObjs=$(if $(filter \ - $(TargetArch_CPP),i386 x86_64 powerpc sparc),YES,NO)# - -# We used to support splitting on Darwin, but there is no point, since Darwin -# uses subsections via symbols -OsSupportsSplitObjs=$(if $(filter $(TargetOS_CPP),\ - mingw32 linux solaris2 freebsd dragonfly netbsd openbsd),YES,NO) -SplitObjsBroken = @SplitObjsBroken@ - -SupportsSplitObjs := $(if $(and $(filter YES,$(ArchSupportsSplitObjs)),\ - $(filter YES,$(OsSupportsSplitObjs)),\ - $(filter NO,$(SplitObjsBroken)),\ - $(filter YES,$(GhcWithNativeCodeGen))),YES,NO) - -# By default, enable SplitObjs for the libraries if this build supports it. -# Unless SplitSections is enabled - then let that take precedence. -SplitObjs = $(if $(and $(filter YES,$(SupportsSplitObjs)),\ - $(filter NO,$(SplitSections))),YES,NO) - -# ---------------------------------------------------------------------------- # Section splitting # -# Similar to -ffunction-sections -fdata-sections in GCC. Provides space saving -# like SplitObjs, but doesn't require post-processing and splitting of object -# files. +# Similar to -ffunction-sections -fdata-sections in GCC. # # Set SplitSections=YES or NO in your build.mk to override the default. # diff --git a/mk/flavours/bench-cross-ncg.mk b/mk/flavours/bench-cross-ncg.mk index 0d42938c24..1fc7b245a0 100644 --- a/mk/flavours/bench-cross-ncg.mk +++ b/mk/flavours/bench-cross-ncg.mk @@ -3,7 +3,6 @@ GhcStage1HcOpts = -O2 GhcStage2HcOpts = -O0 GhcLibHcOpts = -O2 BUILD_PROF_LIBS = NO -SplitObjs = NO SplitSections = NO HADDOCK_DOCS = NO BUILD_SPHINX_HTML = NO diff --git a/mk/flavours/bench-cross.mk b/mk/flavours/bench-cross.mk index ae67f34d17..7d1d4c4260 100644 --- a/mk/flavours/bench-cross.mk +++ b/mk/flavours/bench-cross.mk @@ -3,7 +3,6 @@ GhcStage1HcOpts = -O GhcStage2HcOpts = -O0 -fllvm GhcLibHcOpts = -O2 -fllvm BUILD_PROF_LIBS = NO -SplitObjs = NO SplitSections = NO HADDOCK_DOCS = NO BUILD_SPHINX_HTML = NO diff --git a/mk/flavours/bench-llvm.mk b/mk/flavours/bench-llvm.mk index 9b71005615..58fb92df21 100644 --- a/mk/flavours/bench-llvm.mk +++ b/mk/flavours/bench-llvm.mk @@ -3,7 +3,6 @@ GhcStage1HcOpts = -O GhcStage2HcOpts = -O0 GhcLibHcOpts = -O2 BUILD_PROF_LIBS = NO -SplitObjs = NO SplitSections = NO HADDOCK_DOCS = NO BUILD_SPHINX_HTML = NO diff --git a/mk/flavours/bench.mk b/mk/flavours/bench.mk index 73015aaf44..ecfc535178 100644 --- a/mk/flavours/bench.mk +++ b/mk/flavours/bench.mk @@ -3,7 +3,6 @@ GhcStage1HcOpts = -O2 GhcStage2HcOpts = -O0 GhcLibHcOpts = -O2 BUILD_PROF_LIBS = NO -SplitObjs = NO SplitSections = NO HADDOCK_DOCS = NO BUILD_SPHINX_HTML = NO diff --git a/mk/flavours/devel1.mk b/mk/flavours/devel1.mk index 8c8925c934..e062a57909 100644 --- a/mk/flavours/devel1.mk +++ b/mk/flavours/devel1.mk @@ -3,7 +3,6 @@ GhcStage1HcOpts = -O0 -DDEBUG GhcStage2HcOpts = -O GhcLibHcOpts = -O -dcore-lint BUILD_PROF_LIBS = NO -SplitObjs = NO SplitSections = NO HADDOCK_DOCS = NO BUILD_SPHINX_HTML = NO diff --git a/mk/flavours/devel2.mk b/mk/flavours/devel2.mk index dc8be47578..1c8e24f745 100644 --- a/mk/flavours/devel2.mk +++ b/mk/flavours/devel2.mk @@ -3,7 +3,6 @@ GhcStage1HcOpts = -O2 GhcStage2HcOpts = -O0 -DDEBUG GhcLibHcOpts = -O -dcore-lint BUILD_PROF_LIBS = NO -SplitObjs = NO SplitSections = NO HADDOCK_DOCS = NO BUILD_SPHINX_HTML = NO diff --git a/mk/flavours/perf-cross-ncg.mk b/mk/flavours/perf-cross-ncg.mk index 4b94c48805..56ecc79b13 100644 --- a/mk/flavours/perf-cross-ncg.mk +++ b/mk/flavours/perf-cross-ncg.mk @@ -3,7 +3,6 @@ GhcStage1HcOpts = -O2 GhcStage2HcOpts = -O2 GhcLibHcOpts = -O2 BUILD_PROF_LIBS = YES -#SplitObjs HADDOCK_DOCS = NO BUILD_SPHINX_HTML = NO BUILD_SPHINX_PDF = NO diff --git a/mk/flavours/perf-cross.mk b/mk/flavours/perf-cross.mk index f202642b7d..9e48ce9605 100644 --- a/mk/flavours/perf-cross.mk +++ b/mk/flavours/perf-cross.mk @@ -3,7 +3,6 @@ GhcStage1HcOpts = -O2 GhcStage2HcOpts = -O2 -fllvm GhcLibHcOpts = -O2 -fllvm BUILD_PROF_LIBS = YES -#SplitObjs HADDOCK_DOCS = NO BUILD_SPHINX_HTML = NO BUILD_SPHINX_PDF = NO diff --git a/mk/flavours/perf-llvm.mk b/mk/flavours/perf-llvm.mk index cd3d4f4a40..2598f4a40d 100644 --- a/mk/flavours/perf-llvm.mk +++ b/mk/flavours/perf-llvm.mk @@ -3,7 +3,6 @@ GhcStage1HcOpts = -O GhcStage2HcOpts = -O2 GhcLibHcOpts = -O2 BUILD_PROF_LIBS = YES -#SplitObjs #HADDOCK_DOCS #BUILD_SPHINX_HTML #BUILD_SPHINX_PDF diff --git a/mk/flavours/perf.mk b/mk/flavours/perf.mk index ec314bd589..ee856626ad 100644 --- a/mk/flavours/perf.mk +++ b/mk/flavours/perf.mk @@ -3,7 +3,6 @@ GhcStage1HcOpts = -O2 GhcStage2HcOpts = -O2 GhcLibHcOpts = -O2 BUILD_PROF_LIBS = YES -#SplitObjs #HADDOCK_DOCS #BUILD_SPHINX_HTML #BUILD_SPHINX_PDF diff --git a/mk/flavours/prof-llvm.mk b/mk/flavours/prof-llvm.mk index dcbd6a4bab..9c284432aa 100644 --- a/mk/flavours/prof-llvm.mk +++ b/mk/flavours/prof-llvm.mk @@ -3,7 +3,6 @@ GhcStage1HcOpts = -O GhcStage2HcOpts = -O GhcLibHcOpts = -O BUILD_PROF_LIBS = YES -SplitObjs = NO SplitSections = NO HADDOCK_DOCS = NO BUILD_SPHINX_HTML = NO diff --git a/mk/flavours/prof.mk b/mk/flavours/prof.mk index c7e0e2863f..6c4a6baac3 100644 --- a/mk/flavours/prof.mk +++ b/mk/flavours/prof.mk @@ -3,7 +3,6 @@ GhcStage1HcOpts = -O2 GhcStage2HcOpts = -O GhcLibHcOpts = -O BUILD_PROF_LIBS = YES -SplitObjs = NO HADDOCK_DOCS = NO BUILD_SPHINX_HTML = NO BUILD_SPHINX_PDF = NO diff --git a/mk/flavours/quick-cross-ncg.mk b/mk/flavours/quick-cross-ncg.mk index 5ca88c0208..471b37dc6b 100644 --- a/mk/flavours/quick-cross-ncg.mk +++ b/mk/flavours/quick-cross-ncg.mk @@ -3,7 +3,6 @@ GhcStage1HcOpts = -O2 GhcStage2HcOpts = -O0 GhcLibHcOpts = -O BUILD_PROF_LIBS = NO -SplitObjs = NO SplitSections = NO HADDOCK_DOCS = NO BUILD_SPHINX_HTML = NO diff --git a/mk/flavours/quick-cross.mk b/mk/flavours/quick-cross.mk index f0f00d28ac..98defa700c 100644 --- a/mk/flavours/quick-cross.mk +++ b/mk/flavours/quick-cross.mk @@ -3,7 +3,6 @@ GhcStage1HcOpts = -O GhcStage2HcOpts = -O0 -fllvm GhcLibHcOpts = -O -fllvm BUILD_PROF_LIBS = NO -SplitObjs = NO SplitSections = NO HADDOCK_DOCS = NO BUILD_SPHINX_HTML = NO diff --git a/mk/flavours/quick-llvm.mk b/mk/flavours/quick-llvm.mk index 8a5c5e1c26..9869041012 100644 --- a/mk/flavours/quick-llvm.mk +++ b/mk/flavours/quick-llvm.mk @@ -3,7 +3,6 @@ GhcStage1HcOpts = -O GhcStage2HcOpts = -O0 GhcLibHcOpts = -O BUILD_PROF_LIBS = NO -SplitObjs = NO SplitSections = NO HADDOCK_DOCS = NO BUILD_SPHINX_HTML = NO diff --git a/mk/flavours/quick.mk b/mk/flavours/quick.mk index 30322cd691..286cb2ed23 100644 --- a/mk/flavours/quick.mk +++ b/mk/flavours/quick.mk @@ -3,7 +3,6 @@ GhcStage1HcOpts = -O2 GhcStage2HcOpts = -O0 GhcLibHcOpts = -O BUILD_PROF_LIBS = NO -SplitObjs = NO SplitSections = NO HADDOCK_DOCS = NO BUILD_SPHINX_HTML = NO diff --git a/mk/flavours/quickest.mk b/mk/flavours/quickest.mk index 5204acb20f..5583748eb9 100644 --- a/mk/flavours/quickest.mk +++ b/mk/flavours/quickest.mk @@ -3,7 +3,6 @@ GhcStage1HcOpts = -O2 GhcStage2HcOpts = -O0 GhcLibHcOpts = -O0 BUILD_PROF_LIBS = NO -SplitObjs = NO SplitSections = NO HADDOCK_DOCS = NO BUILD_SPHINX_HTML = NO diff --git a/mk/flavours/validate.mk b/mk/flavours/validate.mk index a1470cd610..ba33584488 100644 --- a/mk/flavours/validate.mk +++ b/mk/flavours/validate.mk @@ -4,7 +4,6 @@ GhcStage1HcOpts = -O2 -DDEBUG GhcStage2HcOpts = -O -dcore-lint -dno-debug-output GhcLibHcOpts = -O -dcore-lint -dno-debug-output BUILD_PROF_LIBS = NO -SplitObjs = NO SplitSections = NO HADDOCK_DOCS = YES BUILD_SPHINX_HTML = YES |