From: Paolo Bonzini <pbonzini@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>,
"Konstantin Kostiuk" <kkostiuk@redhat.com>,
QEMU <qemu-devel@nongnu.org>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Yan Vugenfirer" <yvugenfi@redhat.com>
Subject: Re: Cross-compilation artifact is broken
Date: Fri, 14 Mar 2025 15:21:49 +0100 [thread overview]
Message-ID: <ad3cacce-cfc2-4855-b7a4-a972745508b4@redhat.com> (raw)
In-Reply-To: <Z9GY3l2pTkbpMV8L@redhat.com>
On 3/12/25 15:23, Daniel P. Berrangé wrote:
>>> My question is, is this expected behavior or is this a bug?
>>
>> Your configure args don't include "--enable-debug", so I would
>> not have expected -gsplit-dwarf to have been enabled, so I'm
>> surprised that commit casued a problem.
>
> Hmm it appears that the meson "get_option('debug')" is entirely
> unconnected to QEMU's --enable-debug configure flag, which I did
> not realize.
Indeed get_option('debug') is connected to --enable-debug-info (which is
default-enabled).
> IOW, we've got -gsplit-dwarf enabled by default for everyone
> building QEMU, which feels dubious. IMHO only an explicit
> --enable-debug configure arg should have triggered it.
I didn't realize that you meant to attach it to --enable-debug. The
reason why meson.build checks get_option('debug') is simply because
-gsplit-dwarf implies turning on debug info.
Maybe it could use something like
diff --git a/configure b/configure
index 5d19d0036a1..18fd82a187e 100755
--- a/configure
+++ b/configure
@@ -1873,6 +1873,10 @@ if test "$skip_meson" = no; then
{ test "$host_os" = linux || test "$host_os" = "windows"; }; then
echo 'werror = true' >> $cross
fi
+ if test -e "$source_path/.git" && test "$host_os" != "windows"; then
+ echo 'split_debug = true' >> $cross
+ fi
+
echo "[project options]" >> $cross
if test "$SMBD" != ''; then
echo "smbd = $(meson_quote "$SMBD")" >> $cross
diff --git a/meson_options.txt b/meson_options.txt
index 809d0b42ef7..751dc39d22f 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -360,7 +360,7 @@ option('debug_mutex', type: 'boolean', value: false,
description: 'mutex debugging support')
option('debug_stack_usage', type: 'boolean', value: false,
description: 'measure coroutine stack usage')
-option('split_debug', type: 'boolean', value: true,
+option('split_debug', type: 'boolean', value: false,
description: 'split debug info from object files')
option('qom_cast_debug', type: 'boolean', value: true,
description: 'cast debugging support')
similar to --enable-werror... by the way I'm not sure if checking
for .git still works - I think recent RPM creates a fake git repo
to be able to run "git am", does it get rid of the .git directory
before starting the build?
> In addition since its breaking Windows builds, it appears we
> need to block its usage on Windows.
Yes, that's needed.
Paolo
next prev parent reply other threads:[~2025-03-14 14:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-12 13:52 Cross-compilation artifact is broken Konstantin Kostiuk
2025-03-12 14:05 ` Daniel P. Berrangé
2025-03-12 14:10 ` Konstantin Kostiuk
2025-03-12 14:23 ` Daniel P. Berrangé
2025-03-12 14:47 ` Peter Maydell
2025-03-12 14:55 ` Daniel P. Berrangé
2025-03-12 16:23 ` Alex Bennée
2025-03-14 8:21 ` Konstantin Kostiuk
2025-03-14 10:18 ` Alex Bennée
2025-03-14 14:21 ` Paolo Bonzini [this message]
2025-03-14 14:25 ` Daniel P. Berrangé
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=ad3cacce-cfc2-4855-b7a4-a972745508b4@redhat.com \
--to=pbonzini@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=berrange@redhat.com \
--cc=kkostiuk@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=yvugenfi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).