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

Unified Diff: src/scripts/run_32bit.sh

Issue 1131002: A pair of scripts to make it easier to run and debug 32 bit executables on 64 bit systems (Closed)
Patch Set: add quotes to "$@" and use exec Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/scripts/debug_32bit.sh ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scripts/run_32bit.sh
diff --git a/src/scripts/run_32bit.sh b/src/scripts/run_32bit.sh
new file mode 100755
index 0000000000000000000000000000000000000000..4fcc82b0826d6288782bd396ef1c0fc28584fcb6
--- /dev/null
+++ b/src/scripts/run_32bit.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+# Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Run a 32 bit binary on 64 bit linux, can be run from inside or outside
+# the chroot.
+
+. "$(dirname "$0")/common.sh"
+
+# Command line options
+DEFINE_string chroot "$DEFAULT_CHROOT_DIR" "Location of chroot"
+
+# Parse command line and update positional args
+FLAGS "$@" || exit 1
+eval set -- "${FLAGS_ARGV}"
+
+ # Die on any errors
+set -e
+
+if [ -z "$SYSROOT" ]; then
+ if [ $INSIDE_CHROOT == 1 ]; then
+ SYSROOT=/build/x86-generic
+ else
+ SYSROOT=$FLAGS_chroot/build/x86-generic
+ fi
+fi
+
+if [ -z "$CHOST" ]; then
+ CHOST=i686-pc-linux-gnu
+fi
+
+LIB_PATHS="/lib32:/usr/lib32:$LIB_PATHS:$SYSROOT/usr/lib:$SYSROOT/lib:."
+LIB_PATHS="$LIB_PATHS:$SYSROOT/opt/google/chrome/chromeos"
+export LD_LIBRARY_PATH=$LIB_PATHS
+
+exec "$@"
« no previous file with comments | « src/scripts/debug_32bit.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698