[Crash-utility] [PATCH 0/5] let make flexible for multiple host

Toshikazu Nakayama nakayama.ts at ncos.nec.co.jp
Thu Apr 19 08:06:11 UTC 2012


(2012/04/18 21:57), Dave Anderson wrote:
> 
> 
> ----- Original Message -----
>> (2012/04/17 23:44), Dave Anderson wrote:

>> Then, I'll start mips architecture (seems to go toward embedded minority).
>> There are probably the similar considerations about cross compile.
>> I want to be done with "make target=MIPS host_cross=X86" by adding
>> mips tables.
> 
> Wait a minute -- how about putting the horse before the cart?  There
> is a significant amount of work involved with supporting MIPS as an
> architecture, which would have to be accomplished first.
>>
>>> Also, note that your patch fails because it collides with Rabin's queued
>>> fix for building SIAL for target=ARM and target=PPC builds:
>>>
>>>    [Crash-utility] [PATCH] build sial with TARGET_CFLAGS
>>>    https://www.redhat.com/archives/crash-utility/2012-March/msg00113.html
>>
>> I haven't caught this update. I'd send updated portion.
>>
>> Thanks,
>> Toshi
> 
> My hope was that you could accomplish the cross-compile automatically
> without invoking the extra "host_cross=X86" option support.  If
> configure sees that you're trying a "target=PPC" on an x86 or x86_64,
> then it could presume it's your unique cross-compile scenario, and
> then do whatever it has to do from that point on.

I investigated current configure's target definition.

[configure.c]
 #ifdef __i386__
         target_data.target = X86;
 #endif
  :
 #ifdef __x86_64__
         target_data.target = X86_64;
 #endif

I have to handle host type here, and toss it as gdb configure's --host.
This seems to be accomplished by switching compiler option.
 $ echo | gcc -E -dM - | grep __x86_64__
 #define __x86_64__ 1
 $ echo | gcc -m32 -E -dM - | grep __i386__
 #define __i386__ 1
By adding -m32 to configure.c build, configure becomes to handle i386 host.

I'm going to choose a gcc option for configure.c according by cross host type.
Incidentally, even if gdb was configured with --host=X86_64, there were
no obvious crash build problems in my cross environ.

I make respin which don't require option, also drop "is_cross" classification.

> I also was under the impression that a MIPS binary was not all that
> beneficial to the embedded folks, because it is not a typical
> situation where the crash analysis could take place *on* the embedded
> MIPS platform.
> 
> Dave 

I'm not sure about general MIPS platform fields yet, no experiences.
I just want to study about MIPS now, and I think implementing crash
is one of the faster approach to understand architecture parts in kernel.
Of course, I'm happy if MIPS crash analysis becomes beneficial to ...

Thanks,
Toshi

> --
> Crash-utility mailing list
> Crash-utility at redhat.com
> https://www.redhat.com/mailman/listinfo/crash-utility
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-configure-retake-the-way-of-host-compiler-detection.patch
Type: text/x-patch
Size: 16028 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20120419/3e70f6d8/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Makefile-wrap-cc-gcc-and-ar-with-common-make-variabl.patch
Type: text/x-patch
Size: 16362 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20120419/3e70f6d8/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-ppc-support-x86-cross.patch
Type: text/x-patch
Size: 948 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20120419/3e70f6d8/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-build_data-handle-CC-variable.patch
Type: text/x-patch
Size: 1155 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20120419/3e70f6d8/attachment-0003.bin>


More information about the Crash-utility mailing list