Adrian Herrera has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/38416 )
Change subject: util: m5ops, optional extra build flags
......................................................................
util: m5ops, optional extra build flags
This increases compilation control for users. Main use case is building
m5ops as part of an image distribution. Specifying a different sysroot
or dynamic linker may be required when the cross toolchain is built as
part of the process.
Change-Id: Icbd3faa92ea6e084fc4a9b2db83129bce73faf21
Signed-off-by: Adrian Herrera <adrian.herr...@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/38416
Reviewed-by: Jason Lowe-Power <power...@gmail.com>
Reviewed-by: Gabe Black <gabe.bl...@gmail.com>
Maintainer: Jason Lowe-Power <power...@gmail.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M util/m5/SConstruct
1 file changed, 11 insertions(+), 3 deletions(-)
Approvals:
Jason Lowe-Power: Looks good to me, but someone else must approve; Looks
good to me, approved
Gabe Black: Looks good to me, approved
kokoro: Regressions pass
diff --git a/util/m5/SConstruct b/util/m5/SConstruct
index 5725f6c..63143a8 100644
--- a/util/m5/SConstruct
+++ b/util/m5/SConstruct
@@ -232,16 +232,24 @@
#
# This also considers scons command line settings which may look
like
# environment variables, but are set after "scons" on the command
line.
- def get_abi_opt(name, default):
+ def _extract_abi_opt_val(name, default):
var_name = env.subst('${ABI}.%s' % name)
- env[name] = os.environ.get(
- var_name, ARGUMENTS.get(var_name, default))
+ return os.environ.get(var_name, ARGUMENTS.get(var_name,
default))
+ def get_abi_opt(name, default):
+ env[name] = _extract_abi_opt_val(name, default)
+ def append_abi_opt(name):
+ env.Append(**{ name: _extract_abi_opt_val(name, '') })
# Process the ABI's settings in the SConsopts file, storing them
# in a copy of the primary environment.
env.SConscript(Dir(root).File('SConsopts'),
exports=[ 'env', 'get_abi_opt' ])
+ # The user can pass extra build flags for each ABI
+ append_abi_opt('CCFLAGS')
+ append_abi_opt('CXXFLAGS')
+ append_abi_opt('LINKFLAGS')
+
# Check if this version of QEMU is available for running unit
tests.
env['HAVE_QEMU'] = env.Detect('${QEMU}') is not None
if env['HAVE_QEMU'] and env.Detect('${CC}'):
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/38416
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: Icbd3faa92ea6e084fc4a9b2db83129bce73faf21
Gerrit-Change-Number: 38416
Gerrit-PatchSet: 4
Gerrit-Owner: Adrian Herrera <adrian.herr...@arm.com>
Gerrit-Reviewer: Adrian Herrera <adrian.herr...@arm.com>
Gerrit-Reviewer: Gabe Black <gabe.bl...@gmail.com>
Gerrit-Reviewer: Jason Lowe-Power <power...@gmail.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
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s