Gabe Black has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/48646 )

Change subject: scons: Disable the free-nonheap-object warning for gcc.
......................................................................

scons: Disable the free-nonheap-object warning for gcc.

g++ 11.1 has a false positive in the systemc kernel for
free-nonheap-object which breaks the build. The check sees that an
EventWrapper is part of the systemc scheduler object, and doesn't
realize that it was *not* set to autodelete, and so would *not* delete
itself (as part of the scheduler) when it is descheduled.

Change-Id: Ia9f48f2113e8c165923e55d7db1442b11bb6a2e8
---
M SConstruct
1 file changed, 4 insertions(+), 0 deletions(-)



diff --git a/SConstruct b/SConstruct
index ea86cc0..d9d4757 100755
--- a/SConstruct
+++ b/SConstruct
@@ -355,6 +355,10 @@
         error('gcc version 5 or newer required.\n'
               'Installed version:', main['CXXVERSION'])

+    with gem5_scons.Configure(main) as conf:
+        # This detects a false positive in the systemc code in g++ 11.1.
+        conf.CheckCxxFlag('-Wno-free-nonheap-object')
+
# Add the appropriate Link-Time Optimization (LTO) flags if `--with-lto` is
     # set.
     if GetOption('with_lto'):

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/48646
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: Ia9f48f2113e8c165923e55d7db1442b11bb6a2e8
Gerrit-Change-Number: 48646
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <gabe.bl...@gmail.com>
Gerrit-MessageType: newchange
_______________________________________________
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