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

Unified 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, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gold32 ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ld
===================================================================
--- ld (revision 124095)
+++ ld (working copy)
@@ -5,14 +5,17 @@
# Wrapper script named "ld" that either executes gold or the system linker.
-# The gold binary was built on 64-bit Ubuntu Lucid. Don't run it on
-# non-64-bit machines. Note that "uname -m" prints the kernel architecture,
-# while this binary will also fail on 64-bit kernels with 32-bit userlands.
+# The gold binaries are built on 64-bit Ubuntu Lucid and 32-bit Ubuntu Lucid,
+# for x86_64 and i686, respectively.
+# Note that we do not use "uname -m" because it prints the kernel architecture,
+# which can cause failures on 64-bit kernels with 32-bit userlands.
base_dir=$(dirname "$0")
machine=$(getconf LONG_BIT)
if [ "$machine" = "64" ]; then
exec $base_dir/gold64 "$@"
+elif [ "$machine" = "32" ]; then
+ exec $base_dir/gold32 "$@"
else
# Fall back on the ld found in $PATH.
exec ld "$@"
Evan Martin 2012/02/29 16:17:48 Should we error out here? I think any other machi
Lei Zhang 2012/02/29 20:22:56 Sure. It would be good to catch these errors and f
« no previous file with comments | « gold32 ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698