From patchwork Tue May 3 19:48:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 569028 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp9824840map; Tue, 3 May 2022 14:15:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrggjGaHdzflxfv2WOQtUI7Ys2CfVZUrDy1fOVNR/uEaQV1xqOaGNny203mn7fxqsku73w X-Received: by 2002:a05:6214:2301:b0:435:38af:2f87 with SMTP id gc1-20020a056214230100b0043538af2f87mr15277180qvb.83.1651612529021; Tue, 03 May 2022 14:15:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651612529; cv=none; d=google.com; s=arc-20160816; b=MTBOTHClUWNdHpqrD67Gf4BPcNCmpxyK8AqErxkWFepKzX5y46vu4CDyB2FSe8/oX9 IFsoQRntPW0cx7tgsZSke/SKW7J5RAFYOfdz36RXObyB8jyEP6i6n3GwszAhLzTGr2La wuxa9gkmlv8kLIj5wUjxpV1N7jBTZp8YglvA6dSSIzX/HgZSSSegLSfCr0ZmQgcu5lky 02tW2Mogpk/IsKNSZUaILVriCI2sMS/ZVi5MfC8UNqBErCiws22VYUaLgrPZgruYOhWm GXKTttBIcg4XcUhSiBUhLc5h8UAG4/QvEHEg6xMCXRrdyf1T4YYxAwy8L2aF6f3Lf4fW 2ZOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=PoRUGz2szMDJicl6LiDwHi+o01/ArFupEpZx2x6+ISI=; b=XTBW2qdjT8jENAZfxFpHOHivh0gSCMoTDckb7fM11IVVMLRfE3Kh0mZ2fmz0mM06G+ DJUWW6CFlc5EF7pFiVlksLwQ5GLR9YDo8jA1/XW1mFD5ToSRVDtnKsU9pV5qT0yot6oB fZQokQ63vz54jen/vdpjXd4rVOTn7OSt7hHfxW2l5ueUlMGGb8cZW2JmC/wrXabrN/yE OOz6AKyVXzKRoC4u5AqeL+6yAdMGBrEuVYnXOC4kdPnAPbt1yKKhpuHFA+l5+Rk/6awn utcOdu6ORjxJtEdJh1K/fKptgIzpXBqXAshF1cWI5TRkVIk22wiyPpEcGWGC9cW5xtcw OgJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="UWXG/xvT"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id n12-20020a05622a040c00b002f1fd4f5cdasi8693687qtx.736.2022.05.03.14.15.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 May 2022 14:15:29 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="UWXG/xvT"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:43304 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nlzrk-0006nR-HF for patch@linaro.org; Tue, 03 May 2022 17:15:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40592) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nlyZt-0000hU-FU for qemu-devel@nongnu.org; Tue, 03 May 2022 15:52:57 -0400 Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d]:37849) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nlyZr-0006Nr-Ab for qemu-devel@nongnu.org; Tue, 03 May 2022 15:52:56 -0400 Received: by mail-pg1-x52d.google.com with SMTP id 15so14810581pgf.4 for ; Tue, 03 May 2022 12:52:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=PoRUGz2szMDJicl6LiDwHi+o01/ArFupEpZx2x6+ISI=; b=UWXG/xvTRELgCqD7Gj4fW+QmJxBn2ZB/mOEaOoejrI1RBqJp67tXD/jrzjpW1MTtdW KjWko7slI/iP/Wg633Aez2qxKzeRUVUpEbzG5IEl08F0TnqAmlJV5GgFe5hMyaSN8t5S J5CkstPWLUeSLJL79fky1Y+JguYSk5/R2AsEHIFlZ4Rl/1uFw42ft/Yjism0c72GEq7m jwi7p3o4hRQRiepmKZdnbo+GBWIkECfNI4vr8Y/iB4DsvBgkGHPghM2HHK3uBycFMDk6 moHeibuFGpXdzmQsDiAmtAabxu/f4HcZ8u0pevB6RpQcBcP7XkCmm3kPfEdQLzOl/oEX soyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PoRUGz2szMDJicl6LiDwHi+o01/ArFupEpZx2x6+ISI=; b=4EdLsIe4GkLPCsWEfSsYl3Ein1IbzaH3R71GLb7yh42M2Jq4nlLH/iJC8LDMJ6sLY/ MVqf0vTum9b+R6ACW0zED9pI9HBjQJZ2TLb12u5+0+ji19rH5ycsJOLO1irisInpJHUd AfptcW4MXJ2ZD0uo2b3FbjC0E9sTJHgzmYx4vwKM4/rMreEVqC0106gvyDFthcnjG686 6Ts5AY3IuYiusVcvQG1Ecw/78Fux+YRQ4AxxWwDriODsbEh+GKYjoOtF+vka+eccDQ7D OIoqteVURhSq0ROxDBbPXAECYt6nCZ5bUa1gmVzXcWy/GP5uToVrUu4SW80myBxvd0N5 UmKg== X-Gm-Message-State: AOAM533LcRxR96qplncoM65qAUgUPwnWZR/fNHNI/0U++JUs8Q1ESWEE hVmE0pK5B5+qfL27J/DE4znp1k94ZU6MpA== X-Received: by 2002:a63:fa41:0:b0:3c2:1941:5894 with SMTP id g1-20020a63fa41000000b003c219415894mr9272333pgk.296.1651607573045; Tue, 03 May 2022 12:52:53 -0700 (PDT) Received: from stoup.. ([71.212.142.129]) by smtp.gmail.com with ESMTPSA id fz16-20020a17090b025000b001dbe11be891sm1692286pjb.44.2022.05.03.12.52.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 May 2022 12:52:52 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 67/74] tests/docker: Add debian-rx-cross image Date: Tue, 3 May 2022 12:48:36 -0700 Message-Id: <20220503194843.1379101-68-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220503194843.1379101-1-richard.henderson@linaro.org> References: <20220503194843.1379101-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52d; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Build the entire cross tool chain from source. For this reason, default to caching. Signed-off-by: Richard Henderson --- MAINTAINERS | 1 + tests/docker/Makefile.include | 6 ++ .../debian-rx-cross.d/build-toolchain.sh | 58 +++++++++++++++++++ tests/tcg/configure.sh | 6 ++ 4 files changed, 71 insertions(+) create mode 100755 tests/docker/dockerfiles/debian-rx-cross.d/build-toolchain.sh diff --git a/MAINTAINERS b/MAINTAINERS index 294c88ace9..62d2640f35 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -297,6 +297,7 @@ RENESAS RX CPUs R: Yoshinori Sato S: Orphan F: target/rx/ +F: tests/docker/dockerfiles/debian-rx-cross.d/build-toolchain.sh S390 TCG CPUs M: Richard Henderson diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index ca2157db46..1795a49da2 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -142,6 +142,10 @@ docker-image-debian-nios2-cross: $(DOCKER_FILES_DIR)/debian-toolchain.docker \ $(DOCKER_FILES_DIR)/debian-nios2-cross.d/build-toolchain.sh $(call debian-toolchain, $@) +docker-image-debian-rx-cross: $(DOCKER_FILES_DIR)/debian-toolchain.docker \ + $(DOCKER_FILES_DIR)/debian-rx-cross.d/build-toolchain.sh + $(call debian-toolchain, $@) + # Specialist build images, sometimes very limited tools docker-image-debian-tricore-cross: docker-image-debian10 docker-image-debian-all-test-cross: docker-image-debian10 @@ -149,6 +153,7 @@ docker-image-debian-microblaze-cross: docker-image-debian10 docker-image-debian-nios2-cross: docker-image-debian10 docker-image-debian-powerpc-test-cross: docker-image-debian11 docker-image-debian-riscv64-test-cross: docker-image-debian11 +docker-image-debian-rx-cross: docker-image-debian10 # These images may be good enough for building tests but not for test builds DOCKER_PARTIAL_IMAGES += debian-alpha-cross @@ -158,6 +163,7 @@ DOCKER_PARTIAL_IMAGES += debian-m68k-cross debian-mips64-cross DOCKER_PARTIAL_IMAGES += debian-microblaze-cross DOCKER_PARTIAL_IMAGES += debian-nios2-cross DOCKER_PARTIAL_IMAGES += debian-riscv64-test-cross +DOCKER_PARTIAL_IMAGES += debian-rx-cross DOCKER_PARTIAL_IMAGES += debian-sh4-cross debian-sparc64-cross DOCKER_PARTIAL_IMAGES += debian-tricore-cross DOCKER_PARTIAL_IMAGES += debian-xtensa-cross diff --git a/tests/docker/dockerfiles/debian-rx-cross.d/build-toolchain.sh b/tests/docker/dockerfiles/debian-rx-cross.d/build-toolchain.sh new file mode 100755 index 0000000000..0d22280dee --- /dev/null +++ b/tests/docker/dockerfiles/debian-rx-cross.d/build-toolchain.sh @@ -0,0 +1,58 @@ +#!/bin/bash + +set -e + +TARGET=rx-elf + +J=$(expr $(nproc) / 2) +TOOLCHAIN_INSTALL=/usr/local +TOOLCHAIN_BIN=${TOOLCHAIN_INSTALL}/bin +CROSS_SYSROOT=${TOOLCHAIN_INSTALL}/$TARGET/sys-root + +export PATH=${TOOLCHAIN_BIN}:$PATH + +# +# Grab all of the source for the toolchain bootstrap. +# + +wget https://ftp.gnu.org/gnu/binutils/binutils-2.37.tar.xz +wget https://ftp.gnu.org/gnu/gcc/gcc-11.2.0/gcc-11.2.0.tar.xz + +tar axf binutils-2.37.tar.xz +tar axf gcc-11.2.0.tar.xz + +git clone --depth 1 --branch newlib-4.1.0 \ + https://sourceware.org/git/newlib-cygwin.git newlib-4.1.0 + +# Create a combined gcc/newlib source tree + +mkdir -p src/include +cd src +ln -s ../gcc*/* . || true +ln -s ../newlib*/* . || true +cd include +ln -s ../../gcc*/include/* . || true +ln -s ../../newlib*/include/* . || true +cd ../../ + +# Build binutils + +mkdir -p bld-b +cd bld-b +../binu*/configure --disable-werror \ + --prefix=${TOOLCHAIN_INSTALL} --with-sysroot --target=${TARGET} +make -j${J} +make install +cd .. + +# Build gcc+newlib + +mkdir -p bld +cd bld +../src/configure --disable-werror --disable-shared \ + --prefix=${TOOLCHAIN_INSTALL} --with-sysroot --target=${TARGET} \ + --enable-languages=c --disable-libssp --disable-libsanitizer \ + --disable-libatomic --disable-libgomp --disable-libquadmath +make -j${J} +make install +cd .. diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh index 691d90abac..34c94f3045 100755 --- a/tests/tcg/configure.sh +++ b/tests/tcg/configure.sh @@ -68,6 +68,7 @@ fi : ${cross_cc_ppc64le="$cross_cc_ppc64"} : ${cross_cc_cflags_ppc64le="-m64 -mlittle-endian"} : ${cross_cc_riscv64="riscv64-linux-gnu-gcc"} +: ${cross_cc_rx="rx-elf-gcc"} : ${cross_cc_s390x="s390x-linux-gnu-gcc"} : ${cross_cc_sh4="sh4-linux-gnu-gcc"} : ${cross_cc_cflags_sparc="-m32 -mv8plus -mcpu=ultrasparc"} @@ -192,6 +193,11 @@ for target in $target_list; do container_image=debian-riscv64-test-cross container_cross_cc=riscv64-linux-gnu-gcc ;; + rx-*) + container_hosts=x86_64 + container_image=debian-rx-cross + container_cross_cc=rx-elf-gcc + ;; s390x-*) container_hosts=x86_64 container_image=debian-s390x-cross