Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: toolchain_build/pnacl_targetlibs.py

Issue 1412503002: PNaCl. Enables Unsandboxed nonsfi ARM32. (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: toolchain_build/pnacl_targetlibs.py
diff --git a/toolchain_build/pnacl_targetlibs.py b/toolchain_build/pnacl_targetlibs.py
index 9918e9f5e66db835273306a2cd150fffb883a2c1..2c0168573904ca60104a46ef91369d2c7aef0f09 100755
--- a/toolchain_build/pnacl_targetlibs.py
+++ b/toolchain_build/pnacl_targetlibs.py
@@ -473,6 +473,7 @@ def TargetLibs(bias_arch, is_canonical):
'--enable-newlib-io-long-double',
'--enable-newlib-io-c99-formats',
'--enable-newlib-mb',
+ '--enable-newlib-multithread',
'--target=' + newlib_triple
]),
command.Command(MakeCommand()),
@@ -630,6 +631,10 @@ def SubzeroRuntimeCommands(arch, out_dir):
LlcArchArgs = [ '-mtriple=i686-linux-gnu', '-mcpu=pentium4m']
elif arch == 'x86-32':
LlcArchArgs = [ '-mtriple=i686-none-nacl-gnu', '-mcpu=pentium4m']
+ if arch == 'arm-linux':
+ LlcArchArgs = [ '-mtriple=arm-linux-gnu', '-mcpu=cortex-a9']
+ elif arch == 'arm':
+ LlcArchArgs = [ '-mtriple=arm-none-nacl-gnu', '-mcpu=cortex-a9']
else:
return []
return [
@@ -813,6 +818,15 @@ def TranslatorLibs(arch, is_canonical, no_nacl_gcc):
return libs
def UnsandboxedRuntime(arch, is_canonical):
+ prefix = {
+ 'arm-linux': 'arm-linux-gnueabihf-',
+ 'x86-32-linux': '',
+ }[arch]
+ arch_cflags = {
+ 'arm-linux': ['-mcpu=cortex-a9', '-D__arm_nonsfi_linux__'],
+ 'x86-32-linux': ['-m32'],
+ }[arch]
+
libs = {
GSDJoin('unsandboxed_runtime', arch): {
'type': TargetLibBuildType(is_canonical),
@@ -831,19 +845,17 @@ def UnsandboxedRuntime(arch, is_canonical):
# even on non-Linux systems is OK.
# TODO(dschuff): this include path breaks the input encapsulation
# for build rules.
- command.Command([
- 'gcc', '-m32', '-O2', '-Wall', '-Werror',
- '-I%(top_srcdir)s/..', '-DNACL_LINUX=1', '-DDEFINE_MAIN',
+ command.Command([prefix + 'gcc'] + arch_cflags + ['-O2', '-Wall',
+ '-Werror', '-I%(top_srcdir)s/..',
+ '-DNACL_LINUX=1', '-DDEFINE_MAIN',
'-c', command.path.join('%(support)s', 'irt_interfaces.c'),
'-o', command.path.join('%(output)s', 'unsandboxed_irt.o')]),
- command.Command([
- 'gcc', '-m32', '-O2', '-Wall', '-Werror',
- '-I%(top_srcdir)s/..',
+ command.Command([prefix + 'gcc'] + arch_cflags + ['-O2', '-Wall',
+ '-Werror', '-I%(top_srcdir)s/..',
'-c', command.path.join('%(support)s', 'irt_random.c'),
'-o', command.path.join('%(output)s', 'irt_random.o')]),
- command.Command([
- 'gcc', '-m32', '-O2', '-Wall', '-Werror',
- '-I%(top_srcdir)s/..',
+ command.Command([prefix + 'gcc'] + arch_cflags + ['-O2', '-Wall',
+ '-Werror', '-I%(top_srcdir)s/..',
'-c', command.path.join('%(untrusted)s', 'irt_query_list.c'),
'-o', command.path.join('%(output)s', 'irt_query_list.o')]),
] + SubzeroRuntimeCommands(arch, '%(output)s'),

Powered by Google App Engine
This is Rietveld 408576698