[Git][ghc/ghc][master] 3 commits: Expand LLVM version matching regex for compability with bsd systems

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Thu Jun 27 11:57:46 UTC 2024



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
77ce65a5 by Matthew Pickering at 2024-06-27T07:57:14-04:00
Expand LLVM version matching regex for compability with bsd systems

sed on BSD systems (such as darwin) does not support the + operation.

Therefore we take the simple minded approach of manually expanding
group+ to groupgroup*.

Fixes #24999

- - - - -
bdfe4a9e by Matthew Pickering at 2024-06-27T07:57:14-04:00
ci: On darwin configure LLVMAS linker to match LLC and OPT toolchain

The version check was previously broken so the toolchain was not
detected at all.

- - - - -
07e03a69 by Matthew Pickering at 2024-06-27T07:57:15-04:00
Update nixpkgs commit for darwin toolchain

One dependency (c-ares) changed where it hosted the releases which
breaks the build with the old nixpkgs commit.

- - - - -


3 changed files:

- .gitlab/darwin/nix/sources.json
- .gitlab/darwin/toolchain.nix
- m4/find_llvm_prog.m4


Changes:

=====================================
.gitlab/darwin/nix/sources.json
=====================================
@@ -17,10 +17,10 @@
         "homepage": "",
         "owner": "nixos",
         "repo": "nixpkgs",
-        "rev": "73de017ef2d18a04ac4bfd0c02650007ccb31c2a",
-        "sha256": "1v9sy2i2dy3qksx4mf81gwzfl0jzpqccfkzq7fjxgq832f9d255i",
+        "rev": "2893f56de08021cffd9b6b6dfc70fd9ccd51eb60",
+        "sha256": "1anwxmjpm21msnnlrjdz19w31bxnbpn4kgf93sn3npihi7wf4a8h",
         "type": "tarball",
-        "url": "https://github.com/nixos/nixpkgs/archive/73de017ef2d18a04ac4bfd0c02650007ccb31c2a.tar.gz",
+        "url": "https://github.com/nixos/nixpkgs/archive/2893f56de08021cffd9b6b6dfc70fd9ccd51eb60.tar.gz",
         "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
     }
 }


=====================================
.gitlab/darwin/toolchain.nix
=====================================
@@ -36,6 +36,7 @@ let
       "AR=/usr/bin/ar"
       "LLC=${llvm}/bin/llc"
       "OPT=${llvm}/bin/opt"
+      "LLVMAS=${llvm_clang}/bin/clang"
       "CONF_CC_OPTS_STAGE2=--target=${targetTriple}"
       "CONF_CXX_OPTS_STAGE2=--target=${targetTriple}"
       "CONF_GCC_LINKER_OPTS_STAGE2=--target=${targetTriple}"
@@ -97,6 +98,7 @@ let
   fonts = with pkgs; makeFontsConf { fontDirectories = [ dejavu_fonts ]; };
 
   llvm = pkgs.llvm_15;
+  llvm_clang = pkgs.llvmPackages_15.clang-unwrapped;
 in
 pkgs.writeTextFile {
   name = "toolchain";
@@ -112,6 +114,7 @@ pkgs.writeTextFile {
     export GHC="${ghc}/bin/ghc"
     export LLC="${llvm}/bin/llc"
     export OPT="${llvm}/bin/opt"
+    export LLVMAS="${llvm_clang}/bin/clang"
     export SPHINXBUILD="${pkgs.python3Packages.sphinx}/bin/sphinx-build"
     export CABAL_INSTALL="${pkgs.cabal-install}/bin/cabal"
     export CABAL="$CABAL_INSTALL"


=====================================
m4/find_llvm_prog.m4
=====================================
@@ -14,7 +14,7 @@ AC_DEFUN([FIND_LLVM_PROG],[
     PROG_VERSION_CANDIDATES=$(for llvmVersion in `seq $(($4-1)) -1 $3`; do echo "$2-$llvmVersion $2-$llvmVersion.0 $2$llvmVersion"; done)
     AC_CHECK_TOOLS([$1], [$PROG_VERSION_CANDIDATES $2], [])
     AS_IF([test x"$$1" != x],[
-        PROG_VERSION=`$$1 --version | sed -n -e 's/.*version \(\([[0-9]]\+\.\)\+[[0-9]]\+\).*/\1/gp'`
+        PROG_VERSION=`$$1 --version | sed -n -e 's/.*version \(\([[0-9]][[0-9]]*\.\)\([[0-9]][[0-9]]*\.\)*[[0-9]][[0-9]]*\).*/\1/gp'`
         AS_IF([test x"$PROG_VERSION" = x],
           [AC_MSG_RESULT(no)
            $1=""



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b09446232771a1929fe2885bcf527b3d74168e3e...07e03a6931705b423ae3e96f0458cab82874468d

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b09446232771a1929fe2885bcf527b3d74168e3e...07e03a6931705b423ae3e96f0458cab82874468d
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/20240627/a964fcf1/attachment-0001.html>


More information about the ghc-commits mailing list