[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 67/74] tests/docker: Add debian-rx-cross image
From: |
Richard Henderson |
Subject: |
[PATCH v2 67/74] tests/docker: Add debian-rx-cross image |
Date: |
Tue, 3 May 2022 12:48:36 -0700 |
Build the entire cross tool chain from source.
For this reason, default to caching.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
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 <ysato@users.sourceforge.jp>
S: Orphan
F: target/rx/
+F: tests/docker/dockerfiles/debian-rx-cross.d/build-toolchain.sh
S390 TCG CPUs
M: Richard Henderson <richard.henderson@linaro.org>
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
--
2.34.1
- [PATCH v2 57/74] target/mips: Drop link syscall from semihosting, (continued)
- [PATCH v2 57/74] target/mips: Drop link syscall from semihosting, Richard Henderson, 2022/05/03
- [PATCH v2 53/74] target/nios2: Use semihosting/syscalls.h, Richard Henderson, 2022/05/03
- [PATCH v2 54/74] target/mips: Use an exception for semihosting, Richard Henderson, 2022/05/03
- [PATCH v2 60/74] target/mips: Avoid qemu_semihosting_log_out for UHI_plog, Richard Henderson, 2022/05/03
- [PATCH v2 56/74] target/mips: Create report_fault for semihosting, Richard Henderson, 2022/05/03
- [PATCH v2 58/74] target/mips: Drop pread and pwrite syscalls from semihosting, Richard Henderson, 2022/05/03
- [PATCH v2 59/74] target/mips: Use semihosting/syscalls.h, Richard Henderson, 2022/05/03
- [PATCH v2 63/74] target/mips: Simplify UHI_argnlen and UHI_argn, Richard Henderson, 2022/05/03
- [PATCH v2 65/74] target/xtensa: Use an exception for semihosting, Richard Henderson, 2022/05/03
- [PATCH v2 61/74] target/mips: Use error_report for UHI_assert, Richard Henderson, 2022/05/03
- [PATCH v2 67/74] tests/docker: Add debian-rx-cross image,
Richard Henderson <=
- [PATCH v2 64/74] target/mips: Remove GET_TARGET_STRING and FREE_TARGET_STRING, Richard Henderson, 2022/05/03
- [PATCH v2 69/74] target/rx: Fix the base of the fixed vector table, Richard Henderson, 2022/05/03
- [PATCH v2 73/74] target/rx: Implement libgloss semihosting, Richard Henderson, 2022/05/03
- [PATCH v2 71/74] target/rx: Consolidate exception helpers, Richard Henderson, 2022/05/03
- [PATCH v2 74/74] tests/tcg/rx: Enable semihosting multiarch tests, Richard Henderson, 2022/05/03
- [PATCH v2 62/74] semihosting: Remove qemu_semihosting_log_out, Richard Henderson, 2022/05/03
- [PATCH v2 66/74] target/xtensa: Use semihosting/syscalls.h, Richard Henderson, 2022/05/03
- [PATCH v2 68/74] hw/rx: Handle a kernel file that is ELF, Richard Henderson, 2022/05/03