From ee1fe1b08980dc3897d47cdbbd3d7628f279f4fb Mon Sep 17 00:00:00 2001 From: Erik de Castro Lopo Date: Mon, 18 Sep 2023 11:24:59 +1000 Subject: [PATCH] Chain configuration of ldProgram `ldProgram` gets configured in two places, a seemingly default and a GHC specific version. The later needs to be updated so that it first calls the default configuration and then the new GHC version. --- Cabal/src/Distribution/Simple/GHC/Internal.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Cabal/src/Distribution/Simple/GHC/Internal.hs b/Cabal/src/Distribution/Simple/GHC/Internal.hs index e5f8938fc41..40499d08485 100644 --- a/Cabal/src/Distribution/Simple/GHC/Internal.hs +++ b/Cabal/src/Distribution/Simple/GHC/Internal.hs @@ -114,7 +114,9 @@ configureToolchain _implInfo ghcProg ghcInfo = . addKnownProgram ldProgram { programFindLocation = findProg ldProgramName extraLdPath - , programPostConf = configureLd + , programPostConf = \v cp -> + -- Call any existing configuration first and then add any new configuration + configureLd v =<< programPostConf ldProgram v cp } . addKnownProgram arProgram