From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: richard.henderson@linaro.org
Subject: [PATCH] configure, meson: move CPU_CFLAGS out of QEMU_CFLAGS
Date: Wed, 29 Sep 2021 17:18:50 +0200 [thread overview]
Message-ID: <20210929151850.65349-1-pbonzini@redhat.com> (raw)
Flags that choose the target architecture, such as -m32 on x86, affect
all invocations of the compiler driver, for example including options
such as --print-search-dirs. To ensure that they are treated as such,
place them in the cross file in the [binaries] section instead of
including them in QEMU_CFLAGS.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/configure b/configure
index dd34ca8774..9fea643cb8 100755
--- a/configure
+++ b/configure
@@ -142,11 +142,11 @@ lines: ${BASH_LINENO[*]}"
}
do_cc() {
- do_compiler "$cc" "$@"
+ do_compiler "$cc" $CPU_CFLAGS "$@"
}
do_cxx() {
- do_compiler "$cxx" "$@"
+ do_compiler "$cxx" $CPU_CFLAGS "$@"
}
# Append $2 to the variable named $1, with space separation
@@ -1334,7 +1334,6 @@ esac
eval "cross_cc_${cpu}=\$cc"
cross_cc_vars="$cross_cc_vars cross_cc_${cpu}"
-QEMU_CFLAGS="$CPU_CFLAGS $QEMU_CFLAGS"
# For user-mode emulation the host arch has to be one we explicitly
# support, even if we're using TCI.
@@ -4132,9 +4131,9 @@ if test "$skip_meson" = no; then
echo "c_link_args = [${LDFLAGS:+$(meson_quote $LDFLAGS)}]" >> $cross
echo "cpp_link_args = [${LDFLAGS:+$(meson_quote $LDFLAGS)}]" >> $cross
echo "[binaries]" >> $cross
- echo "c = [$(meson_quote $cc)]" >> $cross
- test -n "$cxx" && echo "cpp = [$(meson_quote $cxx)]" >> $cross
- test -n "$objcc" && echo "objc = [$(meson_quote $objcc)]" >> $cross
+ echo "c = [$(meson_quote $cc $CPU_CFLAGS)]" >> $cross
+ test -n "$cxx" && echo "cpp = [$(meson_quote $cxx $CPU_CFLAGS)]" >> $cross
+ test -n "$objcc" && echo "objc = [$(meson_quote $objcc $CPU_CFLAGS)]" >> $cross
echo "ar = [$(meson_quote $ar)]" >> $cross
echo "nm = [$(meson_quote $nm)]" >> $cross
echo "pkgconfig = [$(meson_quote $pkg_config_exe)]" >> $cross
--
2.31.1
next reply other threads:[~2021-09-29 15:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-29 15:18 Paolo Bonzini [this message]
2021-09-29 17:17 ` [PATCH] configure, meson: move CPU_CFLAGS out of QEMU_CFLAGS Philippe Mathieu-Daudé
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=20210929151850.65349-1-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/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.