diff options
author | Ben Gamari <ben@smart-cactus.org> | 2022-03-29 12:26:50 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-04-25 10:19:29 -0400 |
commit | 9420d26b4b9dd42238d3ec2a92abe0552d37775e (patch) | |
tree | 83ab1953b68e9a6bf17dfcdefe66894411d1a197 /compiler | |
parent | cb71226f9537e542c6eadb90d8006e525c941605 (diff) | |
download | haskell-9420d26b4b9dd42238d3ec2a92abe0552d37775e.tar.gz |
Drop libtool path from settings file
GHC no longers uses libtool for linking and therefore this is no longer
necessary.
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/GHC/Driver/Session.hs | 7 | ||||
-rw-r--r-- | compiler/GHC/Settings.hs | 4 | ||||
-rw-r--r-- | compiler/GHC/Settings/IO.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/SysTools/Ar.hs | 11 | ||||
-rw-r--r-- | compiler/GHC/SysTools/Tasks.hs | 9 |
5 files changed, 7 insertions, 26 deletions
diff --git a/compiler/GHC/Driver/Session.hs b/compiler/GHC/Driver/Session.hs index 00e7c726dd..c9a785b4f5 100644 --- a/compiler/GHC/Driver/Session.hs +++ b/compiler/GHC/Driver/Session.hs @@ -98,7 +98,6 @@ module GHC.Driver.Session ( sPgm_dll, sPgm_T, sPgm_windres, - sPgm_libtool, sPgm_ar, sPgm_ranlib, sPgm_lo, @@ -132,7 +131,7 @@ module GHC.Driver.Session ( versionedAppDir, versionedFilePath, extraGccViaCFlags, globalPackageDatabasePath, pgm_L, pgm_P, pgm_F, pgm_c, pgm_a, pgm_l, pgm_lm, pgm_dll, pgm_T, - pgm_windres, pgm_libtool, pgm_ar, pgm_otool, pgm_install_name_tool, + pgm_windres, pgm_ar, pgm_otool, pgm_install_name_tool, pgm_ranlib, pgm_lo, pgm_lc, pgm_lcc, pgm_i, opt_L, opt_P, opt_F, opt_c, opt_cxx, opt_a, opt_l, opt_lm, opt_i, opt_P_signature, @@ -829,8 +828,6 @@ pgm_T :: DynFlags -> String pgm_T dflags = toolSettings_pgm_T $ toolSettings dflags pgm_windres :: DynFlags -> String pgm_windres dflags = toolSettings_pgm_windres $ toolSettings dflags -pgm_libtool :: DynFlags -> String -pgm_libtool dflags = toolSettings_pgm_libtool $ toolSettings dflags pgm_lcc :: DynFlags -> (String,[Option]) pgm_lcc dflags = toolSettings_pgm_lcc $ toolSettings dflags pgm_ar :: DynFlags -> String @@ -2145,8 +2142,6 @@ dynamic_flags_deps = [ $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_dll = (f,[]) } , make_ord_flag defFlag "pgmwindres" $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_windres = f } - , make_ord_flag defFlag "pgmlibtool" - $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_libtool = f } , make_ord_flag defFlag "pgmar" $ hasArg $ \f -> alterToolSettings $ \s -> s { toolSettings_pgm_ar = f } , make_ord_flag defFlag "pgmotool" diff --git a/compiler/GHC/Settings.hs b/compiler/GHC/Settings.hs index 92bfa75699..e6226696dc 100644 --- a/compiler/GHC/Settings.hs +++ b/compiler/GHC/Settings.hs @@ -34,7 +34,6 @@ module GHC.Settings , sPgm_dll , sPgm_T , sPgm_windres - , sPgm_libtool , sPgm_ar , sPgm_otool , sPgm_install_name_tool @@ -108,7 +107,6 @@ data ToolSettings = ToolSettings , toolSettings_pgm_dll :: (String, [Option]) , toolSettings_pgm_T :: String , toolSettings_pgm_windres :: String - , toolSettings_pgm_libtool :: String , toolSettings_pgm_ar :: String , toolSettings_pgm_otool :: String , toolSettings_pgm_install_name_tool :: String @@ -222,8 +220,6 @@ sPgm_T :: Settings -> String sPgm_T = toolSettings_pgm_T . sToolSettings sPgm_windres :: Settings -> String sPgm_windres = toolSettings_pgm_windres . sToolSettings -sPgm_libtool :: Settings -> String -sPgm_libtool = toolSettings_pgm_libtool . sToolSettings sPgm_ar :: Settings -> String sPgm_ar = toolSettings_pgm_ar . sToolSettings sPgm_otool :: Settings -> String diff --git a/compiler/GHC/Settings/IO.hs b/compiler/GHC/Settings/IO.hs index 8e23706410..308c5447e1 100644 --- a/compiler/GHC/Settings/IO.hs +++ b/compiler/GHC/Settings/IO.hs @@ -107,7 +107,6 @@ initSettings top_dir = do unlit_path <- getToolSetting "unlit command" windres_path <- getToolSetting "windres command" - libtool_path <- getToolSetting "libtool command" ar_path <- getToolSetting "ar command" otool_path <- getToolSetting "otool command" install_name_tool_path <- getToolSetting "install_name_tool command" @@ -180,7 +179,6 @@ initSettings top_dir = do , toolSettings_pgm_dll = (mkdll_prog,mkdll_args) , toolSettings_pgm_T = touch_path , toolSettings_pgm_windres = windres_path - , toolSettings_pgm_libtool = libtool_path , toolSettings_pgm_ar = ar_path , toolSettings_pgm_otool = otool_path , toolSettings_pgm_install_name_tool = install_name_tool_path diff --git a/compiler/GHC/SysTools/Ar.hs b/compiler/GHC/SysTools/Ar.hs index daed11f432..ab4e02cf42 100644 --- a/compiler/GHC/SysTools/Ar.hs +++ b/compiler/GHC/SysTools/Ar.hs @@ -1,8 +1,9 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings, GeneralizedNewtypeDeriving #-} -{- Note: [The need for Ar.hs] -Building `-staticlib` required the presence of libtool, and was a such -restricted to mach-o only. As libtool on macOS and gnu libtool are very +{- Note [The need for Ar.hs] + ~~~~~~~~~~~~~~~~~~~~~~~~~ +Building `-staticlib` previously required the presence of libtool, and was a +such restricted to mach-o only. As libtool on macOS and gnu libtool are very different, there was no simple portable way to support this. libtool for static archives does essentially: concatinate the input archives, @@ -11,9 +12,9 @@ fails as even `ar` (bsd and gnu, llvm, ...) do not provide the same features across platforms (e.g. index prefixed retrieval of objects with the same name.) -As Archives are rather simple structurally, we can just build the archives +As archives are rather simple structurally, we can just build the archives with Haskell directly and use ranlib on the final result to get the symbol -index. This should allow us to work around with the differences/abailability +index. This should allow us to work around with the differences/availability of libtool across different platforms. -} module GHC.SysTools.Ar diff --git a/compiler/GHC/SysTools/Tasks.hs b/compiler/GHC/SysTools/Tasks.hs index d6532a6234..9b4400903e 100644 --- a/compiler/GHC/SysTools/Tasks.hs +++ b/compiler/GHC/SysTools/Tasks.hs @@ -342,15 +342,6 @@ runMergeObjects logger tmpfs dflags args = else do runSomething logger "Merge objects" p args2 -runLibtool :: Logger -> DynFlags -> [Option] -> IO () -runLibtool logger dflags args = traceToolCommand logger "libtool" $ do - linkargs <- neededLinkArgs `fmap` getLinkerInfo logger dflags - let args1 = map Option (getOpts dflags opt_l) - args2 = [Option "-static"] ++ args1 ++ args ++ linkargs - libtool = pgm_libtool dflags - mb_env <- getGccEnv args2 - runSomethingFiltered logger id "Libtool" libtool args2 Nothing mb_env - runAr :: Logger -> DynFlags -> Maybe FilePath -> [Option] -> IO () runAr logger dflags cwd args = traceToolCommand logger "ar" $ do let ar = pgm_ar dflags |