Chromium Code Reviews| 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}} ' + |
|
Mark Seaborn
2014/08/09 07:11:51
Might an alternative be to do this below:
if env.
Derek Schuff
2014/08/11 17:54:17
Done.
|
| '--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}}', |