[PATCH] decodecode: use cross-compiler/toolchain if defined

From: Vegard Nossum
Date: Mon May 12 2008 - 09:36:38 EST


>From the Makefile: "CROSS_COMPILE specify [sic] the prefix used for all
executables used".

This is also very useful for decoding oopses on other archs than the
native one, so it seems natural to have it in the decodecode script as
well.

Cc: Randy Dunlap <randy.dunlap@xxxxxxxxxx>
Signed-off-by: Vegard Nossum <vegardno@xxxxxxxxxx>
---
scripts/decodecode | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/decodecode b/scripts/decodecode
index 235d393..09b45a0 100644
--- a/scripts/decodecode
+++ b/scripts/decodecode
@@ -48,8 +48,8 @@ if [ $marker -ne 0 ]; then
beforemark=`echo "$code" | cut -c-$((${marker} - 1))`
echo -n " .byte 0x" > $T.s
echo $beforemark | sed -e 's/ /,0x/g' >> $T.s
- as $AFLAGS -o $T.o $T.s
- objdump -S $T.o
+ ${CROSS_COMPILE}as $AFLAGS -o $T.o $T.s
+ ${CROSS_COMPILE}objdump -S $T.o
rm $T.o $T.s

# and fix code at-and-after marker
@@ -59,6 +59,6 @@ fi
code=`echo $code | sed -e 's/ [<(]/ /;s/[>)] / /;s/ /,0x/g'`
echo -n " .byte 0x" > $T.s
echo $code >> $T.s
-as $AFLAGS -o $T.o $T.s
-objdump -S $T.o
+${CROSS_COMPILE}as $AFLAGS -o $T.o $T.s
+${CROSS_COMPILE}objdump -S $T.o
rm $T $T.s $T.o
--
1.5.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/