| 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.
|
|
|