Index: pnacl/driver/pnacl-driver.py |
diff --git a/pnacl/driver/pnacl-driver.py b/pnacl/driver/pnacl-driver.py |
index 5621fb1ee280eefaee0db5b8263d379cf9d493a6..384472a680d84a1a43bfc1f4f6e2bfd1a1e9a0a6 100755 |
--- a/pnacl/driver/pnacl-driver.py |
+++ b/pnacl/driver/pnacl-driver.py |
@@ -494,10 +494,12 @@ def main(argv): |
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. |
+ # For native/mixed links, also bring in the native libgcc and |
+ # libcrt_platform 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') |
+ env.append('STDLIBS', '-lcrt_platform') |
if not env.get('STDLIB'): |