Arun Rodrigues has uploaded this change for review. ( 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
---
M site_scons/gem5_scons/configure.py
1 file changed, 16 insertions(+), 1 deletion(-)



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: 1
Gerrit-Owner: Arun Rodrigues <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to