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

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: fix 80col and comment typo 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
Index: pnacl/driver/pnacl-driver.py
diff --git a/pnacl/driver/pnacl-driver.py b/pnacl/driver/pnacl-driver.py
index f6412d84950605698ef130a2e69d05252838205e..069fceee5593026c0a6d8a4f1f1b4a9c9827eb4a 100755
--- a/pnacl/driver/pnacl-driver.py
+++ b/pnacl/driver/pnacl-driver.py
@@ -123,6 +123,7 @@ EXTRA_ENV = {
# linker will know if an opt level was explicitly set or not.
'LD_FLAGS' : '${#OPT_LEVEL ? -O${OPT_LEVEL}} -static ' +
'${PIC ? -fPIC} ${@AddPrefix:-L:SEARCH_DIRS} ' +
+ '${ALLOW_NATIVE ? -L${LIBS_NATIVE_ARCH}} ' +
'--pnacl-exceptions=${CXX_EH_MODE}',
'SEARCH_DIRS' : '', # Directories specified using -L
@@ -151,13 +152,17 @@ EXTRA_ENV = {
'TRANSLATE_FLAGS' : '-O${#OPT_LEVEL ? ${OPT_LEVEL} : 0}',
'STDLIBS' : '${DEFAULTLIBS ? '
- '${LIBSTDCPP} ${LIBPTHREAD} ${LIBNACL} ${LIBC} ${LIBPNACLMM}}',
+ '${LIBSTDCPP} ${LIBPTHREAD} ${LIBNACL} ${LIBC} ${LIBPNACLMM} '
+ '${ALLOW_NATIVE ? ${NATIVELIBS}}}',
'LIBSTDCPP' : '${IS_CXX ? -l${STDLIB_TRUNC} -lm }',
'LIBC' : '-lc',
'LIBNACL' : '-lnacl',
'LIBPNACLMM': '-lpnaclmm',
# Enabled/disabled by -pthreads
'LIBPTHREAD': '${PTHREAD ? -lpthread}',
+ # For native/mixed links, also bring in the native libgcc to avoid link
+ # failure if pre-translated native code needs functions from it.
+ 'NATIVELIBS': '-lgcc',
# IS_CXX is set by pnacl-clang and pnacl-clang++ programmatically
'CC' : '${IS_CXX ? ${CLANGXX} : ${CLANG}}',
« no previous file with comments | « pnacl/driver/nativeld.py ('k') | tests/toolchain/nacl.scons » ('j') | tests/toolchain/nacl.scons » ('J')

Powered by Google App Engine
This is Rietveld 408576698