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.black@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Gabe Black <gabe.black@gmail.com>
This commit is contained in:
@@ -31,7 +31,7 @@ import gem5_scons
|
||||
|
||||
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'
|
||||
|
||||
Reference in New Issue
Block a user