Gabe Black has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/41159 )
Change subject: scons: In Check(Cxx|Link)Flag, only install the flag if it
exists.
......................................................................
scons: In Check(Cxx|Link)Flag, only install the flag if it exists.
These functions where correctly returning whether a flag had existed,
and also correctly not installing it if asked not to. Unfortunately if
they *were* asked to install the flag, they ignored whether or not it
had actually existed to begin with.
Change-Id: I2dca0e1a0ddbc182576d48237aeea5452a02c51b
---
M site_scons/gem5_scons/configure.py
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/site_scons/gem5_scons/configure.py
b/site_scons/gem5_scons/configure.py
index e539c73..cebbb12 100644
--- a/site_scons/gem5_scons/configure.py
+++ b/site_scons/gem5_scons/configure.py
@@ -47,7 +47,7 @@
last_cxxflags = context.env['CXXFLAGS']
context.env.Append(CXXFLAGS=[flag])
ret = context.TryCompile('', '.cc')
- if not autoadd:
+ if not (ret and autoadd):
context.env['CXXFLAGS'] = last_cxxflags
context.Result(ret)
return ret
@@ -57,7 +57,7 @@
last_linkflags = context.env['LINKFLAGS']
context.env.Append(LINKFLAGS=[flag])
ret = context.TryLink('int main(int, char *[]) { return 0; }', '.cc')
- if not autoadd:
+ if not (ret and autoadd):
context.env['LINKFLAGS'] = last_linkflags
if set_for_shared:
assert(autoadd)
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/41159
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: I2dca0e1a0ddbc182576d48237aeea5452a02c51b
Gerrit-Change-Number: 41159
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <gabe.bl...@gmail.com>
Gerrit-MessageType: newchange
_______________________________________________
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