AIX Host -> PowerPC Linux
Kevin Heatwole
kdh@ocsystems.com
Mon Jun 4 19:44:00 GMT 2001
Thanks. This clears things up quite a bit.
I was unaware of the "-print-search-dirs" option on gcc. It wasn't
listed in the man page on gcc (that I have installed).
Can you or someone explain a little more how gcc finds the include directory?
Is there a similar default search path for includes?
In other words, when resolving "#include <stdio.h>", where does the
gcc cross compiler look?
I see $prefix/include and $prefix/$target/include (the later is where
I copied the /usr/include from the target machine - maybe this should
have been $prefix/$target/sys-include). There is also /usr/include,
but these are the include files for the host and I don't want them to
be looked at when using the cross.
Is the include directory hard coded using the --with-headers (a quick
look at the configure script seems to put these in sys-include)? If
so, then is $prefix/include or $prefix/$target/include searched at
all when doing a cross compile with no other options specified.
Thanks for any more help here. I am trying to get a handle on this
and there seems to be a bunch of options to consider.
Kevin
At 3:44 PM -0700 6/4/01, jimk wrote:
>Yes, you should be able to just copy the headers and libs to the
>appropriate place on the host machine. I've built a cross-compiler
>targetting linux hosted on win2k and I just pulled the libraries and
>headers off my linux box and that seemed to go okay.
>
>I grabbed the headers from the linux machine in /usr/include and I
>think you just need to point to wherever you put them with the --with-
>headers flag when you configure gcc.
>
>I grabbed the libs from /usr/lib and put them in $prefix/$target/lib and
>I put the libs from /lib in /lib/gcc/$target/2.95.3-2. Both of these I
>believe were listed in the search path when I did a "gcc -print-
>search-dirs". I belive that some of these libs came from when
>someone built glibc on this target machine before I got here, so I'm
>not sure what went into that. If you can build glibc on your target
>machine, you should be able to do it.
>
>I also needed to modify the file libc.so (text file) to point to where a
>couple of libs were that gave me link errors when I tried to build a
>test.c. Just look at that file when you get the link errors and you'll
>see how to modify it.
>
>HTH
>-Jim
>
>On 4 Jun 2001, at 13:56, Kevin Heatwole wrote:
>
>> I'm attempting to build a gcc cross-compiler hosted on AIX and
>> targeted to LinuxPPC (installed on an iMac).
>>
>> Everything looks very straight forward. The process I am using I got
>> from Bill Gatliff's site ( http://crossgcc.billgatliff.com ) where he
>> outlines how to build a cross-compiler for an embedded target. In
>> this process, you first build binutils (which built fine for me).
>> Then, you build a "gcc-core" (which also built fine for me). Then,
>> you use this little gcc cross-compiler to build glibc. And finally,
>> you rebuild a full gcc cross-compiler using the libs you built with
>> the little gcc cross-compiler.
>>
>> Unfortunately, glibc isn't building very well for me. I've had to
>> edit some files that had preprocessing errors to get the build to
>> succeed (I haven't gotten all the way through this yet, though).
>>
>> Anyway, my question to the group is:
>>
>> Since I already have a complete LinuxPPC environment including a gcc
>> and all it's libraries sitting on the iMac and this is the platform I
>> want to build a gcc cross for (so I can build complete binaries on
>> AIX and just ftp them to the iMac), shouldn't I be able to just copy
>> all these libraries/include files into my cross on AIX and not have
>> to rebuild anything (especially the glibc that I'm having problems
>> building now)?
>>
>> Can someone indicate what files/directories I should copy from
>> LinuxPPC into my gcc cross on AIX to do this and where I should put
>> them on AIX?
>>
>> Thanks for any help... I just want to give this a try before I turn
>> to hiring a consultant to do it for me.
>>
>> Kevin
>> --
>>
>> ------
>> Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
> > Want to unsubscribe? Send a note to
>crossgcc-unsubscribe@sourceware.cygnus.com
>>
>>
>
>
>
>------
>Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
>Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
--
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
More information about the crossgcc
mailing list