From: Bobby R. Bruce Date: Fri, 24 Jul 2020 01:22:09 +0000 (-0700) Subject: base,scons: `-wno-deprecated-copy` added for hdf5.cc with GCC X-Git-Tag: v20.1.0.0~377 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0f4ecba2a9a82ddec60c659090f2b8bb32da9886;p=gem5.git base,scons: `-wno-deprecated-copy` added for hdf5.cc with GCC As highlighted by Ciro here: https://gem5-review.googlesource.com/c/public/gem5/+/31216, and here: https://gem5.atlassian.net/browse/GEM5-365, It appears that GCC versions >= 9 requires `-wno-deprecated-copy` which was removed in commit: https://gem5-review.googlesource.com/c/public/gem5/+/31216. `-wno-deprecated-copy` appears to work for all versions of GCC. Clang does not require `-wno-deprecated-copy` nor `-wno-deprecated` for sucessfull compilation. Therefore branching has been introduced to the SConscript to address this and simplify the solution. Change-Id: I233b32aa945d479dd429bb5591272608ba342d8d Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31754 Reviewed-by: Bobby R. Bruce Reviewed-by: Gabe Black Maintainer: Bobby R. Bruce Tested-by: kokoro --- diff --git a/src/base/SConscript b/src/base/SConscript index 657528c94..b7a0c1b28 100644 --- a/src/base/SConscript +++ b/src/base/SConscript @@ -91,7 +91,10 @@ Source('loader/symtab.cc') Source('stats/group.cc') Source('stats/text.cc') if env['USE_HDF5']: - Source('stats/hdf5.cc', append={'CXXFLAGS': '-Wno-deprecated'}) + if main['GCC']: + Source('stats/hdf5.cc', append={'CXXFLAGS': '-Wno-deprecated-copy'}) + else: + Source('stats/hdf5.cc') GTest('addr_range.test', 'addr_range.test.cc') GTest('addr_range_map.test', 'addr_range_map.test.cc')