qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 2/3] new: debian docker targets for cross-com


From: Alex Bennée
Subject: Re: [Qemu-devel] [PATCH v3 2/3] new: debian docker targets for cross-compiling
Date: Tue, 14 Feb 2017 15:10:49 +0000
User-agent: mu4e 0.9.19; emacs 25.2.3

Fam Zheng <address@hidden> writes:

> 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 address@hidden \
>> >     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-

Yeah that seems like a good idea. Then a make
address@hidden will work as expected ;-)

--
Alex Bennée



reply via email to

[Prev in Thread] Current Thread [Next in Thread]