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 <[email protected]>
Tested-by: kokoro <[email protected]>
Reviewed-by: Gabe Black <[email protected]>
---
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 <[email protected]>
Gerrit-Reviewer: Earl Ou <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Yu-hsin Wang <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to