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 26 matching lines...) Expand all Loading... | |
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(OBJSUFFIX='.o') | 41 asm_env.Replace(OBJSUFFIX='.o') |
42 asm_env.Append(ASFLAGS=['-arch', '${TARGET_FULLARCH}']) | 42 asm_env.Append(ASFLAGS=['-arch', '${TARGET_FULLARCH}']) |
43 | 43 |
44 asm_helper = asm_env.ComponentObject( | 44 asm_helper = asm_env.ComponentObject( |
45 'elf_restart_%s.S' % env['TARGET_FULLARCH'].replace('-', '_')) | 45 'elf_restart_%s.S' % env['TARGET_FULLARCH'].replace('-', '_')) |
46 | 46 |
47 files = ['irt_entry.c', 'irt_sbrk.c', 'irt_elf_utils.c', asm_helper] | 47 files = ['irt_entry.c', |
48 # TLS virtualisation only works on x86-64 currently. | 48 'irt_sbrk.c', |
49 # TODO(mseaborn): Turn on "-mtls-use-call" for the relevant libraries | 49 'irt_elf_utils.c', |
50 # on x86-32 so that this works there too. | 50 'irt_tls.c', |
Mark Seaborn
2011/04/13 21:24:41
It just occurred to me that putting irt_tls.c in u
| |
51 if env.Bit('build_x86_64'): | 51 asm_helper] |
52 files.append('irt_tls.c') | 52 irt_library = blob_env.ComponentProgram( |
53 blob_env.ComponentProgram( | |
54 'irt.nexe', files, | 53 'irt.nexe', files, |
55 EXTRA_LIBS=['ppruntime', 'srpc', 'imc', 'platform', 'gio', | 54 EXTRA_LIBS=['ppruntime', |
56 'pthread', 'm']) | 55 'srpc', |
56 'imc', | |
57 'platform', | |
58 'gio', | |
59 'pthread', | |
60 'm']) | |
61 | |
62 if env.Bit('build_x86_32'): | |
63 # Make sure that the linked IRT nexe never uses TLS via %gs access. | |
64 node = env.CommandTest('irt_tls_test.out', | |
65 ['${PYTHON}', env.File('check_tls.py'), | |
66 '${OBJDUMP}', irt_library]) | |
67 env.AddNodeToTestSuite(node, ['small_tests'], 'run_irt_tls_test') | |
OLD | NEW |