OLD | NEW |
1 #!/bin/sh | 1 #!/bin/sh |
2 # | 2 # |
3 # Copyright 2013 the V8 project authors. All rights reserved. | 3 # Copyright 2013 the V8 project authors. All rights reserved. |
4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
5 # modification, are permitted provided that the following conditions are | 5 # modification, are permitted provided that the following conditions are |
6 # met: | 6 # met: |
7 # | 7 # |
8 # * Redistributions of source code must retain the above copyright | 8 # * Redistributions of source code must retain the above copyright |
9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
10 # * Redistributions in binary form must reproduce the above | 10 # * Redistributions in binary form must reproduce the above |
(...skipping 19 matching lines...) Expand all Loading... |
30 if [ "$#" -lt 1 ]; then | 30 if [ "$#" -lt 1 ]; then |
31 echo "Usage: tools/cross_build_gcc.sh <GCC prefix> [make arguments ...]" | 31 echo "Usage: tools/cross_build_gcc.sh <GCC prefix> [make arguments ...]" |
32 exit 1 | 32 exit 1 |
33 fi | 33 fi |
34 | 34 |
35 export CXX=$1g++ | 35 export CXX=$1g++ |
36 export AR=$1ar | 36 export AR=$1ar |
37 export RANLIB=$1ranlib | 37 export RANLIB=$1ranlib |
38 export CC=$1gcc | 38 export CC=$1gcc |
39 export LD=$1g++ | 39 export LD=$1g++ |
| 40 export LINK=$1g++ |
40 | 41 |
41 OK=1 | 42 OK=1 |
42 if [ ! -x "$CXX" ]; then | 43 if [ ! -x "$CXX" ]; then |
43 echo "Error: $CXX does not exist or is not executable." | 44 echo "Error: $CXX does not exist or is not executable." |
44 OK=0 | 45 OK=0 |
45 fi | 46 fi |
46 if [ ! -x "$AR" ]; then | 47 if [ ! -x "$AR" ]; then |
47 echo "Error: $AR does not exist or is not executable." | 48 echo "Error: $AR does not exist or is not executable." |
48 OK=0 | 49 OK=0 |
49 fi | 50 fi |
50 if [ ! -x "$RANLIB" ]; then | 51 if [ ! -x "$RANLIB" ]; then |
51 echo "Error: $RANLIB does not exist or is not executable." | 52 echo "Error: $RANLIB does not exist or is not executable." |
52 OK=0 | 53 OK=0 |
53 fi | 54 fi |
54 if [ ! -x "$CC" ]; then | 55 if [ ! -x "$CC" ]; then |
55 echo "Error: $CC does not exist or is not executable." | 56 echo "Error: $CC does not exist or is not executable." |
56 OK=0 | 57 OK=0 |
57 fi | 58 fi |
58 if [ ! -x "$LD" ]; then | 59 if [ ! -x "$LD" ]; then |
59 echo "Error: $LD does not exist or is not executable." | 60 echo "Error: $LD does not exist or is not executable." |
60 OK=0 | 61 OK=0 |
61 fi | 62 fi |
| 63 if [ ! -x "$LINK" ]; then |
| 64 echo "Error: $LINK does not exist or is not executable." |
| 65 OK=0 |
| 66 fi |
62 if [ $OK -ne 1 ]; then | 67 if [ $OK -ne 1 ]; then |
63 exit 1 | 68 exit 1 |
64 fi | 69 fi |
65 | 70 |
66 shift | 71 shift |
67 make snapshot=off $@ | 72 make snapshot=off $@ |
OLD | NEW |