qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: Matheus Ferst <matheus.ferst@eldorado.org.br>
Subject: [PULL 14/14] configure: fix parameter expansion of --cross-cc-cflags options
Date: Thu, 27 Jan 2022 12:10:37 +0100	[thread overview]
Message-ID: <20220127111037.457901-15-pbonzini@redhat.com> (raw)
In-Reply-To: <20220127111037.457901-1-pbonzini@redhat.com>

From: Matheus Ferst <matheus.ferst@eldorado.org.br>

Without this fix, any use of --cross-cc-cflags-* causes a message like:
$ ../configure --cross-cc-ppc64le=clang --cross-cc-cflags-ppc64le="-target powerpc64le-unknown-linux-gnu -sysroot ..."
../configure: 1: eval: cross_cc_cflags_--cross-cc-cflags-ppc64le=-target: not found
../configure: 3816: export: cross_cc_cflags_--cross-cc-cflags-ppc64le: bad variable name

Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220120173142.2755077-1-matheus.ferst@eldorado.org.br>
[Fix other occurrences too, noted by Philippe Mathieu-Daudé. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure              | 4 ++--
 docs/devel/testing.rst | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index e1a31fb332..e6cfc0e4be 100755
--- a/configure
+++ b/configure
@@ -402,7 +402,7 @@ for opt do
   ;;
   --cross-cc-*[!a-zA-Z0-9_-]*=*) error_exit "Passed bad --cross-cc-FOO option"
   ;;
-  --cross-cc-cflags-*) cc_arch=${opt#--cross-cc-flags-}; cc_arch=${cc_arch%%=*}
+  --cross-cc-cflags-*) cc_arch=${opt#--cross-cc-cflags-}; cc_arch=${cc_arch%%=*}
                       eval "cross_cc_cflags_${cc_arch}=\$optarg"
                       cross_cc_vars="$cross_cc_vars cross_cc_cflags_${cc_arch}"
   ;;
@@ -1328,7 +1328,7 @@ Advanced options (experts only):
   --extra-cxxflags=CXXFLAGS append extra C++ compiler flags CXXFLAGS
   --extra-ldflags=LDFLAGS  append extra linker flags LDFLAGS
   --cross-cc-ARCH=CC       use compiler when building ARCH guest test cases
-  --cross-cc-flags-ARCH=   use compiler flags when building ARCH guest tests
+  --cross-cc-cflags-ARCH=  use compiler flags when building ARCH guest tests
   --make=MAKE              use specified make [$make]
   --python=PYTHON          use specified python [$python]
   --sphinx-build=SPHINX    use specified sphinx-build [$sphinx_build]
diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
index d744b5909c..92d40cdd19 100644
--- a/docs/devel/testing.rst
+++ b/docs/devel/testing.rst
@@ -1324,7 +1324,7 @@ for the architecture in question, for example::
 
   $(configure) --cross-cc-aarch64=aarch64-cc
 
-There is also a ``--cross-cc-flags-ARCH`` flag in case additional
+There is also a ``--cross-cc-cflags-ARCH`` flag in case additional
 compiler flags are needed to build for a given target.
 
 If you have the ability to run containers as the user the build system
-- 
2.34.1



  parent reply	other threads:[~2022-01-27 11:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-27 11:10 [PULL 00/14] Misc patches for 2022-01-27 Paolo Bonzini
2022-01-27 11:10 ` [PULL 01/14] build-sys: fix a meson deprecation warning Paolo Bonzini
2022-01-27 11:10 ` [PULL 02/14] build-sys: fix undefined ARCH error Paolo Bonzini
2022-01-27 11:10 ` [PULL 03/14] docker: add msitools to Fedora/mingw cross Paolo Bonzini
2022-01-27 11:10 ` [PULL 04/14] intc: Unexport InterruptStatsProviderClass-related functions Paolo Bonzini
2022-01-27 11:10 ` [PULL 05/14] meson.build: Use a function from libfdt 1.5.1 for the library check Paolo Bonzini
2022-01-27 11:10 ` [PULL 06/14] exec/cpu: Make host pages variables / macros 'target agnostic' Paolo Bonzini
2022-01-27 11:10 ` [PULL 07/14] meson: Use find_program() to resolve the entitlement.sh script Paolo Bonzini
2022-01-27 11:10 ` [PULL 08/14] check-block.sh: passthrough -jN flag of make to -j N flag of check Paolo Bonzini
2022-01-27 11:10 ` [PULL 09/14] scripts/mtest2make: add support for SPEED=thorough Paolo Bonzini
2022-01-27 11:10 ` [PULL 10/14] build: make check-block a meson test Paolo Bonzini
2022-01-27 11:10 ` [PULL 11/14] qemu-iotests: require at least an argument to check-block.sh Paolo Bonzini
2022-01-27 11:10 ` [PULL 12/14] check-block: replace -makecheck with TAP output Paolo Bonzini
2022-01-27 11:10 ` [PULL 13/14] qapi: Cleanup SGX related comments and restore @section-size Paolo Bonzini
2022-01-27 11:10 ` Paolo Bonzini [this message]
2022-01-27 11:31 ` [PULL 00/14] Misc patches for 2022-01-27 Peter Maydell

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=20220127111037.457901-15-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=matheus.ferst@eldorado.org.br \
    --cc=qemu-devel@nongnu.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 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).