Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Unified Diff: pnacl/driver/pnacl-driver.py

Issue 454593002: PNaCl driver: Add libgcc to mixed native/bitcode links (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: explicitly modify env rather than using var expansion Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pnacl/driver/nativeld.py ('k') | tests/toolchain/nacl.scons » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pnacl/driver/pnacl-driver.py
diff --git a/pnacl/driver/pnacl-driver.py b/pnacl/driver/pnacl-driver.py
index f6412d84950605698ef130a2e69d05252838205e..1b6bccadf1a36faba553b350ffe299992d9b4f73 100755
--- a/pnacl/driver/pnacl-driver.py
+++ b/pnacl/driver/pnacl-driver.py
@@ -497,8 +497,14 @@ def main(argv):
# If -arch was given, we are compiling directly to native code
compiling_to_native = GetArch() is not None
- if env.getbool('ALLOW_NATIVE') and not compiling_to_native:
- Log.Fatal("--pnacl-allow-native without -arch is not meaningful.")
+ if env.getbool('ALLOW_NATIVE'):
+ if not compiling_to_native:
+ Log.Fatal("--pnacl-allow-native without -arch is not meaningful.")
+ # For native/mixed links, also bring in the native libgcc to avoid link
+ # failure if pre-translated native code needs functions from it.
+ env.append('LD_FLAGS', env.eval('-L${LIBS_NATIVE_ARCH}'))
+ env.append('STDLIBS', '-lgcc')
+
if not env.get('STDLIB'):
# Default C++ Standard Library.
« no previous file with comments | « pnacl/driver/nativeld.py ('k') | tests/toolchain/nacl.scons » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698