[Git][ghc/ghc][ghc-9.4] 3 commits: gitlab: Reintroduce Fedora 27 job

Ben Gamari (@bgamari) gitlab at gitlab.haskell.org
Sat Dec 24 20:20:58 UTC 2022



Ben Gamari pushed to branch ghc-9.4 at Glasgow Haskell Compiler / GHC


Commits:
0476f4e6 by Ben Gamari at 2022-12-22T17:09:46-05:00
gitlab: Reintroduce Fedora 27 job

- - - - -
34d1f0fb by Ben Gamari at 2022-12-23T10:30:21-05:00
compiler: Ensure that GHC toolchain is first in search path

As noted in #22561, it is important that GHC's toolchain look
first for its own headers and libraries to ensure that the
system's are not found instead. If this happens things can
break in surprising ways (e.g. see #22561).

(cherry picked from commit 8071efc307ba2df7362ff3b96c898afc61addc21)

- - - - -
cafe7594 by Ben Gamari at 2022-12-23T10:31:33-05:00
docs/relnotes: Mention #22561

- - - - -


5 changed files:

- .gitlab/gen_ci.hs
- .gitlab/jobs.yaml
- compiler/GHC/Settings/IO.hs
- docs/users_guide/9.4.4-notes.rst
- m4/fp_settings.m4


Changes:

=====================================
.gitlab/gen_ci.hs
=====================================
@@ -96,7 +96,7 @@ data Opsys
   | Windows deriving (Eq)
 
 data LinuxDistro
-  = Debian11 | Debian10 | Debian9 | Fedora33 | Ubuntu2004 | Centos7 | Alpine deriving (Eq)
+  = Debian11 | Debian10 | Debian9 | Fedora27 | Fedora33 | Ubuntu2004 | Centos7 | Alpine deriving (Eq)
 
 data Arch = Amd64 | AArch64 | ARMv7 | I386
 
@@ -221,6 +221,7 @@ distroName :: LinuxDistro -> String
 distroName Debian11  = "deb11"
 distroName Debian10   = "deb10"
 distroName Debian9   = "deb9"
+distroName Fedora27  = "fedora27"
 distroName Fedora33  = "fedora33"
 distroName Ubuntu2004 = "ubuntu20_04"
 distroName Centos7    = "centos7"
@@ -367,6 +368,12 @@ distroVariables Alpine = mconcat
 distroVariables Centos7 = mconcat [
   "HADRIAN_ARGS" =: "--docs=no-sphinx"
   ]
+distroVariables Fedora27 = mconcat
+  -- There is no reasonably new version of LLVM available on Fedora 27.
+  [ "LLC" =: "/bin/false"
+  , "OPT" =: "/bin/false"
+  , "HADRIAN_ARGS" =: "--docs=no-sphinx"
+  ]
 distroVariables Fedora33 = mconcat
   -- LLC/OPT do not work for some reason in our fedora images
   -- These tests fail with this error: T11649 T5681 T7571 T8131b
@@ -770,6 +777,7 @@ jobs = M.fromList $ concatMap flattenJobGroup $
      -- Fedora33 job is always built with perf so there's one job in the normal
      -- validate pipeline which is built with perf.
      , (standardBuildsWithConfig Amd64 (Linux Fedora33) releaseConfig)
+     , (standardBuildsWithConfig Amd64 (Linux Fedora27) releaseConfig)
      -- This job is only for generating head.hackage docs
      , hackage_doc_job (disableValidate (standardBuildsWithConfig Amd64 (Linux Fedora33) releaseConfig))
      , disableValidate (standardBuildsWithConfig Amd64 (Linux Fedora33) dwarf)


=====================================
.gitlab/jobs.yaml
=====================================
@@ -1385,6 +1385,68 @@
       "XZ_OPT": "-9"
     }
   },
