OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 set -o nounset | 6 set -o nounset |
7 set -o errexit | 7 set -o errexit |
8 | 8 |
9 # Turn on/off debugging mode | 9 # Turn on/off debugging mode |
10 readonly PNACL_DEBUG=${PNACL_DEBUG:-false} | 10 readonly PNACL_DEBUG=${PNACL_DEBUG:-false} |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 readonly BUILD_PLATFORM_MAC | 84 readonly BUILD_PLATFORM_MAC |
85 readonly BUILD_PLATFORM_WIN | 85 readonly BUILD_PLATFORM_WIN |
86 readonly SCONS_BUILD_PLATFORM | 86 readonly SCONS_BUILD_PLATFORM |
87 readonly SO_PREFIX | 87 readonly SO_PREFIX |
88 readonly SO_EXT | 88 readonly SO_EXT |
89 readonly SO_DIR | 89 readonly SO_DIR |
90 | 90 |
91 BUILD_ARCH_X8632=false | 91 BUILD_ARCH_X8632=false |
92 BUILD_ARCH_X8664=false | 92 BUILD_ARCH_X8664=false |
93 BUILD_ARCH_ARM=false | 93 BUILD_ARCH_ARM=false |
| 94 BUILD_ARCH_MIPS=false |
94 if [ "${BUILD_ARCH}" == "x86_32" ] || | 95 if [ "${BUILD_ARCH}" == "x86_32" ] || |
95 [ "${BUILD_ARCH}" == "i386" ] || | 96 [ "${BUILD_ARCH}" == "i386" ] || |
96 [ "${BUILD_ARCH}" == "i686" ] ; then | 97 [ "${BUILD_ARCH}" == "i686" ] ; then |
97 BUILD_ARCH=x86_32 | 98 BUILD_ARCH=x86_32 |
98 BUILD_ARCH_X8632=true | 99 BUILD_ARCH_X8632=true |
99 elif [ "${BUILD_ARCH}" == "x86_64" ] ; then | 100 elif [ "${BUILD_ARCH}" == "x86_64" ] ; then |
100 BUILD_ARCH_X8664=true | 101 BUILD_ARCH_X8664=true |
101 elif [ "${BUILD_ARCH}" == "armv7l" ] ; then | 102 elif [ "${BUILD_ARCH}" == "armv7l" ] ; then |
102 BUILD_ARCH_ARM=true | 103 BUILD_ARCH_ARM=true |
| 104 elif [ "${BUILD_ARCH}" == "mips32" ] ; then |
| 105 BUILD_ARCH_MIPS=true |
103 else | 106 else |
104 echo "Unknown build arch '${BUILD_ARCH}'" | 107 echo "Unknown build arch '${BUILD_ARCH}'" |
105 exit -1 | 108 exit -1 |
106 fi | 109 fi |
107 readonly BUILD_ARCH | 110 readonly BUILD_ARCH |
108 readonly BUILD_ARCH_X8632 | 111 readonly BUILD_ARCH_X8632 |
109 readonly BUILD_ARCH_X8664 | 112 readonly BUILD_ARCH_X8664 |
| 113 readonly BUILD_ARCH_ARM |
| 114 readonly BUILD_ARCH_MIPS |
110 | 115 |
111 | 116 |
112 HOST_ARCH=${HOST_ARCH:-${BUILD_ARCH}} | 117 HOST_ARCH=${HOST_ARCH:-${BUILD_ARCH}} |
113 HOST_ARCH_X8632=false | 118 HOST_ARCH_X8632=false |
114 HOST_ARCH_X8664=false | 119 HOST_ARCH_X8664=false |
115 HOST_ARCH_ARM=false | 120 HOST_ARCH_ARM=false |
| 121 HOST_ARCH_MIPS=false |
116 if [ "${HOST_ARCH}" == "x86_32" ] || | 122 if [ "${HOST_ARCH}" == "x86_32" ] || |
117 [ "${HOST_ARCH}" == "i386" ] || | 123 [ "${HOST_ARCH}" == "i386" ] || |
118 [ "${HOST_ARCH}" == "i686" ] ; then | 124 [ "${HOST_ARCH}" == "i686" ] ; then |
119 HOST_ARCH=x86_32 | 125 HOST_ARCH=x86_32 |
120 HOST_ARCH_X8632=true | 126 HOST_ARCH_X8632=true |
121 elif [ "${HOST_ARCH}" == "x86_64" ] ; then | 127 elif [ "${HOST_ARCH}" == "x86_64" ] ; then |
122 HOST_ARCH_X8664=true | 128 HOST_ARCH_X8664=true |
123 elif [ "${HOST_ARCH}" == "armv7l" ] ; then | 129 elif [ "${HOST_ARCH}" == "armv7l" ] ; then |
124 HOST_ARCH_ARM=true | 130 HOST_ARCH_ARM=true |
| 131 elif [ "${HOST_ARCH}" == "mips32" ] ; then |
| 132 HOST_ARCH_MIPS=true |
125 else | 133 else |
126 echo "Unknown host arch '${HOST_ARCH}'" | 134 echo "Unknown host arch '${HOST_ARCH}'" |
127 exit -1 | 135 exit -1 |
128 fi | 136 fi |
129 readonly HOST_ARCH | 137 readonly HOST_ARCH |
130 readonly HOST_ARCH_X8632 | 138 readonly HOST_ARCH_X8632 |
131 readonly HOST_ARCH_X8664 | 139 readonly HOST_ARCH_X8664 |
132 readonly HOST_ARCH_ARM | 140 readonly HOST_ARCH_ARM |
| 141 readonly HOST_ARCH_MIPS |
133 | 142 |
134 if [ "${BUILD_ARCH}" != "${HOST_ARCH}" ]; then | 143 if [ "${BUILD_ARCH}" != "${HOST_ARCH}" ]; then |
135 if ! { ${BUILD_ARCH_X8664} && ${HOST_ARCH_X8632}; }; then | 144 if ! { ${BUILD_ARCH_X8664} && ${HOST_ARCH_X8632}; }; then |
136 echo "Cross builds other than build=x86_64 with host=x86_32 not supported" | 145 echo "Cross builds other than build=x86_64 with host=x86_32 not supported" |
137 exit -1 | 146 exit -1 |
138 fi | 147 fi |
139 fi | 148 fi |
140 | 149 |
141 if ${BUILD_PLATFORM_WIN}; then | 150 if ${BUILD_PLATFORM_WIN}; then |
142 # TODO(robertm): switch this to svn.bat, hg.bat, git.bat, gclient.bat | 151 # TODO(robertm): switch this to svn.bat, hg.bat, git.bat, gclient.bat |
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
848 StepBanner "RUN-WITH-RETRY" "Retrying in ${delay_sec} seconds." | 857 StepBanner "RUN-WITH-RETRY" "Retrying in ${delay_sec} seconds." |
849 sleep ${delay_sec} | 858 sleep ${delay_sec} |
850 else | 859 else |
851 StepBanner "RUN-WITH-RETRY" \ | 860 StepBanner "RUN-WITH-RETRY" \ |
852 "'${cmdname}' failed ${max_retries} times. Aborting." | 861 "'${cmdname}' failed ${max_retries} times. Aborting." |
853 return 1 | 862 return 1 |
854 fi | 863 fi |
855 done | 864 done |
856 | 865 |
857 } | 866 } |
OLD | NEW |