OLD | NEW |
---|---|
1 # -*- python -*- | 1 # -*- python -*- |
2 # Copyright (c) 2011 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2011 The Native Client Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 | 6 |
7 Import('env') | 7 Import('env') |
8 | 8 |
9 # Since the integrated runtime will be built with newlib, | 9 # Since the integrated runtime will be built with newlib, |
10 # there's no need to build this module against glibc. | 10 # there's no need to build this module against glibc. |
(...skipping 24 matching lines...) Expand all Loading... | |
35 blob_env.Append(LINKFLAGS='-Wl,-Ttext=${IRT_BLOB_CODE_START}') | 35 blob_env.Append(LINKFLAGS='-Wl,-Ttext=${IRT_BLOB_CODE_START}') |
36 else: | 36 else: |
37 blob_env.Append(LINKFLAGS='-Wl,-Ttext-segment=${IRT_BLOB_CODE_START}') | 37 blob_env.Append(LINKFLAGS='-Wl,-Ttext-segment=${IRT_BLOB_CODE_START}') |
38 | 38 |
39 asm_env = blob_env.Clone() | 39 asm_env = blob_env.Clone() |
40 if asm_env.Bit('bitcode'): | 40 if asm_env.Bit('bitcode'): |
41 asm_env.Replace(CC=env['CC_NATIVE'], OBJSUFFIX='.o') | 41 asm_env.Replace(CC=env['CC_NATIVE'], OBJSUFFIX='.o') |
42 asm_helper = asm_env.ComponentObject( | 42 asm_helper = asm_env.ComponentObject( |
43 'elf_restart_%s.S' % env['TARGET_FULLARCH'].replace('-', '_')) | 43 'elf_restart_%s.S' % env['TARGET_FULLARCH'].replace('-', '_')) |
44 | 44 |
45 files = ['irt_entry.c', 'irt_sbrk.c', 'irt_elf_utils.c', asm_helper] | 45 files = ['irt_entry.c', 'irt_sbrk.c', 'irt_elf_utils.c', 'irt_tls.c', |
Mark Seaborn
2011/04/13 20:32:30
Nit: we tend to split lists like this into one-ent
| |
46 # TLS virtualisation only works on x86-64 currently. | 46 asm_helper] |
47 # TODO(mseaborn): Turn on "-mtls-use-call" for the relevant libraries | 47 irt_library = blob_env.ComponentProgram( |
48 # on x86-32 so that this works there too. | |
49 if env.Bit('build_x86_64'): | |
50 files.append('irt_tls.c') | |
51 blob_env.ComponentProgram( | |
52 'irt.nexe', files, | 48 'irt.nexe', files, |
53 EXTRA_LIBS=['ppruntime', 'srpc', 'imc', 'platform', 'gio', | 49 EXTRA_LIBS=['ppruntime', 'srpc', 'imc', 'platform', 'gio', |
54 'pthread', 'm']) | 50 'pthread', 'm']) |
51 | |
52 if env.Bit('build_x86_32'): | |
53 # Make sure that the linked IRT nexe has no TLS uses. | |
Mark Seaborn
2011/04/13 20:32:30
"TLS uses" -> "direct TLS uses via %gs"?
| |
54 node = env.CommandTest('irt_tls_test.out', | |
55 ['${PYTHON}', env.File('check_tls.py'), | |
56 '${OBJDUMP}', irt_library]) | |
57 env.AddNodeToTestSuite(node, ['small_tests'], 'run_irt_tls_test') | |
OLD | NEW |