OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/env 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 """Wrapper for invoking the BFD loader | 6 """Wrapper for invoking the BFD loader |
7 | 7 |
8 A simple script to invoke the bfd loader instead of gold. | 8 A simple script to invoke the bfd loader instead of gold. |
9 This script is in a filename "ld" so it can be invoked from gcc | 9 This script is in a filename "ld" so it can be invoked from gcc |
10 via the -B flag. | 10 via the -B flag. |
11 """ | 11 """ |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 cxx_bin = os.getenv('CXX', 'g++') | 62 cxx_bin = os.getenv('CXX', 'g++') |
63 | 63 |
64 args = [FindLDBFD(cxx_bin)] + args | 64 args = [FindLDBFD(cxx_bin)] + args |
65 libgcc = FindLibgcc(cxx_bin) | 65 libgcc = FindLibgcc(cxx_bin) |
66 if libgcc is not None: | 66 if libgcc is not None: |
67 args.append(libgcc) | 67 args.append(libgcc) |
68 return subprocess.call(args) | 68 return subprocess.call(args) |
69 | 69 |
70 if __name__ == "__main__": | 70 if __name__ == "__main__": |
71 sys.exit(main(sys.argv[1:])) | 71 sys.exit(main(sys.argv[1:])) |
OLD | NEW |