From: "Alex Bennée" <alex.bennee@linaro.org>
To: Yeqi Fu <fufuyqqqqqq@gmail.com>
Cc: richard.henderson@linaro.org, qemu-devel@nongnu.org,
Paolo Bonzini <pbonzini@redhat.com>,
Thomas Huth <thuth@redhat.com>
Subject: Re: [RFC v4 01/11] build: Implement logic for sharing cross-building config files
Date: Thu, 10 Aug 2023 09:41:55 +0100 [thread overview]
Message-ID: <87v8dn2sot.fsf@linaro.org> (raw)
In-Reply-To: <20230808141739.3110740-2-fufuyqqqqqq@gmail.com>
Yeqi Fu <fufuyqqqqqq@gmail.com> writes:
> Signed-off-by: Yeqi Fu <fufuyqqqqqq@gmail.com>
> ---
> configure | 57 +++++++++++++++++++++++++++++++++----------------------
> 1 file changed, 34 insertions(+), 23 deletions(-)
>
> diff --git a/configure b/configure
> index 2b41c49c0d..a076583141 100755
> --- a/configure
> +++ b/configure
<snip>
>
> + # get the interpreter prefix and the path of libnative required for native call tests
> + if [ -d "/usr/$(echo "$target_cc" | sed 's/-gcc//')" ]; then
> + echo "LD_PREFIX=/usr/$(echo "$target_cc" | sed 's/-gcc//')" >> "$config_target_mak"
> + fi
> +
We need some gating and testing here because for mips on my system we
fallback to docker:
cat tests/tcg/mips-linux-user/config-target.mak
# Automatically generated by configure - do not modify
TARGET_NAME=mips
TARGET=mips-linux-user
EXTRA_CFLAGS=
CC=/home/alex/lsrc/qemu.git/builds/debug/pyvenv/bin/python3 -B /home/alex/lsrc/qemu.git/tests/docker/docker.py --engine docker cc --cc mips-linux-gnu-gcc -i qemu/debian-mips-cross -s /home/alex/lsrc/qemu.git --
CCAS=/home/alex/lsrc/qemu.git/builds/debug/pyvenv/bin/python3 -B /home/alex/lsrc/qemu.git/tests/docker/docker.py --engine docker cc --cc mips-linux-gnu-gcc -i qemu/debian-mips-cross -s /home/alex/lsrc/qemu.git --
AR=/home/alex/lsrc/qemu.git/builds/debug/pyvenv/bin/python3 -B /home/alex/lsrc/qemu.git/tests/docker/docker.py --engine docker cc --cc mips-linux-gnu-ar -i qemu/debian-mips-cross -s /home/alex/lsrc/qemu.git --
AS=/home/alex/lsrc/qemu.git/builds/debug/pyvenv/bin/python3 -B /home/alex/lsrc/qemu.git/tests/docker/docker.py --engine docker cc --cc mips-linux-gnu-as -i qemu/debian-mips-cross -s /home/alex/lsrc/qemu.git --
LD=/home/alex/lsrc/qemu.git/builds/debug/pyvenv/bin/python3 -B /home/alex/lsrc/qemu.git/tests/docker/docker.py --engine docker cc --cc mips-linux-gnu-ld -i qemu/debian-mips-cross -s /home/alex/lsrc/qemu.git --
NM=/home/alex/lsrc/qemu.git/builds/debug/pyvenv/bin/python3 -B /home/alex/lsrc/qemu.git/tests/docker/docker.py --engine docker cc --cc mips-linux-gnu-nm -i qemu/debian-mips-cross -s /home/alex/lsrc/qemu.git --
OBJCOPY=/home/alex/lsrc/qemu.git/builds/debug/pyvenv/bin/python3 -B /home/alex/lsrc/qemu.git/tests/docker/docker.py --engine docker cc --cc mips-linux-gnu-objcopy -i qemu/debian-mips-cross -s /home/alex/lsrc/qemu.git --
RANLIB=/home/alex/lsrc/qemu.git/builds/debug/pyvenv/bin/python3 -B /home/alex/lsrc/qemu.git/tests/docker/docker.py --engine docker cc --cc mips-linux-gnu-ranlib -i qemu/debian-mips-cross -s /home/alex/lsrc/qemu.git --
STRIP=/home/alex/lsrc/qemu.git/builds/debug/pyvenv/bin/python3 -B /home/alex/lsrc/qemu.git/tests/docker/docker.py --engine docker cc --cc mips-linux-gnu-strip -i qemu/debian-mips-cross -s /home/alex/lsrc/qemu.git --
BUILD_STATIC=y
QEMU=/home/alex/lsrc/qemu.git/builds/debug/qemu-mips
LD_PREFIX=/usr/
HOST_GDB_SUPPORTS_ARCH=y
LIBNATIVE=/home/alex/lsrc/qemu.git/builds/debug/common-user/native/mips-linux-user/libnative.so
but still set LD_PREFIX. We should at least check there is some sort of
ld.so in the LD_PREFIX path to indicate the loader is available.
> # will GDB work with these binaries?
> if test "${gdb_arches#*$arch}" != "$gdb_arches"; then
> echo "HOST_GDB_SUPPORTS_ARCH=y" >> "$config_target_mak"
> fi
> + fi
> +done
> +
> +# tests/tcg configuration
> +(mkdir -p tests/tcg
> +# create a symlink to the config-host.mak file in the tests/tcg
> +ln -srf $config_host_mak tests/tcg/config-host.mak
> +
> +tcg_tests_targets=
> +for target in $target_list; do
> + case $target in
> + *-softmmu)
> + test -f "$source_path/tests/tcg/$arch/Makefile.softmmu-target" || continue
> + ;;
> + esac
>
> + if test -f cross-build/$target/config-target.mak; then
> + mkdir -p "tests/tcg/$target"
> + ln -srf cross-build/$target/config-target.mak tests/tcg/$target/config-target.mak
> + ln -sf $source_path/tests/tcg/Makefile.target tests/tcg/$target/Makefile
> echo "run-tcg-tests-$target: $qemu\$(EXESUF)" >> Makefile.prereqs
> tcg_tests_targets="$tcg_tests_targets $target"
> fi
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
next prev parent reply other threads:[~2023-08-10 8:44 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-08 14:17 [RFC v4 00/11] Native Library Calls Yeqi Fu
2023-08-08 14:17 ` [RFC v4 01/11] build: Implement logic for sharing cross-building config files Yeqi Fu
2023-08-09 12:24 ` Manos Pitsidianakis
2023-08-09 14:42 ` Alex Bennée
2023-08-09 15:23 ` Alex Bennée
2023-08-10 8:41 ` Alex Bennée [this message]
2023-08-08 14:17 ` [RFC v4 02/11] build: Implement libnative library and the build machinery for libnative Yeqi Fu
2023-08-09 15:18 ` Alex Bennée
2023-08-09 16:10 ` Richard Henderson
2023-08-08 14:17 ` [RFC v4 03/11] linux-user: Implement envlist_appendenv and add tests for envlist Yeqi Fu
2023-08-09 15:27 ` Alex Bennée
2023-08-09 15:44 ` Richard Henderson
2023-08-09 16:06 ` Richard Henderson
2023-08-08 14:17 ` [RFC v4 04/11] linux-user: Implement native-bypass option support Yeqi Fu
2023-08-09 15:42 ` Richard Henderson
2023-08-09 15:47 ` Alex Bennée
2023-08-08 14:17 ` [RFC v4 05/11] linux-user/elfload: Add support for parsing symbols of native libraries Yeqi Fu
2023-08-09 16:14 ` Richard Henderson
2023-08-09 17:04 ` Alex Bennée
2023-08-08 14:17 ` [RFC v4 06/11] tcg: Add tcg opcodes and helpers for native library calls Yeqi Fu
2023-08-09 16:41 ` Alex Bennée
2023-08-08 14:17 ` [RFC v4 07/11] target/i386: Add support " Yeqi Fu
2023-08-09 16:44 ` Richard Henderson
2023-08-08 14:17 ` [RFC v4 08/11] target/mips: " Yeqi Fu
2023-08-08 14:17 ` [RFC v4 09/11] target/arm: " Yeqi Fu
2023-08-08 14:17 ` [RFC v4 10/11] tests/tcg/multiarch: Add nativecall.c test Yeqi Fu
2023-08-09 8:42 ` Alex Bennée
2023-08-09 17:01 ` Alex Bennée
2023-08-09 17:12 ` Alex Bennée
2023-08-08 14:17 ` [RFC v4 11/11] docs/user: Add doc for native library calls Yeqi Fu
2023-08-09 12:51 ` Manos Pitsidianakis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v8dn2sot.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=fufuyqqqqqq@gmail.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.