qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 03/43] configure: add support for --cross-cc-


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v2 03/43] configure: add support for --cross-cc-FOO
Date: Thu, 19 Apr 2018 16:41:16 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

On 04/19/2018 08:58 AM, Alex Bennée 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>
> ---
>  configure | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 50 insertions(+)
> 

> @@ -483,6 +490,11 @@ for opt do
>    ;;
>    --disable-debug-info) debug_info="no"
>    ;;
> +  --cross-cc-*[!a-zA-Z0-9_0]=*) error_exit "Passed bad --cross-cc-FOO option"

Not quite right; it looks like you intended to have a trailing - instead
of 0; and if you are trying to filter out bad characters, then you need
* on both sides of the [!...] list:

--cross-cc-*[!a-zA-Z0-9_-]*=*)

otherwise you are only filtering out bad characters immediately before
the first =.  There's also the question of whether I can spell both
'--cross-cc-FOO=BAR' as one argument and '--cross-cc-FOO BAR' as two
arguments; this is filtering out only the one-argument case.

> +  ;;
> +  --cross-cc-*) cc_arch=${opt#--cross-cc-}
> +                eval "cross_cc_${cc_arch}=\$optarg"
> +  ;;


-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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