Bobby R. Bruce has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/53025 )
Change subject: scons: CheckLinkFlag() only adds to flags if test succeeds
......................................................................
scons: CheckLinkFlag() only adds to flags if test succeeds
Previously, did not check the return of TryLink() before appending, so
unsupported flags can be used when building shared libraries. This
patch adds checking.
Jira Issue: https://gem5.atlassian.net/browse/GEM5-1115
Change-Id: Ief62be15009cae9e02aaaa81b4d9c2d7b26e0223
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53025
Reviewed-by: Jason Lowe-Power <[email protected]>
Reviewed-by: Gabe Black <[email protected]>
Maintainer: Jason Lowe-Power <[email protected]>
Maintainer: Gabe Black <[email protected]>
Tested-by: kokoro <[email protected]>
---
M site_scons/gem5_scons/configure.py
1 file changed, 22 insertions(+), 1 deletion(-)
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; Looks good to me, approved
kokoro: Regressions pass
diff --git a/site_scons/gem5_scons/configure.py
b/site_scons/gem5_scons/configure.py
index 3993686..b335673 100644
--- a/site_scons/gem5_scons/configure.py
+++ b/site_scons/gem5_scons/configure.py
@@ -61,7 +61,7 @@
ret = context.TryLink('int main(int, char *[]) { return 0; }', '.cc')
if not (ret and autoadd):
context.env['LINKFLAGS'] = last_linkflags
- if set_for_shared:
+ if (ret and set_for_shared):
assert(autoadd)
context.env.Append(SHLINKFLAGS=[flag])
context.Result(ret)
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/53025
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: Ief62be15009cae9e02aaaa81b4d9c2d7b26e0223
Gerrit-Change-Number: 53025
Gerrit-PatchSet: 2
Gerrit-Owner: Arun Rodrigues <[email protected]>
Gerrit-Reviewer: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s