Non-SFI Mode: Enable compiling exception_test for x86-32.

Add --target to enable inline assembly with memory constraints, and remove naclret from assembly for non-SFI target.

Fix support for Non-SFI mode in AddBiasForPNaCl to set correct pnacl-bias.


TESTED= ./scons -j20 --mode=dbg-host,nacl bitcode=1 nonsfi_nacl=1 \
  pnacl_generate_pexe=0 platform=arm run_exception_test
  # compiles and crashes with SIGSEGV
TESTED= ./scons -j20 --mode=dbg-host,nacl bitcode=1 nonsfi_nacl=1 \
  pnacl_generate_pexe=0 platform=x86-32 run_exception_test
  # compiles and crashes with SIGSEGV

BUG= https://code.google.com/p/chromium/issues/detail?id=408879

Review URL: https://codereview.chromium.org/616813002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client/site_scons@13824 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
diff --git a/site_tools/naclsdk.py b/site_tools/naclsdk.py
index dbe3128..5347a87 100755
--- a/site_tools/naclsdk.py
+++ b/site_tools/naclsdk.py
@@ -354,20 +354,22 @@
     return
 
   if env.Bit('target_arm'):
-    env.AppendUnique(CCFLAGS=['--pnacl-arm-bias'],
-                     ASPPFLAGS=['--pnacl-arm-bias'])
+    bias_flag = '--pnacl-bias=arm'
   elif env.Bit('target_x86_32'):
-    env.AppendUnique(CCFLAGS=['--pnacl-i686-bias'],
-                     ASPPFLAGS=['--pnacl-i686-bias'])
+    bias_flag = '--pnacl-bias=x86-32'
   elif env.Bit('target_x86_64'):
-    env.AppendUnique(CCFLAGS=['--pnacl-x86_64-bias'],
-                     ASPPFLAGS=['--pnacl-x86_64-bias'])
+    bias_flag = '--pnacl-bias=x86-64'
   elif env.Bit('target_mips32'):
-    env.AppendUnique(CCFLAGS=['--pnacl-mips-bias'],
-                     ASPPFLAGS=['--pnacl-mips-bias'])
+    bias_flag = '--pnacl-bias=mips32'
   else:
     raise Exception("Unknown architecture!")
 
+  if env.Bit('nonsfi_nacl'):
+    bias_flag += '-nonsfi'
+
+  env.AppendUnique(CCFLAGS=[bias_flag],
+                   ASPPFLAGS=[bias_flag])
+
 
 def ValidateSdk(env):
   checkables = ['${NACL_SDK_INCLUDE}/stdio.h']