Ronald G. Minnich (rminnich@gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1953
-gerrit
commit 6707f161cab0f46a429a8002413a6e39846eff5e Author: Ronald G. Minnich rminnich@gmail.com Date: Fri Nov 30 08:32:36 2012 -0800
Extend xcompile support for strange names
Some compilers report littlearm instead of arm. But the compiler names itself arm. Recognize this strange convention and do the right thing. Note we assume "littlearm" and "arm" are the same -- a safe assumption. If we can find the person who runs ARM in big-endian mode someday, we can ask them why.
Change-Id: I39cb74b8c7ebf2e560c1f76efa0e2d28cc017d5c Signed-off-by: Ronald G. Minnich rminnich@gmail.com --- util/xcompile/xcompile | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile index cc01631..85eb695 100644 --- a/util/xcompile/xcompile +++ b/util/xcompile/xcompile @@ -51,6 +51,7 @@ testas() { local use_dash_twidth="$4" local obj_file="$TMPFILE.o" local full_arch="elf$twidth-$arch" + local little_full_arch="elf$twidth-little$arch"
rm -f "$obj_file" [ -n "$use_dash_twidth" ] && use_dash_twidth="--$twidth" @@ -60,7 +61,9 @@ testas() { # Check output content type. local obj_type="$(${gccprefixes}objdump -p $obj_file)" local obj_arch="$(expr "$obj_type" : '.*format (.[a-z0-9-]*)')" - [ "$obj_arch" = "$full_arch" ] || return 1 + [ "$obj_arch" = "$full_arch" ] || \ + [ "$obj_arch" = "$little_full_arch" ] || \ + return 1
# Architecture matched. GCCPREFIX="$gccprefixes" @@ -111,9 +114,9 @@ detect_special_flags() { # CFLAGS="$CFLAGS -mcpu=cortex-a9" testcc "$CC" "\ $CFLAGS -ffixed-r8 -msoft-float -marm -mabi=aapcs-linux \ --mno-thumb-interwork -march=armv7 -mno-thumb-interwork" && CFLAGS="\ +-mno-thumb-interwork -march=arm -mno-thumb-interwork" && CFLAGS="\ $CFLAGS -ffixed-r8 -msoft-float -marm -mabi=aapcs-linux \ --mno-thumb-interwork -march=armv7 -mno-thumb-interwork" +-mno-thumb-interwork -march=arm -mno-thumb-interwork" ;; esac } @@ -143,8 +146,8 @@ trap clean_up EXIT SUPPORTED_ARCHITECTURE="x86 arm"
# ARM Architecture -TARCH_arm="littlearm" -TCLIST_arm="littlearm" +TARCH_arm="arm" +TCLIST_arm="arm" TWIDTH_arm="32"
# X86 Architecture @@ -164,7 +167,7 @@ for architecture in $SUPPORTED_ARCHITECTURE; do
# To override toolchain, define CROSS_COMPILE_$arch or CROSS_COMPILE as # environment variable. - # Ex: CROSS_COMPILE_arm="armv7a-cros-linux-gnueabi-" + # Ex: CROSS_COMPILE_arm="arma-cros-linux-gnueabi-" # CROSS_COMPILE_x86="i686-pc-linux-gnu-" search="$(eval echo $CROSS_COMPILE_$architecture 2>/dev/null)" search="$search $CROSS_COMPILE"