[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 22/33] configure: include more binutils in tests/tcg makefile
From: |
Alex Bennée |
Subject: |
[PULL 22/33] configure: include more binutils in tests/tcg makefile |
Date: |
Wed, 1 Jun 2022 19:05:26 +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>
Message-Id: <20220527153603.887929-23-alex.bennee@linaro.org>
diff --git a/configure b/configure
index f55ae82a5d..ced8283b98 100755
--- a/configure
+++ b/configure
@@ -1880,11 +1880,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" ;;
@@ -2023,8 +2033,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}"
@@ -2035,12 +2050,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
@@ -2056,6 +2085,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"
@@ -2063,14 +2096,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
- [PULL 28/33] gitlab: introduce a common base job template, (continued)
- [PULL 28/33] gitlab: introduce a common base job template, Alex Bennée, 2022/06/01
- [PULL 24/33] configure: enable cross-compilation of s390-ccw, Alex Bennée, 2022/06/01
- [PULL 18/33] tests/tcg: merge configure.sh back into main configure script, Alex Bennée, 2022/06/01
- [PULL 32/33] gitlab: don't run CI jobs in forks by default, Alex Bennée, 2022/06/01
- [PULL 31/33] gitlab: convert build/container jobs to .base_job_template, Alex Bennée, 2022/06/01
- [PULL 17/33] tests/tcg: correct target CPU for sparc32, Alex Bennée, 2022/06/01
- [PULL 33/33] docs/devel: clean-up the CI links in the docs, Alex Bennée, 2022/06/01
- [PULL 29/33] gitlab: convert Cirrus jobs to .base_job_template, Alex Bennée, 2022/06/01
- [PULL 22/33] configure: include more binutils in tests/tcg makefile,
Alex Bennée <=
- [PULL 27/33] configure: remove unused variables from config-host.mak, Alex Bennée, 2022/06/01
- [PULL 30/33] gitlab: convert static checks to .base_job_template, Alex Bennée, 2022/06/01
- [PULL 26/33] configure: enable cross compilation of vof, Alex Bennée, 2022/06/01
- [PULL 15/33] build: do a full build before running TCG tests, Alex Bennée, 2022/06/01
- [PULL 23/33] configure: move symlink configuration earlier, Alex Bennée, 2022/06/01
- [PULL 19/33] configure: add missing cross compiler fallbacks, Alex Bennée, 2022/06/01
- [PULL 20/33] configure: handle host compiler in probe_target_compiler, Alex Bennée, 2022/06/01