[TriLUG] OT: cross compiling
Joseph Mack NA3T
jmack at wm7d.net
Tue May 9 13:10:24 EDT 2006
On Tue, 9 May 2006, Ed Hill wrote:
> I haven't spent much time with cross-compilers but what you describe
> above doesn't seem necessary to me. If I was trying to boot-strap a
> full compiler system onto a non-native platform then I would probably do
> it in multiple stages:
> - build a local cross-compiler
> - build a compiler using the cross-compiler and install it
> in a non-/usr location on the remote machine
when you run `make install` for some packages, there seems
to be a lot of compiling going on before the install runs.
(I can't think of what right now, but I had one the other
day that took forever to do `make install` after `make` had
completed). For `make install`, I would have hoped that
/bin/install would just copy everything over and set
permissions. Because of the compiling that can take place on
`make install`, I can't imagine tar| untar'ing my build tree
and then running `make install` on the target machine. So I
expect I have to run `make install` on the build machine and
then copy everything over.
But I don't know, which is why I'm posting here.
> - using the non-/usr compiler on the remote machine, build a
> full native compiler
the problem is that I don't have build access on the target
machine (it's being used for other things and they don't
want me building the gnu tools there). So I'm hoping to
build all the native binaries of the gnu tools on my Linux
box and then copy everything over.
> None of the above stages involve doing a "make install" on the local
> (starting) platform that overwrote any system things in /usr. I just
> don't see why you would ever need (or even *want*) to do that -- its
> such a bad idea...
knowing that it's possible, I'll see if I can think how to
> Also, there are many ways to deal with libraries including:
> - build executables with static linkage
I'm going to have to do that anyhow - the gnu ld for AIX
doesn't understand shared libraries.
> - specify rpaths (see "man ld" for details)
better go look that up. I see "ignore rpath?" in configure
and I've never known what it was about.
> - add dirs to ld.so.conf
don't have ld.so.conf on the target machine.
> - use the old stand-by: "export LD_LIBRARY_PATH=..."
I'm using that .
Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant map
generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!
More information about the TriLUG