best practices on gcc building host tool for cross arch
Michael Eager
eager@eagercon.com
Sun Jan 14 19:13:00 GMT 2007
tmike@recipes4linux.com wrote:
>
> Folks,
>
> I am trying to build a simple elf file parsing tool.
> Tool runs on a host, but wants to be able to parse core files
> from embedded architectures.
> host = x86
> embedded = arm
>
> In order to parse the embedded core file, the tool needs to see
> and read the embedded kernel header files.
>
> I would guess a version of gdb that runs on a host and debugs
> a different target has similar issues.
>
> Are there any "best-practices" for configuring/building/using gcc
> in this manner?
>
> This isn't strictly a "cross-compilation" build of gcc.
> Cheers,
> T.mike
Hi --
I don't see why you believe that this has anything to do
with building gcc.
If your program which parses core files needs headers from
the target kernel, you can reference them in your source.
Rather than "#include <stdio.h>" which would get the host
definitions, put "#include "<target>/usr/include/stdio.h"" in
the source for your parser, where <target> is the path to a
copy of the target's root directory tree.
--
Michael Eager eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077
More information about the Gcc-help
mailing list