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 /compiler/main/SysTools.hs | |
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 'compiler/main/SysTools.hs')
-rw-r--r-- | compiler/main/SysTools.hs | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/compiler/main/SysTools.hs b/compiler/main/SysTools.hs index 9bbce19602..543dd9ce3b 100644 --- a/compiler/main/SysTools.hs +++ b/compiler/main/SysTools.hs @@ -139,7 +139,7 @@ initSysTools top_dir -- NB: top_dir is assumed to be in standard Unix -- format, '/' separated mtool_dir <- findToolDir top_dir - -- see Note [tooldir: How GHC finds mingw and perl on Windows] + -- see Note [tooldir: How GHC finds mingw on Windows] let installed :: FilePath -> FilePath installed file = top_dir </> file @@ -212,7 +212,6 @@ initSysTools top_dir ldSupportsBuildId <- getBooleanSetting "ld supports build-id" ldSupportsFilelist <- getBooleanSetting "ld supports filelist" ldIsGnuLd <- getBooleanSetting "ld is GNU ld" - perl_path <- getToolSetting "perl command" let pkgconfig_path = installed "package.conf.d" ghc_usage_msg_path = installed "ghc-usage.txt" @@ -222,9 +221,6 @@ initSysTools top_dir -- architecture-specific stuff is done when building Config.hs unlit_path = libexec cGHC_UNLIT_PGM - -- split is a Perl script - split_script = libexec cGHC_SPLIT_PGM - windres_path <- getToolSetting "windres command" libtool_path <- getToolSetting "libtool command" ar_path <- getToolSetting "ar command" @@ -234,15 +230,6 @@ initSysTools top_dir touch_path <- getToolSetting "touch command" - let -- On Win32 we don't want to rely on #!/bin/perl, so we prepend - -- a call to Perl to get the invocation of split. - -- On Unix, scripts are invoked using the '#!' method. Binary - -- installations of GHC on Unix place the correct line on the - -- front of the script at installation time, so we don't want - -- to wire-in our knowledge of $(PERL) on the host system here. - (split_prog, split_args) - | isWindowsHost = (perl_path, [Option split_script]) - | otherwise = (split_script, []) mkdll_prog <- getToolSetting "dllwrap command" let mkdll_args = [] @@ -297,7 +284,6 @@ initSysTools top_dir sPgm_P = (cpp_prog, cpp_args), sPgm_F = "", sPgm_c = (gcc_prog, gcc_args), - sPgm_s = (split_prog,split_args), sPgm_a = (as_prog, as_args), sPgm_l = (ld_prog, ld_args), sPgm_dll = (mkdll_prog,mkdll_args), |