リビジョン | 479ca4ccd54afcd54b0163532709079233d64b97 (tree) |
---|---|
日時 | 2022-01-28 19:13:33 |
作者 | Matheus Ferst <matheus.ferst@eldo...> |
コミッター | Paolo Bonzini |
configure: fix parameter expansion of --cross-cc-cflags options
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>
@@ -402,7 +402,7 @@ for opt do | ||
402 | 402 | ;; |
403 | 403 | --cross-cc-*[!a-zA-Z0-9_-]*=*) error_exit "Passed bad --cross-cc-FOO option" |
404 | 404 | ;; |
405 | - --cross-cc-cflags-*) cc_arch=${opt#--cross-cc-flags-}; cc_arch=${cc_arch%%=*} | |
405 | + --cross-cc-cflags-*) cc_arch=${opt#--cross-cc-cflags-}; cc_arch=${cc_arch%%=*} | |
406 | 406 | eval "cross_cc_cflags_${cc_arch}=\$optarg" |
407 | 407 | cross_cc_vars="$cross_cc_vars cross_cc_cflags_${cc_arch}" |
408 | 408 | ;; |
@@ -1328,7 +1328,7 @@ Advanced options (experts only): | ||
1328 | 1328 | --extra-cxxflags=CXXFLAGS append extra C++ compiler flags CXXFLAGS |
1329 | 1329 | --extra-ldflags=LDFLAGS append extra linker flags LDFLAGS |
1330 | 1330 | --cross-cc-ARCH=CC use compiler when building ARCH guest test cases |
1331 | - --cross-cc-flags-ARCH= use compiler flags when building ARCH guest tests | |
1331 | + --cross-cc-cflags-ARCH= use compiler flags when building ARCH guest tests | |
1332 | 1332 | --make=MAKE use specified make [$make] |
1333 | 1333 | --python=PYTHON use specified python [$python] |
1334 | 1334 | --sphinx-build=SPHINX use specified sphinx-build [$sphinx_build] |
@@ -1324,7 +1324,7 @@ for the architecture in question, for example:: | ||
1324 | 1324 | |
1325 | 1325 | $(configure) --cross-cc-aarch64=aarch64-cc |
1326 | 1326 | |
1327 | -There is also a ``--cross-cc-flags-ARCH`` flag in case additional | |
1327 | +There is also a ``--cross-cc-cflags-ARCH`` flag in case additional | |
1328 | 1328 | compiler flags are needed to build for a given target. |
1329 | 1329 | |
1330 | 1330 | If you have the ability to run containers as the user the build system |