Gabe Black has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/44385 )

Change subject: scons,systemc: In clang <= 6, -Wno-self-assign-overloaded doesn't exist.
......................................................................

scons,systemc: In clang <= 6, -Wno-self-assign-overloaded doesn't exist.

In those versions of clang, use -Wno-self-assign.

Change-Id: Ic4f2fba6881f65fd40d0a4f3d3fb76574614b29a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/44385
Maintainer: Gabe Black <gabe.bl...@gmail.com>
Tested-by: kokoro <noreply+kok...@google.com>
Reviewed-by: Daniel Carvalho <oda...@yahoo.com.br>
---
M src/systemc/core/SConscript
1 file changed, 9 insertions(+), 2 deletions(-)

Approvals:
  Daniel Carvalho: Looks good to me, approved
  Gabe Black: Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/systemc/core/SConscript b/src/systemc/core/SConscript
index b5d0ea9..9e367ca 100644
--- a/src/systemc/core/SConscript
+++ b/src/systemc/core/SConscript
@@ -23,6 +23,10 @@
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+from m5.util import compareVersions
+
+import gem5_scons
+
 Import('*')

 if env['USE_SYSTEMC']:
@@ -63,6 +67,9 @@
         Source('python.cc')
         Source('sc_main_python.cc')
         append = {}
-        if env['CLANG']:
-            append['CCFLAGS'] = '-Wno-self-assign-overloaded'
+        with gem5_scons.Configure(main) as conf:
+ for flag in ('-Wno-self-assign-overloaded', '-Wno-self-assign'):
+                if conf.CheckCxxFlag(flag, autoadd=False):
+                    append['CCFLAGS'] = [flag]
+                    break
         Source('sc_time_python.cc', append=append)



2 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/44385
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: Ic4f2fba6881f65fd40d0a4f3d3fb76574614b29a
Gerrit-Change-Number: 44385
Gerrit-PatchSet: 4
Gerrit-Owner: Gabe Black <gabe.bl...@gmail.com>
Gerrit-Reviewer: Bobby R. Bruce <bbr...@ucdavis.edu>
Gerrit-Reviewer: Daniel Carvalho <oda...@yahoo.com.br>
Gerrit-Reviewer: Gabe Black <gabe.bl...@gmail.com>
Gerrit-Reviewer: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to