[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v1 22/33] configure: include more binutils in tests/tcg makefile
From: |
Alex Bennée |
Subject: |
[PATCH v1 22/33] configure: include more binutils in tests/tcg makefile |
Date: |
Fri, 27 May 2022 16:35:52 +0100 |
From: Paolo Bonzini <pbonzini@redhat.com>
Firmware builds require paths to all the binutils; it is not enough to
use only cc, or even as/ld as in the case of tests/tcg/tricore.
Adjust the cross-compiler configurator to detect also ar, nm, objcopy,
ranlib and strip.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220517092616.1272238-12-pbonzini@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
configure | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
diff --git a/configure b/configure
index c2b16c17b9..b8c21e096c 100755
--- a/configure
+++ b/configure
@@ -1875,11 +1875,21 @@ probe_target_compiler() {
container_image=
container_hosts=
container_cross_cc=
+ container_cross_ar=
container_cross_as=
container_cross_ld=
+ container_cross_nm=
+ container_cross_objcopy=
+ container_cross_ranlib=
+ container_cross_strip=
target_cc=
+ target_ar=
target_as=
target_ld=
+ target_nm=
+ target_objcopy=
+ target_ranlib=
+ target_strip=
case $1 in
aarch64) container_hosts="x86_64 aarch64" ;;
@@ -2018,8 +2028,13 @@ probe_target_compiler() {
;;
esac
: ${container_cross_cc:=${container_cross_prefix}gcc}
+ : ${container_cross_ar:=${container_cross_prefix}ar}
: ${container_cross_as:=${container_cross_prefix}as}
: ${container_cross_ld:=${container_cross_prefix}ld}
+ : ${container_cross_nm:=${container_cross_prefix}nm}
+ : ${container_cross_objcopy:=${container_cross_prefix}objcopy}
+ : ${container_cross_ranlib:=${container_cross_prefix}ranlib}
+ : ${container_cross_strip:=${container_cross_prefix}strip}
done
eval "target_cflags=\${cross_cc_cflags_$1}"
@@ -2030,12 +2045,26 @@ probe_target_compiler() {
else
compute_target_variable $1 target_cc gcc
fi
+ target_ccas=$target_cc
+ compute_target_variable $1 target_ar ar
compute_target_variable $1 target_as as
compute_target_variable $1 target_ld ld
+ compute_target_variable $1 target_nm nm
+ compute_target_variable $1 target_objcopy objcopy
+ compute_target_variable $1 target_ranlib ranlib
+ compute_target_variable $1 target_strip strip
if test "$1" = $cpu; then
: ${target_cc:=$cc}
+ : ${target_ccas:=$ccas}
: ${target_as:=$as}
: ${target_ld:=$ld}
+ : ${target_ar:=$ar}
+ : ${target_as:=$as}
+ : ${target_ld:=$ld}
+ : ${target_nm:=$nm}
+ : ${target_objcopy:=$objcopy}
+ : ${target_ranlib:=$ranlib}
+ : ${target_strip:=$strip}
fi
if test -n "$target_cc"; then
case $1 in
@@ -2051,6 +2080,10 @@ probe_target_compiler() {
write_target_makefile() {
if test -n "$target_cc"; then
echo "CC=$target_cc"
+ echo "CCAS=$target_ccas"
+ fi
+ if test -n "$target_ar"; then
+ echo "AR=$target_ar"
fi
if test -n "$target_as"; then
echo "AS=$target_as"
@@ -2058,14 +2091,32 @@ write_target_makefile() {
if test -n "$target_ld"; then
echo "LD=$target_ld"
fi
+ if test -n "$target_nm"; then
+ echo "NM=$target_nm"
+ fi
+ if test -n "$target_objcopy"; then
+ echo "OBJCOPY=$target_objcopy"
+ fi
+ if test -n "$target_ranlib"; then
+ echo "RANLIB=$target_ranlib"
+ fi
+ if test -n "$target_strip"; then
+ echo "STRIP=$target_strip"
+ fi
}
write_container_target_makefile() {
if test -n "$container_cross_cc"; then
echo "CC=\$(DOCKER_SCRIPT) cc --cc $container_cross_cc -i
qemu/$container_image -s $source_path --"
+ echo "CCAS=\$(DOCKER_SCRIPT) cc --cc $container_cross_cc -i
qemu/$container_image -s $source_path --"
fi
+ echo "AR=\$(DOCKER_SCRIPT) cc --cc $container_cross_ar -i
qemu/$container_image -s $source_path --"
echo "AS=\$(DOCKER_SCRIPT) cc --cc $container_cross_as -i
qemu/$container_image -s $source_path --"
echo "LD=\$(DOCKER_SCRIPT) cc --cc $container_cross_ld -i
qemu/$container_image -s $source_path --"
+ echo "NM=\$(DOCKER_SCRIPT) cc --cc $container_cross_nm -i
qemu/$container_image -s $source_path --"
+ echo "OBJCOPY=\$(DOCKER_SCRIPT) cc --cc $container_cross_objcopy -i
qemu/$container_image -s $source_path --"
+ echo "RANLIB=\$(DOCKER_SCRIPT) cc --cc $container_cross_ranlib -i
qemu/$container_image -s $source_path --"
+ echo "STRIP=\$(DOCKER_SCRIPT) cc --cc $container_cross_strip -i
qemu/$container_image -s $source_path --"
}
--
2.30.2
- [PATCH v1 13/33] build: clean up ninja invocation, (continued)
- [PATCH v1 13/33] build: clean up ninja invocation, Alex Bennée, 2022/05/27
- [PATCH v1 11/33] tests/docker: update debian-amd64 with lcitool, Alex Bennée, 2022/05/27
- [PATCH v1 33/33] docs/devel: clean-up the CI links in the docs, Alex Bennée, 2022/05/27
- [PATCH v1 24/33] configure: enable cross-compilation of s390-ccw, Alex Bennée, 2022/05/27
- [PATCH v1 16/33] configure, meson: move symlinking of ROMs to meson, Alex Bennée, 2022/05/27
- [PATCH v1 28/33] gitlab: introduce a common base job template, Alex Bennée, 2022/05/27
- [PATCH v1 22/33] configure: include more binutils in tests/tcg makefile,
Alex Bennée <=
- [PATCH v1 32/33] gitlab: don't run CI jobs in forks by default, Alex Bennée, 2022/05/27
- [PATCH v1 30/33] gitlab: convert static checks to .base_job_template, Alex Bennée, 2022/05/27
- [PATCH v1 31/33] gitlab: convert build/container jobs to .base_job_template, Alex Bennée, 2022/05/27
- [PATCH v1 19/33] configure: add missing cross compiler fallbacks, Alex Bennée, 2022/05/27
- [PATCH v1 21/33] configure: introduce --cross-prefix-*=, Alex Bennée, 2022/05/27