+  "nightly-x86_64-linux-fedora27-release": {
+    "after_script": [
+      ".gitlab/ci.sh save_cache",
+      ".gitlab/ci.sh clean",
+      "cat ci_timings"
+    ],
+    "allow_failure": false,
+    "artifacts": {
+      "expire_in": "8 weeks",
+      "paths": [
+        "ghc-x86_64-linux-fedora27-release.tar.xz",
+        "junit.xml"
+      ],
+      "reports": {
+        "junit": "junit.xml"
+      },
+      "when": "always"
+    },
+    "cache": {
+      "key": "x86_64-linux-fedora27-$CACHE_REV",
+      "paths": [
+        "cabal-cache",
+        "toolchain"
+      ]
+    },
+    "dependencies": [],
+    "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora27:$DOCKER_REV",
+    "needs": [
+      {
+        "artifacts": false,
+        "job": "hadrian-ghc-in-ghci"
+      }
+    ],
+    "rules": [
+      {
+        "if": "($CI_MERGE_REQUEST_LABELS !~ /.*fast-ci.*/) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY) && (\"true\" == \"true\") && (\"true\" == \"true\") && (\"true\" == \"true\") && (\"true\" == \"true\")",
+        "when": "on_success"
+      }
+    ],
+    "script": [
+      "sudo chown ghc:ghc -R .",
+      ".gitlab/ci.sh setup",
+      ".gitlab/ci.sh configure",
+      ".gitlab/ci.sh build_hadrian",
+      ".gitlab/ci.sh test_hadrian"
+    ],
+    "stage": "full-build",
+    "tags": [
+      "x86_64-linux"
+    ],
+    "variables": {
+      "BIGNUM_BACKEND": "gmp",
+      "BIN_DIST_NAME": "ghc-x86_64-linux-fedora27-release",
+      "BUILD_FLAVOUR": "release",
+      "CONFIGURE_ARGS": "",
+      "HADRIAN_ARGS": "--docs=no-sphinx",
+      "LLC": "/bin/false",
+      "OPT": "/bin/false",
+      "TEST_ENV": "x86_64-linux-fedora27-release",
+      "XZ_OPT": "-9"
+    }
+  },
   "nightly-x86_64-linux-fedora33-release": {
     "after_script": [
       ".gitlab/ci.sh save_cache",
@@ -2548,6 +2610,69 @@
       "XZ_OPT": "-9"
     }
   },
+  "release-x86_64-linux-fedora27-release": {
+    "after_script": [
+      ".gitlab/ci.sh save_cache",
+      ".gitlab/ci.sh clean",
+      "cat ci_timings"
+    ],
+    "allow_failure": false,
+    "artifacts": {
+      "expire_in": "1 year",
+      "paths": [
+        "ghc-x86_64-linux-fedora27-release.tar.xz",
+        "junit.xml"
+      ],
+      "reports": {
+        "junit": "junit.xml"
+      },
+      "when": "always"
+    },
+    "cache": {
+      "key": "x86_64-linux-fedora27-$CACHE_REV",
+      "paths": [
+        "cabal-cache",
+        "toolchain"
+      ]
+    },
+    "dependencies": [],
+    "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora27:$DOCKER_REV",
+    "needs": [
+      {
+        "artifacts": false,
+        "job": "hadrian-ghc-in-ghci"
+      }
+    ],
+    "rules": [
+      {
+        "if": "($CI_MERGE_REQUEST_LABELS !~ /.*fast-ci.*/) && ($RELEASE_JOB == \"yes\") && ($NIGHTLY == null) && (\"true\" == \"true\") && (\"true\" == \"true\") && (\"true\" == \"true\") && (\"true\" == \"true\")",
+        "when": "on_success"
+      }
+    ],
+    "script": [
+      "sudo chown ghc:ghc -R .",
+      ".gitlab/ci.sh setup",
+      ".gitlab/ci.sh configure",
+      ".gitlab/ci.sh build_hadrian",
+      ".gitlab/ci.sh test_hadrian"
+    ],
+    "stage": "full-build",
+    "tags": [
+      "x86_64-linux"
+    ],
+    "variables": {
+      "BIGNUM_BACKEND": "gmp",
+      "BIN_DIST_NAME": "ghc-x86_64-linux-fedora27-release",
+      "BUILD_FLAVOUR": "release",
+      "CONFIGURE_ARGS": "",
+      "HADRIAN_ARGS": "--docs=no-sphinx",
+      "IGNORE_PERF_FAILURES": "all",
+      "LLC": "/bin/false",
+      "OPT": "/bin/false",
+      "TEST_ENV": "x86_64-linux-fedora27-release",
+      "XZ_OPT": "-9"
+    }
+  },
   "release-x86_64-linux-fedora33-release": {
     "after_script": [
       ".gitlab/ci.sh save_cache",
@@ -3805,6 +3930,67 @@
       "TEST_ENV": "x86_64-linux-deb9-validate"
     }
   },
