summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHironori-Yamaji <52182908+Hironori-Yamaji@users.noreply.github.com>2019-07-16 00:50:26 +0900
committerGreg Becker <becker33@llnl.gov>2019-07-15 08:50:26 -0700
commit68ad4caf30b0c213c1f00d23a1b3ea375d265644 (patch)
treef35ad8f79fc87cc616fad28aa208ad14b2e6438e
parenta3caf52cac9f19638220b837e4870210d698da0d (diff)
downloadspack-68ad4caf30b0c213c1f00d23a1b3ea375d265644.tar.gz
spack-68ad4caf30b0c213c1f00d23a1b3ea375d265644.tar.bz2
spack-68ad4caf30b0c213c1f00d23a1b3ea375d265644.tar.xz
spack-68ad4caf30b0c213c1f00d23a1b3ea375d265644.zip
binutils: added '-Wno-narrowing' to CXXFLAGS when using fj compiler via flag_handler (#11922)
FJ compiler fails for older versions w/o '-Wno-narrowing' flag.
-rw-r--r--var/spack/repos/builtin/packages/binutils/package.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/binutils/package.py b/var/spack/repos/builtin/packages/binutils/package.py
index ca90f629e9..8533358020 100644
--- a/var/spack/repos/builtin/packages/binutils/package.py
+++ b/var/spack/repos/builtin/packages/binutils/package.py
@@ -91,3 +91,11 @@ class Binutils(AutotoolsPackage):
for current_file in glob.glob(join_path(self.build_directory,
'bfd', '*.h')):
install(current_file, extradir)
+
+ def flag_handler(self, name, flags):
+ # To ignore the errors of narrowing conversions for
+ # the Fujitsu compiler
+ if name == 'cxxflags' and self.compiler.name == 'fj'\
+ and self.version <= ver('2.31.1'):
+ flags.append('-Wno-narrowing')
+ return (flags, None, None)