[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
- [Qemu-devel] [PULL 00/56] add check-tcg and associated machinery, Alex Bennée, 2018/06/19
- [Qemu-devel] [PULL 04/56] configure: set cross_cc_FOO for host compiler, Alex Bennée, 2018/06/19
- [Qemu-devel] [PULL 01/56] configure: add support for --cross-cc-FOO, Alex Bennée, 2018/06/19
- Re: [Qemu-devel] [PULL 01/56] configure: add support for --cross-cc-FOO,
Peter Maydell <=
- [Qemu-devel] [PULL 03/56] configure: allow user to specify --cross-cc-cflags-foo=, Alex Bennée, 2018/06/19
- [Qemu-devel] [PULL 05/56] docker: Add "cc" subcommand, Alex Bennée, 2018/06/19
- [Qemu-devel] [PULL 07/56] docker: allow "cc" command to run in user context, Alex Bennée, 2018/06/19
- [Qemu-devel] [PULL 08/56] docker: Makefile.include introduce DOCKER_SCRIPT, Alex Bennée, 2018/06/19
- [Qemu-devel] [PULL 02/56] configure: move i386_cc to cross_cc_i386, Alex Bennée, 2018/06/19
- [Qemu-devel] [PULL 06/56] docker: extend "cc" command to accept compiler, Alex Bennée, 2018/06/19
- [Qemu-devel] [PULL 09/56] tests/tcg: move architecture independent tests into subdir, Alex Bennée, 2018/06/19
- [Qemu-devel] [PULL 16/56] tests/tcg/i386: Build fix for hello-i386, Alex Bennée, 2018/06/19
- [Qemu-devel] [PULL 10/56] tests/tcg/multiarch: Build fix for linux-test, Alex Bennée, 2018/06/19
- [Qemu-devel] [PULL 13/56] tests/tcg/multiarch: move most output to stdout, Alex Bennée, 2018/06/19