qemu-devel
[Top][All Lists]
Advanced

[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



reply via email to

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