On Tue, 02/14 22:00, Fam Zheng wrote: > On Tue, 02/14 10:07, Alex Bennée wrote: > > This provides a basic Debian install with access to the emdebian cross > > compilers. The debian-armhf-cross and debian-arm64-cross targets build > > on the basic Debian image to allow cross compiling to those targets. > > > > To build against the cross compiler a cross-compile prefix needs to be > > set in the configure options, for example: > > > > make docker-test-build@debian-arm64-cross \ > > EXTRA_CONFIGURE_OPTS="--cross-prefix=aarch64-linux-gnu-" \ > > TARGET_LIST="aarch64-softmmu,aarch64-linux-user" > > If cross-compile is the only meaningful way to use this image, we probably > should bake the configure option into the dockerfile and pick it up > automatically in common.rc. What do you think?
The example change is like this: diff --git a/tests/docker/common.rc b/tests/docker/common.rc index 21657e87c6..6865689bb5 100755 --- a/tests/docker/common.rc +++ b/tests/docker/common.rc @@ -29,7 +29,7 @@ build_qemu() config_opts="--enable-werror \ ${TARGET_LIST:+--target-list=${TARGET_LIST}} \ --prefix=$PWD/install \ - $EXTRA_CONFIGURE_OPTS \ + $QEMU_CONFIGURE_OPTS $EXTRA_CONFIGURE_OPTS \ $@" echo "Configure options:" echo $config_opts diff --git a/tests/docker/dockerfiles/debian-arm64-cross.docker b/tests/docker/dockerfiles/debian-arm64-cross.docker index 04212629f7..fc1c135e74 100644 --- a/tests/docker/dockerfiles/debian-arm64-cross.docker +++ b/tests/docker/dockerfiles/debian-arm64-cross.docker @@ -10,3 +10,4 @@ RUN dpkg --add-architecture arm64 RUN apt update RUN apt install -yy crossbuild-essential-arm64 RUN apt-get build-dep -yy -a arm64 qemu +ENV QEMU_CONFIGURE_OPTS --cross-prefix=aarch64-linux-gnu-