Cross compiling for i486 - too late now?

davidh davidh-lfs at tamix.com
Wed Apr 21 18:18:37 PDT 2004


On Wed, 21 Apr 2004 18:11:12 +0200, Matthias Benkmann wrote
> On Thu, 22 Apr 2004 00:23:14 +1200 "davidh" <davidh-lfs at tamix.com> wrote:
> 
> > Hi everyone,
> > 
> > I'm building a LFS (my second one), but this time I'm cross-compiling
> > for an i486.  Unfortunately I didn't read the cross compiling hint
> > until now - I'm already up to compiling GCC (pass 2; near the end of
> > chapter 5)
> > 
> > My question is this:  Am I too late to start using the uname hack now?
> > 
> > Since I've only built the toolchain, can I now install the uname hack
> > and have gcc build me i486 binaries from now on?
> > 
> > If I have to start over again, then so be it... but thats a waste of
> > around 4 hours build time...
> 
> Unless you were using special optimization options most of your binaries
> should run on a 486 just fine, even without cross-compiling. And you're
> still in chapter 5 anyway, so you haven't yet built one of the final
> binaries to be used on the target. It should be okay to start using the
> uname hack now without having to restart from the beginning.
> 
> MSB
> 

Okay, I went ahead and got up to compiling Glibc-2.3.2 in the chroot 
environment.  Unfortunately now it chokes on configure:

checking for i486-linux-gnu-gcc... no
checking for i486-linux-gnu-cc... no

.. and later ..

configure: error:
*** These critical programs are missing or too old: gcc
*** Check the INSTALL file for required versions.

It seems to me that I do need to build GCC for the i486; is this correct?

> Unless you were using special optimization options most of your binaries
> should run on a 486 just fine, even without cross-compiling.

Last time I just compiled everything on i686 and the kernel on i486.  Various 
things threw "Illegal instruction" errors when compiling/running, and I'm 
convinced that they were caused by the above issue.  Am I wrong?

Thanks,
David H






More information about the lfs-support mailing list