OLD | NEW |
1 # -*- python -*- | 1 # -*- python -*- |
2 # Copyright 2010 The Native Client Authors. All rights reserved. | 2 # Copyright 2010 The Native Client Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can | 3 # Use of this source code is governed by a BSD-style license that can |
4 # be found in the LICENSE file. | 4 # be found in the LICENSE file. |
5 | 5 |
6 Import('env') | 6 Import('env') |
7 | 7 |
8 # This is a simple smoke test for using nacl-glibc with static | 8 # This is a simple smoke test for using nacl-glibc with static |
9 # linking. It is also possible to run *all* the Scons-based tests | 9 # linking. It is also possible to run *all* the Scons-based tests |
10 # with static linking using the option nacl_static_link=1. | 10 # with static linking using the option nacl_static_link=1. |
(...skipping 16 matching lines...) Expand all Loading... |
27 if not env.Bit('nacl_static_link'): | 27 if not env.Bit('nacl_static_link'): |
28 # Currently nacl-gcc with -static passes [crt* object files] | 28 # Currently nacl-gcc with -static passes [crt* object files] |
29 # [user object file] [some libs] -lgcc -lgcc_eh [crt* object files] to | 29 # [user object file] [some libs] -lgcc -lgcc_eh [crt* object files] to |
30 # the linker but the last -lgcc_eh requires -lc. | 30 # the linker but the last -lgcc_eh requires -lc. |
31 env.Append( | 31 env.Append( |
32 LINKFLAGS=[ | 32 LINKFLAGS=[ |
33 '-static', | 33 '-static', |
34 '-T', 'ldscripts/%s.x.static' % GetLinkerScriptBaseName(env), | 34 '-T', 'ldscripts/%s.x.static' % GetLinkerScriptBaseName(env), |
35 '-lc'] | 35 '-lc'] |
36 ) | 36 ) |
37 env.ComponentProgram( | 37 nexe = env.ComponentProgram('glibc_static_hello', 'glibc_static_hello.c') |
38 'glibc_static_hello.nexe', | 38 |
39 'glibc_static_hello.c') | |
40 node = env.CommandSelLdrTestNacl( | 39 node = env.CommandSelLdrTestNacl( |
41 'glibc_static_hello.out', | 40 'glibc_static_hello.out', |
42 command=[env.File('glibc_static_hello.nexe')], | 41 nexe, |
43 stdout_golden=env.File('glibc_static_hello.stdout'), | 42 stdout_golden=env.File('glibc_static_hello.stdout'), |
44 glibc_static=True) | 43 glibc_static=True) |
45 env.AddNodeToTestSuite(node, ['small_tests'], 'run_glibc_static_hello_test') | 44 env.AddNodeToTestSuite(node, ['small_tests'], 'run_glibc_static_hello_test') |
OLD | NEW |