Chromium Code Reviews| Index: src/untrusted/irt/nacl.scons |
| diff --git a/src/untrusted/irt/nacl.scons b/src/untrusted/irt/nacl.scons |
| index c50c859e9154c2846bf8717311f1df2dde49a541..6e074b1167c524cf409134fb66e614a00a06da79 100644 |
| --- a/src/untrusted/irt/nacl.scons |
| +++ b/src/untrusted/irt/nacl.scons |
| @@ -44,13 +44,24 @@ if asm_env.Bit('bitcode'): |
| asm_helper = asm_env.ComponentObject( |
| 'elf_restart_%s.S' % env['TARGET_FULLARCH'].replace('-', '_')) |
| -files = ['irt_entry.c', 'irt_sbrk.c', 'irt_elf_utils.c', asm_helper] |
| -# TLS virtualisation only works on x86-64 currently. |
| -# TODO(mseaborn): Turn on "-mtls-use-call" for the relevant libraries |
| -# on x86-32 so that this works there too. |
| -if env.Bit('build_x86_64'): |
| - files.append('irt_tls.c') |
| -blob_env.ComponentProgram( |
| +files = ['irt_entry.c', |
| + 'irt_sbrk.c', |
| + 'irt_elf_utils.c', |
| + 'irt_tls.c', |
|
Mark Seaborn
2011/04/13 21:24:41
It just occurred to me that putting irt_tls.c in u
|
| + asm_helper] |
| +irt_library = blob_env.ComponentProgram( |
| 'irt.nexe', files, |
| - EXTRA_LIBS=['ppruntime', 'srpc', 'imc', 'platform', 'gio', |
| - 'pthread', 'm']) |
| + EXTRA_LIBS=['ppruntime', |
| + 'srpc', |
| + 'imc', |
| + 'platform', |
| + 'gio', |
| + 'pthread', |
| + 'm']) |
| + |
| +if env.Bit('build_x86_32'): |
| + # Make sure that the linked IRT nexe never uses TLS via %gs access. |
| + node = env.CommandTest('irt_tls_test.out', |
| + ['${PYTHON}', env.File('check_tls.py'), |
| + '${OBJDUMP}', irt_library]) |
| + env.AddNodeToTestSuite(node, ['small_tests'], 'run_irt_tls_test') |