[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 03/46] configure: add support for --cross-cc-
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v3 03/46] configure: add support for --cross-cc-FOO |
Date: |
Wed, 25 Apr 2018 18:03:40 +0100 |
On 24 April 2018 at 16:23, Alex Bennée <address@hidden> wrote:
> This allows us to specify cross compilers for our guests. This is
> useful for building test images/programs. Currently we re-run the
> compile test for each target. I couldn't think of a way to cache the
> value for a given arch without getting messier configure code.
>
> The cross compiler for the guest is visible to each target as
> CROSS_CC_GUEST in config-target.mak.
>
> Signed-off-by: Alex Bennée <address@hidden>
>
> ---
> v3
> - --cross-cc-*[!a-zA-Z0-9_-]*=*) error_exit...
> - --cross-cc-*) cc_arch=${opt#--cross-cc-}; cc_arch=${cc_arch%%=*}
> - add remaining target_compiler definitions
> ---
> configure | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 79 insertions(+)
>
> diff --git a/configure b/configure
> index b0ae632ee4..caa838a0d0 100755
> --- a/configure
> +++ b/configure
> @@ -453,6 +453,13 @@ vxhs=""
> libxml2=""
> docker="no"
>
> +# cross compilers defaults, can be overridden with --cross-cc-ARCH
> +cross_cc_aarch64="aarch64-linux-gnu-gcc"
> +cross_cc_arm="arm-linux-gnueabihf-gcc"
> +cross_cc_powerpc="powerpc-linux-gnu-gcc"
> +
> +enabled_cross_compilers=""
> +
> supported_cpu="no"
> supported_os="no"
> bogus_os="no"
> @@ -483,6 +490,11 @@ for opt do
> ;;
> --disable-debug-info) debug_info="no"
> ;;
> + --cross-cc-*[!a-zA-Z0-9_-]*=*) error_exit "Passed bad --cross-cc-FOO
> option"
> + ;;
> + --cross-cc-*) cc_arch=${opt#--cross-cc-}; cc_arch=${cc_arch%%=*}
> + eval "cross_cc_${cc_arch}=\$optarg"
> + ;;
Could we have --help text for the new configure options,
please?
thanks
-- PMM
- [Qemu-devel] [PATCH v3 00/46] fix building of tests/tcg, Alex Bennée, 2018/04/24
- [Qemu-devel] [PATCH v3 02/46] configure: add test for docker availability, Alex Bennée, 2018/04/24
- [Qemu-devel] [PATCH v3 01/46] docker: add "probe" command for configure, Alex Bennée, 2018/04/24
- [Qemu-devel] [PATCH v3 03/46] configure: add support for --cross-cc-FOO, Alex Bennée, 2018/04/24
- [Qemu-devel] [PATCH v3 05/46] configure: allow user to specify --cross-cc-cflags-foo=, Alex Bennée, 2018/04/24
- [Qemu-devel] [PATCH v3 06/46] configure: set cross_cc_FOO for host compiler, Alex Bennée, 2018/04/24
- [Qemu-devel] [PATCH v3 04/46] configure: move i386_cc to cross_cc_i386, Alex Bennée, 2018/04/24
- [Qemu-devel] [PATCH v3 07/46] Makefile: Rename TARGET_DIRS to TARGET_LIST, Alex Bennée, 2018/04/24
- [Qemu-devel] [PATCH v3 09/46] docker: extend "cc" command to accept compiler, Alex Bennée, 2018/04/24
- [Qemu-devel] [PATCH v3 11/46] docker: Makefile.include introduce DOCKER_SCRIPT, Alex Bennée, 2018/04/24
- [Qemu-devel] [PATCH v3 08/46] docker: Add "cc" subcommand, Alex Bennée, 2018/04/24
- [Qemu-devel] [PATCH v3 10/46] docker: allow "cc" command to run in user context, Alex Bennée, 2018/04/24