From 4611341b430576394fe7a253b36c0df288dc1536 Mon Sep 17 00:00:00 2001 From: GHC GitLab CI Date: Fri, 17 Sep 2021 08:58:34 -0400 Subject: hadrian: Pass CFLAGS to gmp configure --- hadrian/src/Rules/Gmp.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hadrian/src/Rules/Gmp.hs b/hadrian/src/Rules/Gmp.hs index 6d89a5b0e9..985f13ef29 100644 --- a/hadrian/src/Rules/Gmp.hs +++ b/hadrian/src/Rules/Gmp.hs @@ -8,6 +8,8 @@ import Packages import Target import Utilities import Hadrian.BuildPath +import Hadrian.Expression +import Settings.Builders.Common (cArgs) -- | Build in-tree GMP library objects (if GmpInTree flag is set) and return -- their paths. @@ -117,8 +119,10 @@ gmpRules = do let gmpBuildP = takeDirectory mk gmpP = takeDirectory gmpBuildP ctx <- makeGmpPathContext gmpP + cFlags <- interpretInContext ctx $ mconcat [ cArgs, getStagedSettingList ConfCcArgs ] env <- sequence [ builderEnvironment "CC" $ Cc CompileC (stage ctx) + , return . AddEnv "CFLAGS" $ unwords cFlags , builderEnvironment "AR" (Ar Unpack (stage ctx)) , builderEnvironment "NM" Nm ] -- cgit v1.2.1