Gabe Black has submitted this change. ( 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
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48646
Reviewed-by: Hoa Nguyen <[email protected]>
Maintainer: Gabe Black <[email protected]>
Tested-by: kokoro <[email protected]>
---
M SConstruct
1 file changed, 4 insertions(+), 0 deletions(-)

Approvals:
  Hoa Nguyen: Looks good to me, approved
  Gabe Black: Looks good to me, approved
  kokoro: Regressions pass



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

+    with gem5_scons.Configure(main) as conf:
+ # This warning has 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: 5
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Hoa Nguyen <[email protected]>
Gerrit-Reviewer: Nikos Nikoleris <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
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