summaryrefslogtreecommitdiff
path: root/util/xcompile
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2014-08-27 15:30:19 -0700
committerPatrick Georgi <pgeorgi@google.com>2015-03-21 16:57:27 +0100
commita6b220d8f81a61e64d1c17add423b92ae2fa71e2 (patch)
tree9a72ffe846a447c5bd83ea8ba88457f2089bdf3d /util/xcompile
parentb1688caa6fa43c004af8c51502bf45dd5782fbdf (diff)
downloadcoreboot-a6b220d8f81a61e64d1c17add423b92ae2fa71e2.tar.xz
Allow for different BFD elf formats per architecture
The upcoming MIPS toolchain inside chroot generates elf images of elf32-tradlittlemips format, whereas readily available tools outside of chroot generate images of elf32-littlemips format. Both of these formats are perfectly fine, but xcompile accepts only one format per CPU architecture. This patch allows to specify multiple formats per architecture, any matching format will suffice. BUG=chrome-os-partner:31438 TEST=emerged arm, x86 and mips targets inside chroot Change-Id: I2c6b8e46b9299059b8e099b93c8c3dcf0a569899 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 7f2f1d51643f33b72ac5e4091669f38662e5b9ce Original-Change-Id: I22405e71ac72b985fad51e2f5d7cc014107b8a9e Original-Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/214599 Original-Reviewed-by: Stefan Reinauer <reinauer@google.com> Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/8823 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'util/xcompile')
-rwxr-xr-xutil/xcompile/xcompile21
1 files changed, 12 insertions, 9 deletions
diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile
index 29cad285cf..3c3b1a4e2f 100755
--- a/util/xcompile/xcompile
+++ b/util/xcompile/xcompile
@@ -172,7 +172,7 @@ SUPPORTED_ARCHITECTURE="x86 arm arm64 riscv mipsel"
arch_config_arm() {
TARCH="arm"
- TBFDARCH="littlearm"
+ TBFDARCHS="littlearm"
TCLIST="armv7a armv7-a"
TWIDTH="32"
TSUPP="arm armv4 armv7"
@@ -181,7 +181,7 @@ arch_config_arm() {
arch_config_arm64() {
TARCH="arm64"
- TBFDARCH="littleaarch64"
+ TBFDARCHS="littleaarch64"
TCLIST="aarch64"
TWIDTH="64"
TSUPP="arm64 armv8_64"
@@ -190,7 +190,7 @@ arch_config_arm64() {
arch_config_riscv() {
TARCH="riscv"
- TBFDARCH="littleriscv"
+ TBFDARCHS="littleriscv"
TCLIST="riscv"
TWIDTH="64"
TABI="elf"
@@ -198,7 +198,7 @@ arch_config_riscv() {
arch_config_x86() {
TARCH="x86_32"
- TBFDARCH="i386"
+ TBFDARCHS="i386"
TCLIST="i386 x86_64"
TWIDTH="32"
TABI="elf"
@@ -206,7 +206,7 @@ arch_config_x86() {
arch_config_mipsel() {
TARCH="mipsel"
- TBFDARCH="littlemips"
+ TBFDARCHS="tradlittlemips littlemips"
TCLIST="mipsel"
TWIDTH="32"
TABI="elf"
@@ -238,10 +238,13 @@ test_architecture() {
echo "# $architecture TARCH_SEARCH=$search"
# Search toolchain by checking assembler capability.
- for gccprefixes in $search ""; do
- program_exists "${gccprefixes}as" || continue
- testas "$gccprefixes" "$TWIDTH" "$TBFDARCH" "" && break
- testas "$gccprefixes" "$TWIDTH" "$TBFDARCH" "TRUE" && break
+ for TBFDARCH in $TBFDARCHS; do
+ for gccprefixes in $search ""; do
+ program_exists "${gccprefixes}as" || continue
+ testas "$gccprefixes" "$TWIDTH" "$TBFDARCH" "" && break
+ testas "$gccprefixes" "$TWIDTH" "$TBFDARCH" "TRUE" && break
+ done
+ [ "$GCCPREFIX" = "invalid" ] || break
done
if [ "$GCCPREFIX" = "invalid" ]; then