diff mbox series

[v4,45/49] tests/tcg: enable building for RISCV64

Message ID 20180517174718.10107-46-alex.bennee@linaro.org
State Superseded
Headers show
Series fix building of tests/tcg | expand

Commit Message

Alex Bennée May 17, 2018, 5:47 p.m. UTC
As before, using Debian SID compilers.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

---
 tests/docker/Makefile.include                        |  1 +
 tests/docker/dockerfiles/debian-riscv64-cross.docker | 12 ++++++++++++
 tests/tcg/riscv/Makefile.include                     | 10 ++++++++++
 3 files changed, 23 insertions(+)
 create mode 100644 tests/docker/dockerfiles/debian-riscv64-cross.docker
 create mode 100644 tests/tcg/riscv/Makefile.include

-- 
2.17.0

Comments

Philippe Mathieu-Daudé May 18, 2018, 2:24 p.m. UTC | #1
On 05/17/2018 02:47 PM, Alex Bennée wrote:
> As before, using Debian SID compilers.

> 

> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

> ---

>  tests/docker/Makefile.include                        |  1 +

>  tests/docker/dockerfiles/debian-riscv64-cross.docker | 12 ++++++++++++

>  tests/tcg/riscv/Makefile.include                     | 10 ++++++++++

>  3 files changed, 23 insertions(+)

>  create mode 100644 tests/docker/dockerfiles/debian-riscv64-cross.docker

>  create mode 100644 tests/tcg/riscv/Makefile.include

> 

> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include

> index f58afb8c5d..d00887bdf1 100644

> --- a/tests/docker/Makefile.include

> +++ b/tests/docker/Makefile.include

> @@ -68,6 +68,7 @@ docker-image-debian-m68k-cross: docker-image-debian-sid

>  docker-image-debian-sh4-cross: docker-image-debian-sid

>  docker-image-debian-sparc64-cross: docker-image-debian-sid

>  docker-image-debian-mips64-cross: docker-image-debian-sid

> +docker-image-debian-riscv64-cross: docker-image-debian-sid

>  docker-image-travis: NOUSER=1

>  

>  # Expand all the pre-requistes for each docker image and test combination

> diff --git a/tests/docker/dockerfiles/debian-riscv64-cross.docker b/tests/docker/dockerfiles/debian-riscv64-cross.docker

> new file mode 100644

> index 0000000000..2b2e64cee6

> --- /dev/null

> +++ b/tests/docker/dockerfiles/debian-riscv64-cross.docker

> @@ -0,0 +1,12 @@

> +#

> +# Docker cross-compiler target

> +#

> +# This docker target builds on the debian sid base image which

> +# contains cross compilers for Debian "ports" targets.

> +#

> +FROM qemu:debian-sid

> +

> +RUN DEBIAN_FRONTEND=noninteractive eatmydata \

> +    apt-get install -y --no-install-recommends \

> +        gcc-riscv64-linux-gnu \

> +        libc6-dev-riscv64-cross

> diff --git a/tests/tcg/riscv/Makefile.include b/tests/tcg/riscv/Makefile.include

> new file mode 100644

> index 0000000000..d92ac6c89f

> --- /dev/null

> +++ b/tests/tcg/riscv/Makefile.include

> @@ -0,0 +1,10 @@

> +#

> +# Makefile.include for all RISCV targets

> +#

> +# Debian only really cares about 64 bit going forward

> +#

> +

> +ifeq ($(TARGET_NAME),riscv64)

> +DOCKER_IMAGE=debian-riscv64-cross

> +DOCKER_CROSS_COMPILER=riscv64-linux-gnu-gcc

> +endif

> 


Using a snapshot:

-- >8 --
diff --git a/tests/docker/dockerfiles/debian-sid.docker
b/tests/docker/dockerfiles/debian-sid.docker
-# Duplicate deb line as deb-src
-RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >>
/etc/apt/sources.list
+# random 'working' snapshot
+RUN echo "deb
http://snapshot.debian.org/archive/debian/20180512T101008Z/ sid main" >
/etc/apt/sources.list && \
+    echo "deb-src
http://snapshot.debian.org/archive/debian/20180512T101008Z/ sid main" >>
/etc/apt/sources.list
--

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
diff mbox series

Patch

diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index f58afb8c5d..d00887bdf1 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -68,6 +68,7 @@  docker-image-debian-m68k-cross: docker-image-debian-sid
 docker-image-debian-sh4-cross: docker-image-debian-sid
 docker-image-debian-sparc64-cross: docker-image-debian-sid
 docker-image-debian-mips64-cross: docker-image-debian-sid
+docker-image-debian-riscv64-cross: docker-image-debian-sid
 docker-image-travis: NOUSER=1
 
 # Expand all the pre-requistes for each docker image and test combination
diff --git a/tests/docker/dockerfiles/debian-riscv64-cross.docker b/tests/docker/dockerfiles/debian-riscv64-cross.docker
new file mode 100644
index 0000000000..2b2e64cee6
--- /dev/null
+++ b/tests/docker/dockerfiles/debian-riscv64-cross.docker
@@ -0,0 +1,12 @@ 
+#
+# Docker cross-compiler target
+#
+# This docker target builds on the debian sid base image which
+# contains cross compilers for Debian "ports" targets.
+#
+FROM qemu:debian-sid
+
+RUN DEBIAN_FRONTEND=noninteractive eatmydata \
+    apt-get install -y --no-install-recommends \
+        gcc-riscv64-linux-gnu \
+        libc6-dev-riscv64-cross
diff --git a/tests/tcg/riscv/Makefile.include b/tests/tcg/riscv/Makefile.include
new file mode 100644
index 0000000000..d92ac6c89f
--- /dev/null
+++ b/tests/tcg/riscv/Makefile.include
@@ -0,0 +1,10 @@ 
+#
+# Makefile.include for all RISCV targets
+#
+# Debian only really cares about 64 bit going forward
+#
+
+ifeq ($(TARGET_NAME),riscv64)
+DOCKER_IMAGE=debian-riscv64-cross
+DOCKER_CROSS_COMPILER=riscv64-linux-gnu-gcc
+endif