OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2012 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 # This is a thin wrapper for native LD. This is not meant to be | 7 # This is a thin wrapper for native LD. This is not meant to be |
8 # used by the user, but is called from pnacl-translate. | 8 # used by the user, but is called from pnacl-translate. |
9 # This implements the native linking part of translation. | 9 # This implements the native linking part of translation. |
10 # | 10 # |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 # Only relevant for ARM where it suppresses a warning. | 48 # Only relevant for ARM where it suppresses a warning. |
49 # Ignored for other archs. | 49 # Ignored for other archs. |
50 '--no-fix-cortex-a8 ' + | 50 '--no-fix-cortex-a8 ' + |
51 '--eh-frame-hdr ' + | 51 '--eh-frame-hdr ' + |
52 # Give an error if any TEXTRELs occur. | 52 # Give an error if any TEXTRELs occur. |
53 '-z text ' + | 53 '-z text ' + |
54 '--build-id ', | 54 '--build-id ', |
55 | 55 |
56 'SEARCH_DIRS' : '${SEARCH_DIRS_USER} ${SEARCH_DIRS_BUILTIN}', | 56 'SEARCH_DIRS' : '${SEARCH_DIRS_USER} ${SEARCH_DIRS_BUILTIN}', |
57 'SEARCH_DIRS_USER' : '', | 57 'SEARCH_DIRS_USER' : '', |
58 'SEARCH_DIRS_BUILTIN': '${USE_STDLIB ? ${LIBS_ARCH}/}', | 58 'SEARCH_DIRS_BUILTIN': '${USE_STDLIB ? ${LIBS_NATIVE_ARCH}/}', |
59 | |
60 'LIBS_ARCH' : '${LIBS_%ARCH%}', | |
61 'LIBS_ARM' : '${BASE_LIB_NATIVE}arm', | |
62 'LIBS_ARM_NONSFI' : '${BASE_LIB_NATIVE}arm-nonsfi', | |
63 'LIBS_X8632' : '${BASE_LIB_NATIVE}x86-32', | |
64 'LIBS_X8632_NONSFI': '${BASE_LIB_NATIVE}x86-32-nonsfi', | |
65 'LIBS_X8664' : '${BASE_LIB_NATIVE}x86-64', | |
66 'LIBS_MIPS32' : '${BASE_LIB_NATIVE}mips32', | |
67 | 59 |
68 # Note: this is only used in the unsandboxed case | 60 # Note: this is only used in the unsandboxed case |
69 'RUN_LD' : '${LD} ${LD_FLAGS} ${inputs} -o ${output}' | 61 'RUN_LD' : '${LD} ${LD_FLAGS} ${inputs} -o ${output}' |
70 } | 62 } |
71 | 63 |
72 def PassThrough(*args): | 64 def PassThrough(*args): |
73 env.append('LD_FLAGS', *args) | 65 env.append('LD_FLAGS', *args) |
74 | 66 |
75 LDPatterns = [ | 67 LDPatterns = [ |
76 ( '-o(.+)', "env.set('OUTPUT', pathtools.normalize($0))"), | 68 ( '-o(.+)', "env.set('OUTPUT', pathtools.normalize($0))"), |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 def LinkerFiles(args): | 253 def LinkerFiles(args): |
262 ret = [] | 254 ret = [] |
263 for f in args: | 255 for f in args: |
264 if IsFlag(f): | 256 if IsFlag(f): |
265 continue | 257 continue |
266 else: | 258 else: |
267 if not pathtools.exists(f): | 259 if not pathtools.exists(f): |
268 Log.Fatal("Unable to open '%s'", pathtools.touser(f)) | 260 Log.Fatal("Unable to open '%s'", pathtools.touser(f)) |
269 ret.append(f) | 261 ret.append(f) |
270 return ret | 262 return ret |
OLD | NEW |