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.
This commit is contained in:
Hironori-Yamaji 2019-07-16 00:50:26 +09:00 committed by Greg Becker
parent a3caf52cac
commit 68ad4caf30

View file

@ -91,3 +91,11 @@ def install_headers(self):
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)