* [PATCH] decodecode: use cross-compiler/toolchain if defined
@ 2008-05-12 13:52 Vegard Nossum
2008-05-19 19:02 ` Sam Ravnborg
0 siblings, 1 reply; 3+ messages in thread
From: Vegard Nossum @ 2008-05-12 13:52 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: Randy Dunlap, linux-kernel
Hi Sam,
Not sure if this is really in the kbuild domain, but I see you've taken
patches to this script before, so I'll make an attempt too :-)
Vegard
>From 75166add6121dbda4fad2e197d4fe6525dee580c Mon Sep 17 00:00:00 2001
From: Vegard Nossum <vegard.nossum@gmail.com>
Date: Mon, 12 May 2008 15:36:38 +0200
Subject: [PATCH] decodecode: use cross-compiler/toolchain if defined
>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@oracle.com>
Signed-off-by: Vegard Nossum <vegardno@ifi.uio.no>
---
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] decodecode: use cross-compiler/toolchain if defined
2008-05-12 13:52 [PATCH] decodecode: use cross-compiler/toolchain if defined Vegard Nossum
@ 2008-05-19 19:02 ` Sam Ravnborg
2008-05-19 20:23 ` Vegard Nossum
0 siblings, 1 reply; 3+ messages in thread
From: Sam Ravnborg @ 2008-05-19 19:02 UTC (permalink / raw)
To: Vegard Nossum; +Cc: Randy Dunlap, linux-kernel
On Mon, May 12, 2008 at 03:52:42PM +0200, Vegard Nossum wrote:
> Hi Sam,
>
> Not sure if this is really in the kbuild domain, but I see you've taken
> patches to this script before, so I'll make an attempt too :-)
Fine - and thanks for the reminder (in private mail).
>
> Vegard
>
>
> From 75166add6121dbda4fad2e197d4fe6525dee580c Mon Sep 17 00:00:00 2001
> From: Vegard Nossum <vegard.nossum@gmail.com>
> Date: Mon, 12 May 2008 15:36:38 +0200
> Subject: [PATCH] decodecode: use cross-compiler/toolchain if defined
>
> 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.
I agree with the intent of this patch.
But as it is my experience that most people use
CROSS_COMPILE on the commandline and not as an
environmnet variable most will not benefit from this patch.
We should as a minimum document this use of decodecode where we
document its usage today (oops-tracing.txt).
We could also make it a Makefile target thus it is a bit
more natural to supply the typical Makefile parameters?
Please rework one way or the other.
Sam
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] decodecode: use cross-compiler/toolchain if defined
2008-05-19 19:02 ` Sam Ravnborg
@ 2008-05-19 20:23 ` Vegard Nossum
0 siblings, 0 replies; 3+ messages in thread
From: Vegard Nossum @ 2008-05-19 20:23 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: Randy Dunlap, linux-kernel
On Mon, May 19, 2008 at 9:02 PM, Sam Ravnborg <sam@ravnborg.org> wrote:
> On Mon, May 12, 2008 at 03:52:42PM +0200, Vegard Nossum wrote:
>>
>> From 75166add6121dbda4fad2e197d4fe6525dee580c Mon Sep 17 00:00:00 2001
>> From: Vegard Nossum <vegard.nossum@gmail.com>
>> Date: Mon, 12 May 2008 15:36:38 +0200
>> Subject: [PATCH] decodecode: use cross-compiler/toolchain if defined
>>
>> 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.
>
> I agree with the intent of this patch.
> But as it is my experience that most people use
> CROSS_COMPILE on the commandline and not as an
> environmnet variable most will not benefit from this patch.
I do use it on the command line too, it just has to come in front of
the 'make' command:
CROSS_COMPILE=x86_64-linux-unknown-gnu- make
> We should as a minimum document this use of decodecode where we
> document its usage today (oops-tracing.txt).
>
> We could also make it a Makefile target thus it is a bit
> more natural to supply the typical Makefile parameters?
>
> Please rework one way or the other.
I can try to do both those, however I don't see how this patch fails
to be an improvement in any case.
Thanks for the feedback.
Vegard
--
"The animistic metaphor of the bug that maliciously sneaked in while
the programmer was not looking is intellectually dishonest as it
disguises that the error is the programmer's own creation."
-- E. W. Dijkstra, EWD1036
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-05-19 20:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-12 13:52 [PATCH] decodecode: use cross-compiler/toolchain if defined Vegard Nossum
2008-05-19 19:02 ` Sam Ravnborg
2008-05-19 20:23 ` Vegard Nossum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®