OLD | NEW |
(Empty) | |
| 1 #!/bin/bash |
| 2 |
| 3 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. |
| 6 |
| 7 # Run a 32 bit binary on 64 bit linux, can be run from inside or outside |
| 8 # the chroot. |
| 9 |
| 10 . "$(dirname "$0")/common.sh" |
| 11 |
| 12 # Command line options |
| 13 DEFINE_string chroot "$DEFAULT_CHROOT_DIR" "Location of chroot" |
| 14 |
| 15 # Parse command line and update positional args |
| 16 FLAGS "$@" || exit 1 |
| 17 eval set -- "${FLAGS_ARGV}" |
| 18 |
| 19 # Die on any errors |
| 20 set -e |
| 21 |
| 22 if [ -z "$SYSROOT" ]; then |
| 23 if [ $INSIDE_CHROOT == 1 ]; then |
| 24 SYSROOT=/build/x86-generic |
| 25 else |
| 26 SYSROOT=$FLAGS_chroot/build/x86-generic |
| 27 fi |
| 28 fi |
| 29 |
| 30 if [ -z "$CHOST" ]; then |
| 31 CHOST=i686-pc-linux-gnu |
| 32 fi |
| 33 |
| 34 LIB_PATHS="/lib32:/usr/lib32:$LIB_PATHS:$SYSROOT/usr/lib:$SYSROOT/lib:." |
| 35 LIB_PATHS="$LIB_PATHS:$SYSROOT/opt/google/chrome/chromeos" |
| 36 export LD_LIBRARY_PATH=$LIB_PATHS |
| 37 |
| 38 exec "$@" |
OLD | NEW |