qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PULL 01/56] configure: add support for --cross-cc-FOO


From: Peter Maydell
Subject: Re: [Qemu-devel] [PULL 01/56] configure: add support for --cross-cc-FOO
Date: Wed, 20 Jun 2018 16:22:47 +0100

On 19 June 2018 at 16:43, 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.
>
> +# Do we have a cross compiler for this target?
> +if has $target_compiler; then
> +
> +    write_c_skeleton
> +
> +    if ! do_compiler $target_compiler -o $TMPE $TMPC -static ; then

Need quotes around "$target_compiler"


> +        # For host systems we might get away with building without -static
> +        if ! do_compiler $target_compiler -o $TMPE $TMPC ; then

Ditto

> +            target_compiler=""
> +        else
> +            enabled_cross_compilers="${enabled_cross_compilers} 
> ${target_compiler}"
> +            target_compiler_static="n"
> +        fi
> +    else
> +        enabled_cross_compilers="${enabled_cross_compilers} 
> ${target_compiler}"
> +        target_compiler_static="y"
> +    fi
> +else
> +    target_compiler=""
> +fi
>

> +if test -n "$enabled_cross_compilers"; then
> +    echo
> +    echo "NOTE: cross-compilers enabled:"
> +    printf '%s\n' $enabled_cross_compilers | sort -u
> +fi

This is going to do weird things in the case where one of the
target compilers is something like 'ccache gcc'.

thanks
-- PMM



reply via email to

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