summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorAiden Grossman <39388941+boomanaiden154@users.noreply.github.com>2023-07-26 07:34:07 -0700
committerGitHub <noreply@github.com>2023-07-26 16:34:07 +0200
commit856834537ae2a4ba0ac12dfe78b0247f8ed8f7bf (patch)
tree933fcb356cf3c325ac4183a3e5eaa802b8913867 /var
parentfba019f0beb55ea209df19dc6e2a64bbf68da3c0 (diff)
downloadspack-856834537ae2a4ba0ac12dfe78b0247f8ed8f7bf.tar.gz
spack-856834537ae2a4ba0ac12dfe78b0247f8ed8f7bf.tar.bz2
spack-856834537ae2a4ba0ac12dfe78b0247f8ed8f7bf.tar.xz
spack-856834537ae2a4ba0ac12dfe78b0247f8ed8f7bf.zip
gcoff: fix build with clang 16+ (#38914)
gcoff uses the register keyword in a couple different places which causes errors when building with c++17, which is the default in clang 16. This patch adds the -Wno-register flag to ignore these errors when when building with clang 16.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/groff/package.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/groff/package.py b/var/spack/repos/builtin/packages/groff/package.py
index 132348295a..a2ccd663ec 100644
--- a/var/spack/repos/builtin/packages/groff/package.py
+++ b/var/spack/repos/builtin/packages/groff/package.py
@@ -88,3 +88,9 @@ class Groff(AutotoolsPackage, GNUMirrorPackage):
if self.spec.satisfies("+x"):
dir = join_path(self.prefix.lib, "X11", "app-defaults")
env.set_path("XFILESEARCHPATH", dir)
+
+ def flag_handler(self, name, flags):
+ if name == "cxxflags":
+ if self.spec.satisfies("%clang@16:"):
+ flags.append("-Wno-register")
+ return (flags, None, None)