From dfca2c285e624920db08f616072d518b9a7cac97 Mon Sep 17 00:00:00 2001 From: YI Zeping <18586016708@163.com> Date: Thu, 11 Apr 2024 11:04:58 +0800 Subject: [PATCH] Packages: llvm cxx flag remove, new versions, and binutils build issue fix (#43567) * add c++11 header to gold for compiler not defaulting to c++11 * glibc: add 2.39 * llvm: add 18.1.3 * fix #42314, remove cxx11 flag for llvm; should be controlled by cmake. * modify patch * llvm version * add gmake version request --- .../repos/builtin/packages/binutils/gold-gcc4.patch | 12 ++++++++++++ var/spack/repos/builtin/packages/binutils/package.py | 1 + var/spack/repos/builtin/packages/glibc/package.py | 3 +++ var/spack/repos/builtin/packages/llvm/package.py | 6 ++---- 4 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 var/spack/repos/builtin/packages/binutils/gold-gcc4.patch diff --git a/var/spack/repos/builtin/packages/binutils/gold-gcc4.patch b/var/spack/repos/builtin/packages/binutils/gold-gcc4.patch new file mode 100644 index 0000000000..b11a5fe8c8 --- /dev/null +++ b/var/spack/repos/builtin/packages/binutils/gold-gcc4.patch @@ -0,0 +1,12 @@ +diff --git a/gold/merge.cc b/gold/merge.cc +index ca15149..a270bc0 100644 +--- a/gold/merge.cc ++++ b/gold/merge.cc +@@ -24,6 +24,7 @@ + + #include + #include ++#include + + #include "merge.h" + #include "compressed_output.h" diff --git a/var/spack/repos/builtin/packages/binutils/package.py b/var/spack/repos/builtin/packages/binutils/package.py index e396b49e16..46564e2c03 100644 --- a/var/spack/repos/builtin/packages/binutils/package.py +++ b/var/spack/repos/builtin/packages/binutils/package.py @@ -126,6 +126,7 @@ class Binutils(AutotoolsPackage, GNUMirrorPackage): # 2.36 is missing some dependencies, this patch allows a parallel build. # https://sourceware.org/bugzilla/show_bug.cgi?id=27482 patch("parallel-build-2.36.patch", when="@2.36") + patch("gold-gcc4.patch", when="@2.42 %gcc@:4.8.5") # compression libs for debug symbols. # pkg-config is used to find zstd in gas/configure diff --git a/var/spack/repos/builtin/packages/glibc/package.py b/var/spack/repos/builtin/packages/glibc/package.py index 471eb0345d..c5a1709efa 100644 --- a/var/spack/repos/builtin/packages/glibc/package.py +++ b/var/spack/repos/builtin/packages/glibc/package.py @@ -24,6 +24,7 @@ class Glibc(AutotoolsPackage, GNUMirrorPackage): license("LGPL-2.1-or-later") version("master", branch="master") + version("2.39", sha256="97f84f3b7588cd54093a6f6389b0c1a81e70d99708d74963a2e3eab7c7dc942d") version("2.38", sha256="16e51e0455e288f03380b436e41d5927c60945abd86d0c9852b84be57dd6ed5e") version("2.37", sha256="e3a790c2f84eed5c5d569ed6172c253c607dd3962135437da413aa39aa4fd352") version("2.36", sha256="02efa6ffbbaf3e10e88f16818a862608d04b0ef838c66f6025ae120530792c9c") @@ -165,6 +166,8 @@ def patch(self): # See 2d7ed98add14f75041499ac189696c9bd3d757fe depends_on("gmake@:4.3", type="build", when="@:2.36") + # Since f2873d2da0ac9802e0b570e8e0b9e7e04a82bf55 + depends_on("gmake@4.0:", type="build", when="@2.28:") # From 2.29: generates locale/C-translit.h # before that it's a test dependency. diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py index 427801c406..2e8e1cce48 100644 --- a/var/spack/repos/builtin/packages/llvm/package.py +++ b/var/spack/repos/builtin/packages/llvm/package.py @@ -37,6 +37,7 @@ class Llvm(CMakePackage, CudaPackage): license("Apache-2.0") version("main", branch="main") + version("18.1.3", sha256="fc5a2fd176d73ceb17f4e522f8fe96d8dde23300b8c233476d3609f55d995a7a") version("18.1.2", sha256="8d686d5ece6f12b09985cb382a3a530dc06bb6e7eb907f57c7f8bf2d868ebb0b") version("18.1.1", sha256="62439f733311869dbbaf704ce2e02141d2a07092d952fc87ef52d1d636a9b1e4") version("18.1.0", sha256="eb18f65a68981e94ea1a5aae4f02321b17da9e99f76bfdb983b953f4ba2d3550") @@ -756,10 +757,7 @@ def codesign_check(self): ) def flag_handler(self, name, flags): - if name == "cxxflags": - flags.append(self.compiler.cxx11_flag) - return (None, flags, None) - elif name == "ldflags" and self.spec.satisfies("%intel"): + if name == "ldflags" and self.spec.satisfies("%intel"): flags.append("-shared-intel") return (None, flags, None) return (flags, None, None)