Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Side by Side Diff: ld

Issue 9508007: Add a 32-bit gold binary and use it. (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/gold/
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « gold32 ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/sh 1 #!/bin/sh
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium 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 script named "ld" that either executes gold or the system linker. 6 # Wrapper script named "ld" that either executes gold or the system linker.
7 7
8 # The gold binary was built on 64-bit Ubuntu Lucid. Don't run it on 8 # The gold binaries are built on 64-bit Ubuntu Lucid and 32-bit Ubuntu Lucid,
9 # non-64-bit machines. Note that "uname -m" prints the kernel architecture, 9 # for x86_64 and i686, respectively.
10 # while this binary will also fail on 64-bit kernels with 32-bit userlands. 10 # Note that we do not use "uname -m" because it prints the kernel architecture,
11 # which can cause failures on 64-bit kernels with 32-bit userlands.
11 12
12 base_dir=$(dirname "$0") 13 base_dir=$(dirname "$0")
13 machine=$(getconf LONG_BIT) 14 machine=$(getconf LONG_BIT)
14 if [ "$machine" = "64" ]; then 15 if [ "$machine" = "64" ]; then
15 exec $base_dir/gold64 "$@" 16 exec $base_dir/gold64 "$@"
17 elif [ "$machine" = "32" ]; then
18 exec $base_dir/gold32 "$@"
16 else 19 else
17 # Fall back on the ld found in $PATH. 20 echo Unknown architecture
Evan Martin 2012/02/29 20:25:48 Maybe include the script name, so that someone who
18 exec ld "$@" 21 exit 1
19 fi 22 fi
OLDNEW
« no previous file with comments | « gold32 ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698