From 18e5ed202b773d8a2877fbcd2c4b2ebc951f2e23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Fri, 24 May 2019 10:27:36 +0100 Subject: build-all-arches: include x86 triplets in the build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There are a couple of minor warts: - 32 bit x86 can be either i386-linux-gnu or i686-linux-gnu - skip looking for x86_64-linux-gnu-gcc in docker cross envs Signed-off-by: Alex Bennée Signed-off-by: Peter Maydell --- build-all-archs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/build-all-archs b/build-all-archs index a7cd7c2..e5dcfc8 100755 --- a/build-all-archs +++ b/build-all-archs @@ -39,7 +39,7 @@ while [[ "$1" = -* ]]; do ;; --use-docker) if [ -z "$arg" ]; then - default_tags=$(docker images qemu --format "{{.Repository}}:{{.Tag}}" | grep "\(arm\|ppc64el\|m68k\).*cross$") + default_tags=$(docker images qemu --format "{{.Repository}}:{{.Tag}}" | grep "\(arm\|ppc64el\|m68k\|i386\).*cross$") docker_tags=$(echo $default_tags | sed 's/\n/\s/g' ) else docker_tags="$arg" @@ -74,7 +74,7 @@ fi DOCKER_RUN="docker run --rm -u $(id -u) -v $(pwd):$(pwd) -w $(pwd)" program_exists() { - if [ ! -z "$docker_tags" ]; then + if [[ ! -z "$docker_tags" && ! "$1" == "x86_64-linux-gnu-gcc" ]]; then use_docker_tag="" for tag in $docker_tags; do if ${DOCKER_RUN} ${tag} /bin/bash -c "command -v $1 >/dev/null"; then @@ -88,8 +88,10 @@ program_exists() { } # powerpc64-linux-gnu doesn't work at the moment, so not yet listed. -for triplet in aarch64-linux-gnu arm-linux-gnueabihf m68k-linux-gnu \ - powerpc64le-linux-gnu powerpc64-linux-gnu ; do +for triplet in i386-linux-gnu i686-linux-gnu x86_64-linux-gnu \ + aarch64-linux-gnu arm-linux-gnueabihf \ + m68k-linux-gnu \ + powerpc64le-linux-gnu powerpc64-linux-gnu ; do if ! program_exists "${triplet}-gcc"; then echo "Skipping ${triplet}: no compiler found" -- cgit v1.2.3