Bobby R. Bruce has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/31754 )

Change subject: base,scons: `-wno-deprecated-copy` added for hdf5.cc with GCC 9+
......................................................................

base,scons: `-wno-deprecated-copy` added for hdf5.cc with GCC 9+

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 require the `-wno-deprecated-copy` which was removed in
commit: https://gem5-review.googlesource.com/c/public/gem5/+/31216.
This commit ensures the correct flag is set for the each compiler.

Change-Id: I233b32aa945d479dd429bb5591272608ba342d8d
---
M src/base/SConscript
1 file changed, 6 insertions(+), 1 deletion(-)



diff --git a/src/base/SConscript b/src/base/SConscript
index 657528c..7db46f8 100644
--- a/src/base/SConscript
+++ b/src/base/SConscript
@@ -28,6 +28,8 @@

 Import('*')

+from m5.util import compareVersions
+
 if env['CP_ANNOTATE']:
     SimObject('CPA.py')
     Source('cp_annotate.cc')
@@ -91,7 +93,10 @@
 Source('stats/group.cc')
 Source('stats/text.cc')
 if env['USE_HDF5']:
-    Source('stats/hdf5.cc', append={'CXXFLAGS': '-Wno-deprecated'})
+    if main['GCC'] and compareVersions(main['GCC_VERSION'], '9.0') >= 0:
+ Source('stats/hdf5.cc', append={'CXXFLAGS': '-Wno-deprecated-copy'})
+    else:
+        Source('stats/hdf5.cc', append={'CXXFLAGS': '-Wno-deprecated'})

 GTest('addr_range.test', 'addr_range.test.cc')
 GTest('addr_range_map.test', 'addr_range_map.test.cc')

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/31754
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I233b32aa945d479dd429bb5591272608ba342d8d
Gerrit-Change-Number: 31754
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to