Index: tools/cross_build_gcc.sh |
diff --git a/build/gyp_v8.py b/tools/cross_build_gcc.sh |
old mode 100644 |
new mode 100755 |
similarity index 67% |
copy from build/gyp_v8.py |
copy to tools/cross_build_gcc.sh |
index 462ee674acbbc5880fe685507fb4527976f50de2..b9e87280db72a8c95d8f98db059e43f5664eacf5 |
--- a/build/gyp_v8.py |
+++ b/tools/cross_build_gcc.sh |
@@ -1,3 +1,5 @@ |
+#!/bin/sh |
+# |
# Copyright 2013 the V8 project authors. All rights reserved. |
# Redistribution and use in source and binary forms, with or without |
# modification, are permitted provided that the following conditions are |
@@ -25,17 +27,41 @@ |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
-# This file is (possibly, depending on python version) imported by |
-# gyp_v8 when GYP_PARALLEL=1 and it creates sub-processes through the |
-# multiprocessing library. |
+if [ "$#" -lt 1 ]; then |
+ echo "Usage: tools/cross_build_gcc.sh <GCC prefix> [make arguments ...]" |
+ exit 1 |
+fi |
-# Importing in Python 2.6 (fixed in 2.7) on Windows doesn't search for imports |
-# that don't end in .py (and aren't directories with an __init__.py). This |
-# wrapper makes "import gyp_v8" work with those old versions and makes it |
-# possible to execute gyp_v8.py directly on Windows where the extension is |
-# useful. |
+export CXX=$1g++ |
+export AR=$1ar |
+export RANLIB=$1ranlib |
+export CC=$1gcc |
+export LD=$1g++ |
-import os |
+OK=1 |
+if [ ! -x "$CXX" ]; then |
+ echo "Error: $CXX does not exist or is not executable." |
+ OK=0 |
+fi |
+if [ ! -x "$AR" ]; then |
+ echo "Error: $AR does not exist or is not executable." |
+ OK=0 |
+fi |
+if [ ! -x "$RANLIB" ]; then |
+ echo "Error: $RANLIB does not exist or is not executable." |
+ OK=0 |
+fi |
+if [ ! -x "$CC" ]; then |
+ echo "Error: $CC does not exist or is not executable." |
+ OK=0 |
+fi |
+if [ ! -x "$LD" ]; then |
+ echo "Error: $LD does not exist or is not executable." |
+ OK=0 |
+fi |
+if [ $OK -ne 1 ]; then |
+ exit 1 |
+fi |
-path = os.path.abspath(os.path.split(__file__)[0]) |
-execfile(os.path.join(path, 'gyp_v8')) |
+shift |
+make snapshot=off $@ |