* [PATCH v2] meson.build: expose TCG cross compiler information in summary
@ 2021-02-16 10:25 Alex Bennée
2021-02-16 10:43 ` Philippe Mathieu-Daudé
2021-02-16 10:49 ` Paolo Bonzini
0 siblings, 2 replies; 6+ messages in thread
From: Alex Bennée @ 2021-02-16 10:25 UTC (permalink / raw)
To: qemu-devel; +Cc: pbonzini, Alex Bennée, f4bug
Blink and you miss the cross TCG compiler stuff so lets display it
with the rest of the compiler information.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
v2
- use target_dirs/fs.exists() instead of find
---
meson.build | 18 ++++++++++++++++++
tests/tcg/configure.sh | 8 --------
2 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/meson.build b/meson.build
index a923f249d8..4462e7279e 100644
--- a/meson.build
+++ b/meson.build
@@ -2508,6 +2508,24 @@ endif
summary_info += {'strip binaries': get_option('strip')}
summary_info += {'sparse': sparse.found() ? sparse.full_path() : false}
summary_info += {'mingw32 support': targetos == 'windows'}
+
+# snarf the cross-compilation information for tests
+foreach target: target_dirs
+ tcg_mak = meson.current_build_dir() / 'tests/tcg' / 'config-' + target + '.mak'
+ if fs.exists(tcg_mak)
+ config_cross_tcg = keyval.load(tcg_mak)
+ target = config_cross_tcg['TARGET_NAME']
+ compiler = ''
+ if 'DOCKER_CROSS_CC_GUEST' in config_cross_tcg
+ summary_info += {target + ' tests': config_cross_tcg['DOCKER_CROSS_CC_GUEST'] +
+ ' via ' + config_cross_tcg['DOCKER_IMAGE']}
+ elif 'CROSS_CC_GUEST' in config_cross_tcg
+ summary_info += {target + ' tests'
+ : config_cross_tcg['CROSS_CC_GUEST'] }
+ endif
+ endif
+endforeach
+
summary(summary_info, bool_yn: true, section: 'Compilation')
# Targets and accelerators
diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh
index e1b70e25f2..77a18fd289 100755
--- a/tests/tcg/configure.sh
+++ b/tests/tcg/configure.sh
@@ -257,11 +257,3 @@ for target in $target_list; do
echo "DOCKER_CROSS_CC_GUEST=$container_cross_cc" >> $config_target_mak
fi
done
-
-# report container support state
-echo "cross containers $container"
-
-if test -n "$enabled_cross_compilers"; then
- echo
- echo "NOTE: guest cross-compilers enabled:$enabled_cross_compilers"
-fi
--
2.20.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] meson.build: expose TCG cross compiler information in summary
2021-02-16 10:25 [PATCH v2] meson.build: expose TCG cross compiler information in summary Alex Bennée
@ 2021-02-16 10:43 ` Philippe Mathieu-Daudé
2021-02-16 10:44 ` Philippe Mathieu-Daudé
2021-02-16 10:49 ` Paolo Bonzini
1 sibling, 1 reply; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-02-16 10:43 UTC (permalink / raw)
To: Alex Bennée, qemu-devel; +Cc: pbonzini
On 2/16/21 11:25 AM, Alex Bennée wrote:
> Blink and you miss the cross TCG compiler stuff so lets display it
> with the rest of the compiler information.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>
> ---
> v2
> - use target_dirs/fs.exists() instead of find
> ---
> meson.build | 18 ++++++++++++++++++
> tests/tcg/configure.sh | 8 --------
> 2 files changed, 18 insertions(+), 8 deletions(-)
>
> diff --git a/meson.build b/meson.build
> index a923f249d8..4462e7279e 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -2508,6 +2508,24 @@ endif
> summary_info += {'strip binaries': get_option('strip')}
> summary_info += {'sparse': sparse.found() ? sparse.full_path() : false}
> summary_info += {'mingw32 support': targetos == 'windows'}
> +
> +# snarf the cross-compilation information for tests
> +foreach target: target_dirs
> + tcg_mak = meson.current_build_dir() / 'tests/tcg' / 'config-' + target + '.mak'
> + if fs.exists(tcg_mak)
> + config_cross_tcg = keyval.load(tcg_mak)
> + target = config_cross_tcg['TARGET_NAME']
> + compiler = ''
> + if 'DOCKER_CROSS_CC_GUEST' in config_cross_tcg
> + summary_info += {target + ' tests': config_cross_tcg['DOCKER_CROSS_CC_GUEST'] +
> + ' via ' + config_cross_tcg['DOCKER_IMAGE']}
> + elif 'CROSS_CC_GUEST' in config_cross_tcg
> + summary_info += {target + ' tests'
> + : config_cross_tcg['CROSS_CC_GUEST'] }
> + endif
> + endif
> +endforeach
> +
> summary(summary_info, bool_yn: true, section: 'Compilation')
Testing on top of "Reintroduce the R5900 CPU":
https://www.mail-archive.com/qemu-devel@nongnu.org/msg782449.html
Compilation
...
CFI support : NO
strip binaries : NO
sparse : /usr/bin/cgcc
mingw32 support : NO
mipsel tests : mipsel-linux-gnu-gcc via
debian-mipsel-cross
r5900o32el tests : mipsr5900el-unknown-linux-gnu-gcc via
gentoo-mipsr5900el-cross
mips64el tests : mips64el-linux-gnuabi64-gcc via
debian-mips64el-cross
Targets and accelerators
TCG support : YES
TCG backend : native (x86_64)
TCG debug enabled : YES
target list : mipsel-linux-user
r5900o32el-linux-user mips64el-linux-user
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] meson.build: expose TCG cross compiler information in summary
2021-02-16 10:43 ` Philippe Mathieu-Daudé
@ 2021-02-16 10:44 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-02-16 10:44 UTC (permalink / raw)
To: Alex Bennée, qemu-devel@nongnu.org Developers; +Cc: Paolo Bonzini
On Tue, Feb 16, 2021 at 11:43 AM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> On 2/16/21 11:25 AM, Alex Bennée wrote:
> > Blink and you miss the cross TCG compiler stuff so lets display it
> > with the rest of the compiler information.
> >
> > Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> >
> > ---
> > v2
> > - use target_dirs/fs.exists() instead of find
> > ---
> > meson.build | 18 ++++++++++++++++++
> > tests/tcg/configure.sh | 8 --------
> > 2 files changed, 18 insertions(+), 8 deletions(-)
> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
and:
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] meson.build: expose TCG cross compiler information in summary
2021-02-16 10:25 [PATCH v2] meson.build: expose TCG cross compiler information in summary Alex Bennée
2021-02-16 10:43 ` Philippe Mathieu-Daudé
@ 2021-02-16 10:49 ` Paolo Bonzini
2021-02-16 10:57 ` Philippe Mathieu-Daudé
1 sibling, 1 reply; 6+ messages in thread
From: Paolo Bonzini @ 2021-02-16 10:49 UTC (permalink / raw)
To: Alex Bennée, qemu-devel; +Cc: f4bug
On 16/02/21 11:25, Alex Bennée wrote:
> Blink and you miss the cross TCG compiler stuff so lets display it
> with the rest of the compiler information.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>
> ---
> v2
> - use target_dirs/fs.exists() instead of find
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Using $(wildcard) could be better than TARGET_DIRS in
tests/Makefile.include, too, something like this:
diff --git a/tests/Makefile.include b/tests/Makefile.include
index d34254fb29..7203243b08 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -41,7 +41,7 @@ SYSEMU_TARGET_LIST := $(subst -softmmu.mak,,$(notdir \
SPEED = quick
# Build up our target list from the filtered list of ninja targets
-TARGETS=$(patsubst libqemu-%.fa, %, $(filter libqemu-%.fa,
$(ninja-targets)))
+TARGETS=$(patsubst tests/tcg/config-%.mak, %, $(wildcard
tests/tcg/config-target.mak))
# Per guest TCG tests
BUILD_TCG_TARGET_RULES=$(patsubst %,build-tcg-tests-%, $(TARGETS))
@@ -49,7 +49,7 @@ CLEAN_TCG_TARGET_RULES=$(patsubst %,clean-tcg-tests-%,
$(TARGETS))
RUN_TCG_TARGET_RULES=$(patsubst %,run-tcg-tests-%, $(TARGETS))
# Probe for the Docker Builds needed for each build
-$(foreach PROBE_TARGET,$(TARGET_DIRS), \
+$(foreach PROBE_TARGET,$(TARGETS), \
$(eval -include $(SRC_PATH)/tests/tcg/Makefile.prereqs))
$(BUILD_TCG_TARGET_RULES): build-tcg-tests-%: $(if
$(CONFIG_PLUGIN),test-plugins)
I'll test it and send it out.
Paolo
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] meson.build: expose TCG cross compiler information in summary
2021-02-16 10:49 ` Paolo Bonzini
@ 2021-02-16 10:57 ` Philippe Mathieu-Daudé
2021-02-16 11:07 ` Paolo Bonzini
0 siblings, 1 reply; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-02-16 10:57 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: Alex Bennée, qemu-devel@nongnu.org Developers
On Tue, Feb 16, 2021 at 11:49 AM Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> On 16/02/21 11:25, Alex Bennée wrote:
> > Blink and you miss the cross TCG compiler stuff so lets display it
> > with the rest of the compiler information.
> >
> > Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> >
> > ---
> > v2
> > - use target_dirs/fs.exists() instead of find
>
> Acked-by: Paolo Bonzini <pbonzini@redhat.com>
>
> Using $(wildcard) could be better than TARGET_DIRS in
> tests/Makefile.include, too, something like this:
>
> diff --git a/tests/Makefile.include b/tests/Makefile.include
> index d34254fb29..7203243b08 100644
> --- a/tests/Makefile.include
> +++ b/tests/Makefile.include
> @@ -41,7 +41,7 @@ SYSEMU_TARGET_LIST := $(subst -softmmu.mak,,$(notdir \
> SPEED = quick
>
> # Build up our target list from the filtered list of ninja targets
> -TARGETS=$(patsubst libqemu-%.fa, %, $(filter libqemu-%.fa,
> $(ninja-targets)))
> +TARGETS=$(patsubst tests/tcg/config-%.mak, %, $(wildcard
> tests/tcg/config-target.mak))
>
> # Per guest TCG tests
> BUILD_TCG_TARGET_RULES=$(patsubst %,build-tcg-tests-%, $(TARGETS))
> @@ -49,7 +49,7 @@ CLEAN_TCG_TARGET_RULES=$(patsubst %,clean-tcg-tests-%,
> $(TARGETS))
> RUN_TCG_TARGET_RULES=$(patsubst %,run-tcg-tests-%, $(TARGETS))
>
> # Probe for the Docker Builds needed for each build
> -$(foreach PROBE_TARGET,$(TARGET_DIRS), \
> +$(foreach PROBE_TARGET,$(TARGETS), \
> $(eval -include $(SRC_PATH)/tests/tcg/Makefile.prereqs))
>
> $(BUILD_TCG_TARGET_RULES): build-tcg-tests-%: $(if
> $(CONFIG_PLUGIN),test-plugins)
>
>
> I'll test it and send it out.
Doesn't work with your diff:
make: *** No rule to make target 'run-tcg-tests-r5900o32el-linux-user'. Stop.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] meson.build: expose TCG cross compiler information in summary
2021-02-16 10:57 ` Philippe Mathieu-Daudé
@ 2021-02-16 11:07 ` Paolo Bonzini
0 siblings, 0 replies; 6+ messages in thread
From: Paolo Bonzini @ 2021-02-16 11:07 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Alex Bennée, qemu-devel@nongnu.org Developers
On 16/02/21 11:57, Philippe Mathieu-Daudé wrote:
> On Tue, Feb 16, 2021 at 11:49 AM Paolo Bonzini <pbonzini@redhat.com> wrote:
>>
>> On 16/02/21 11:25, Alex Bennée wrote:
>>> Blink and you miss the cross TCG compiler stuff so lets display it
>>> with the rest of the compiler information.
>>>
>>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>>>
>>> ---
>>> v2
>>> - use target_dirs/fs.exists() instead of find
>>
>> Acked-by: Paolo Bonzini <pbonzini@redhat.com>
>>
>> Using $(wildcard) could be better than TARGET_DIRS in
>> tests/Makefile.include, too, something like this:
>>
>> diff --git a/tests/Makefile.include b/tests/Makefile.include
>> index d34254fb29..7203243b08 100644
>> --- a/tests/Makefile.include
>> +++ b/tests/Makefile.include
>> @@ -41,7 +41,7 @@ SYSEMU_TARGET_LIST := $(subst -softmmu.mak,,$(notdir \
>> SPEED = quick
>>
>> # Build up our target list from the filtered list of ninja targets
>> -TARGETS=$(patsubst libqemu-%.fa, %, $(filter libqemu-%.fa,
>> $(ninja-targets)))
>> +TARGETS=$(patsubst tests/tcg/config-%.mak, %, $(wildcard
>> tests/tcg/config-target.mak))
>>
>> # Per guest TCG tests
>> BUILD_TCG_TARGET_RULES=$(patsubst %,build-tcg-tests-%, $(TARGETS))
>> @@ -49,7 +49,7 @@ CLEAN_TCG_TARGET_RULES=$(patsubst %,clean-tcg-tests-%,
>> $(TARGETS))
>> RUN_TCG_TARGET_RULES=$(patsubst %,run-tcg-tests-%, $(TARGETS))
>>
>> # Probe for the Docker Builds needed for each build
>> -$(foreach PROBE_TARGET,$(TARGET_DIRS), \
>> +$(foreach PROBE_TARGET,$(TARGETS), \
>> $(eval -include $(SRC_PATH)/tests/tcg/Makefile.prereqs))
>>
>> $(BUILD_TCG_TARGET_RULES): build-tcg-tests-%: $(if
>> $(CONFIG_PLUGIN),test-plugins)
>>
>>
>> I'll test it and send it out.
>
> Doesn't work with your diff:
>
> make: *** No rule to make target 'run-tcg-tests-r5900o32el-linux-user'. Stop.
Not surprising since I didn't even run "make", it's just an idea that
can be done independent from Alex's patch (and was just inspired by it).
Paolo
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-02-16 11:08 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-16 10:25 [PATCH v2] meson.build: expose TCG cross compiler information in summary Alex Bennée
2021-02-16 10:43 ` Philippe Mathieu-Daudé
2021-02-16 10:44 ` Philippe Mathieu-Daudé
2021-02-16 10:49 ` Paolo Bonzini
2021-02-16 10:57 ` Philippe Mathieu-Daudé
2021-02-16 11:07 ` Paolo Bonzini
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.