| 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}}',
|
|
|