+  "x86_64-linux-fedora27-release": {
+    "after_script": [
+      ".gitlab/ci.sh save_cache",
+      ".gitlab/ci.sh clean",
+      "cat ci_timings"
+    ],
+    "allow_failure": false,
+    "artifacts": {
+      "expire_in": "2 weeks",
+      "paths": [
+        "ghc-x86_64-linux-fedora27-release.tar.xz",
+        "junit.xml"
+      ],
+      "reports": {
+        "junit": "junit.xml"
+      },
+      "when": "always"
+    },
+    "cache": {
+      "key": "x86_64-linux-fedora27-$CACHE_REV",
+      "paths": [
+        "cabal-cache",
+        "toolchain"
+      ]
+    },
+    "dependencies": [],
+    "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora27:$DOCKER_REV",
+    "needs": [
+      {
+        "artifacts": false,
+        "job": "hadrian-ghc-in-ghci"
+      }
+    ],
+    "rules": [
+      {
+        "if": "($CI_MERGE_REQUEST_LABELS !~ /.*fast-ci.*/) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null) && (\"true\" == \"true\") && (\"true\" == \"true\") && (\"true\" == \"true\") && (\"true\" == \"true\")",
+        "when": "on_success"
+      }
+    ],
+    "script": [
+      "sudo chown ghc:ghc -R .",
+      ".gitlab/ci.sh setup",
+      ".gitlab/ci.sh configure",
+      ".gitlab/ci.sh build_hadrian",
+      ".gitlab/ci.sh test_hadrian"
+    ],
+    "stage": "full-build",
+    "tags": [
+      "x86_64-linux"
+    ],
+    "variables": {
+      "BIGNUM_BACKEND": "gmp",
+      "BIN_DIST_NAME": "ghc-x86_64-linux-fedora27-release",
+      "BUILD_FLAVOUR": "release",
+      "CONFIGURE_ARGS": "",
+      "HADRIAN_ARGS": "--docs=no-sphinx",
+      "LLC": "/bin/false",
+      "OPT": "/bin/false",
+      "TEST_ENV": "x86_64-linux-fedora27-release"
+    }
+  },
   "x86_64-linux-fedora33-release": {
     "after_script": [
       ".gitlab/ci.sh save_cache",


=====================================
compiler/GHC/Settings/IO.hs
=====================================
@@ -79,11 +79,11 @@ initSettings top_dir = do
   myExtraGccViaCFlags <- getSetting "GCC extra via C opts"
   cc_prog <- getToolSetting "C compiler command"
   cxx_prog <- getToolSetting "C++ compiler command"
-  cc_args_str <- getSetting "C compiler flags"
-  cxx_args_str <- getSetting "C++ compiler flags"
+  cc_args_str <- getToolSetting "C compiler flags"
+  cxx_args_str <- getToolSetting "C++ compiler flags"
   gccSupportsNoPie <- getBooleanSetting "C compiler supports -no-pie"
   cpp_prog <- getToolSetting "Haskell CPP command"
-  cpp_args_str <- getSetting "Haskell CPP flags"
+  cpp_args_str <- getToolSetting "Haskell CPP flags"
 
   platform <- either pgmError pure $ getTargetPlatform settingsFile mySettings
 
@@ -125,13 +125,13 @@ initSettings top_dir = do
 
 
   -- Other things being equal, as and ld are simply gcc
-  cc_link_args_str <- getSetting "C compiler link flags"
+  cc_link_args_str <- getToolSetting "C compiler link flags"
   let   as_prog  = cc_prog
         as_args  = map Option cc_args
         ld_prog  = cc_prog
         ld_args  = map Option (cc_args ++ words cc_link_args_str)
   ld_r_prog <- getToolSetting "Merge objects command"
-  ld_r_args <- getSetting "Merge objects flags"
+  ld_r_args <- getToolSetting "Merge objects flags"
   let ld_r
         | null ld_r_prog = Nothing
         | otherwise      = Just (ld_r_prog, map Option $ words ld_r_args)


=====================================
docs/users_guide/9.4.4-notes.rst
=====================================
@@ -20,6 +20,7 @@ Issues fixed in this release include:
 * Fix the :ghc-flag:`-fdefer-diagnostics`. (:ghc-ticket:`22391`)
 * Fixes to several subtle compiler panics. (:ghc-ticket:`22491`, :ghc-ticket:`22416`, :ghc-ticket:`22549`, :ghc-ticket:`22475`, :ghc-ticket:`22039`)
 * Add correct write barries to IORef operations. (:ghc-ticket:`22468`)
+* The toolchain provided with Windows binary distributions now searches for its own headers and libraries before those of the host system's msys2 installation (:ghc-ticket:`22561`)
 
 
 Included libraries


=====================================
m4/fp_settings.m4
=====================================
@@ -10,12 +10,12 @@ AC_DEFUN([FP_SETTINGS],
         # See Note [tooldir: How GHC finds mingw on Windows]
         mingw_bin_prefix='$$tooldir/mingw/bin/'
         SettingsCCompilerCommand="${mingw_bin_prefix}clang.exe"
-        SettingsCCompilerFlags="$CONF_CC_OPTS_STAGE2"
+        SettingsCCompilerFlags="$CONF_CC_OPTS_STAGE2 -I$$tooldir/mingw/include"
         SettingsCxxCompilerCommand="${mingw_bin_prefix}clang++.exe"
-        SettingsCxxCompilerFlags="$CONF_CXX_OPTS_STAGE2"
-        SettingsCCompilerLinkFlags="$CONF_GCC_LINKER_OPTS_STAGE2"
+        SettingsCxxCompilerFlags="$CONF_CXX_OPTS_STAGE2 -I$$tooldir/mingw/include"
+        SettingsCCompilerLinkFlags="$CONF_GCC_LINKER_OPTS_STAGE2 -L$$tooldir/mingw/lib -L$$tooldir/mingw/x86_64-w64-mingw32/lib"
         SettingsHaskellCPPCommand="${mingw_bin_prefix}clang.exe"
-        SettingsHaskellCPPFlags="$HaskellCPPArgs"
+        SettingsHaskellCPPFlags="$HaskellCPPArgs -I$$tooldir/mingw/include"
         SettingsLdCommand="${mingw_bin_prefix}ld.lld.exe"
         SettingsLdFlags=""
         # LLD does not support object merging (#21068)



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/87e87896bd640c39afeeb76189f989a8374f0e37...cafe75946c465dd20c324918807464e09f12ac2f

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/87e87896bd640c39afeeb76189f989a8374f0e37...cafe75946c465dd20c324918807464e09f12ac2f
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20221224/3ed2ac0d/attachment-0001.html>


More information about the ghc-commits mailing list