Cross Compiling Joys, Woes, and Insanity

Kumba kumba@gentoo.org
Thu Oct 23 08:04:00 GMT 2003


Dan Kegel wrote:

> I certainly came close to losing my mind while writing my script,
> so your experience corelates well with mine :-)

The script in all theory should work fine...Once I force glibc to submit 
to the inevitibility that it will build (Hey, it never hurts to threaten 
a software package...)


> Hmm.  Other people have occasionally run into problems like this, see e.g.
> http://www.x86-64.org/lists/discuss/msg03853.html
> ooh, and this one:
> http://mail.gnu.org/archive/html/bug-glibc/2003-07/msg00076.html
> which says
> "This indicates an interesting little build problem with current glibc,
> as it would appear that you can't build a shared glibc without already
> having glibc installed (crti.o is part of glibc).  A likely workaround
> is to first build glibc with --disable-shared, install, then rebuild."
> 
> No idea if that's accurate, or why I never ran into it.

I'll give the rebuilding idea a shot.  I have fussed with glibc once 
where I had to half-build gcc, install; half build glibc, install; 
finish gcc, install; finish glibc, install; rebuild gcc, install; 
rebuild glibc, install.  That was not fun.  It worked in the end, but 
did absolutely nothing (meager attempts at a sparc64-toolchain (64-bit)).

I'm open to trying a dual-build cycle of glibc, hopefully I will not 
have to resort to using make -k, but who knows.  Wicked are the ways of 
the glibc gremlins.

I wonder if a shared glibc is even necessary.  If the static glibc 
works...hey...  Have to try and if sucessful, see where to go from there.


> In any case, it would probably be a good idea for you to
> understand how shlib.lds is generated, and what it's for...
> - Dan

I'm convinced it's an issue on i686.  As I mentioned in my mail, the 
shlib.lds file issue didn't occur on a sparc64 box, indicating slight 
differences.  I do recall once, when I last tried to build an i686->mips 
cross-compiler manually, that a similar syntax error occurred in 
"ld.so.lds", and a google search revealed that this error occured if the 
gcc-bootstrap compiler was built with --disable-shared.  This specific 
issue was only on i686.  Sparc, the build worked flawlessly, and I had a 
functional sparc->mips cross-compiler, until it fell into disuse and I 
deleted it.  I think it was gcc-3.2.3 and glibc-2.3.2, so it was fairly 
modern.

Either way, I'll tinker with the dual-glibc build concept and report 
back successes or failures.  Maybe I'll be brave enough to bother the 
libc-alpha ML about it and see what happens.

Thanks,


--Kumba

-- 
"Such is oft the course of deeds that move the wheels of the world: 
small hands do them because they must, while the eyes of the great are 
elsewhere."  --Elrond


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list