Yu-hsin Wang has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/64652?usp=email )

 (

2 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
 )Change subject: scons: fix systrace header test
......................................................................

scons: fix systrace header test

Latest compilers default checks the unused and uninitialized. Those
checks result in false negative of the header test. We fix it by
replacing the temp variable to (void *)1.

Btw, (void *)0 not works here because the function is declare with nonnull.
https://elixir.bootlin.com/glibc/latest/source/debug/execinfo.h#L38

Change-Id: I3b51faf7595b861bfbd131c0a42fd6d78a5e9698
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/64652
Maintainer: Gabe Black <gabe.bl...@gmail.com>
Tested-by: kokoro <noreply+kok...@google.com>
Reviewed-by: Gabe Black <gabe.bl...@gmail.com>
---
M src/sim/SConsopts
1 file changed, 21 insertions(+), 1 deletion(-)

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




diff --git a/src/sim/SConsopts b/src/sim/SConsopts
index 07997c7..98be89b 100644
--- a/src/sim/SConsopts
+++ b/src/sim/SConsopts
@@ -31,7 +31,7 @@

 with gem5_scons.Configure(main) as conf:
     if conf.CheckLibWithHeader([None, 'execinfo'], 'execinfo.h', 'C',
-            'char temp; backtrace_symbols_fd((void *)&temp, 0, 0);'):
+            'backtrace_symbols_fd((void *)1, 0, 0);'):
         conf.env['BACKTRACE_IMPL'] = 'glibc'
     else:
         conf.env['BACKTRACE_IMPL'] = 'none'

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/64652?usp=email 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: I3b51faf7595b861bfbd131c0a42fd6d78a5e9698
Gerrit-Change-Number: 64652
Gerrit-PatchSet: 4
Gerrit-Owner: Yu-hsin Wang <yuhsi...@google.com>
Gerrit-Reviewer: Earl Ou <shunhsin...@google.com>
Gerrit-Reviewer: Gabe Black <gabe.bl...@gmail.com>
Gerrit-Reviewer: Jason Lowe-Power <ja...@lowepower.com>
Gerrit-Reviewer: Yu-hsin Wang <yuhsi...@google.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

Reply via email to