Has any thought been given to making it easier to cross-compile GLIBC?

Mike Frysinger vapier@gentoo.org
Fri Mar 13 16:32:00 GMT 2009

On Friday 13 March 2009 10:53:08 david.hagood@gmail.com wrote:
> CC="arm-linux-gnueabi-gcc" AR=arm-linux-gnueabi-ar
> RANLIB=arm-linux-gnueabi-ranlib \

this is unnecessary

> ${BASE_DIR}/glibc-2.7/configure \
>          --enable-add-ons=ports,nptl   --host=arm-linux-gnueabi \
> --with-tls --prefix=/usr \

looks fine

> --with-headers=${BUILD_PREFIX}/gcc/gcc/include-fixed

this is fixed already in latest glibc versions

> then do a make && make lib && make install_root=${SYSROOT} install
> install-headers
> I have to:
> 1) copy ${BUILD_PREFIX}/glibc/ldfcn/libdl.so
> ${BUILD_PREFIX}/glibc/ldfcn/libdl.so.2, as the libdl.so.2 link isn't
> created and it breaks the subsequent build of GCC (pass 2).

ive never had a problem with this.  are you looking in the right place ?  
symlinks are put into /usr/lib/, not /lib/.

> 2) fix all the LD scripts created as a part of the install image (e.g.
> usr/lib/libpthread.so) to use the correct path for "install_root" rather
> than "/usr"

your toolchain is broken then and missing sysroot support.  fix that rather 
than mucking with glibc linker scripts.

> Everybody says "just use crosstools", but doesn't it seem, well, BROKEN to
> have to use a bunch of scripts to patch, bodge, and hack(pejorative)
> around the problems in glibc process?

not when people dont know how to cross-compile properly in the first place.  
answering the same mistakes over and over is tiresome.

> Or am I missing something here? I've looked around, but I've NEVER found a
> good tutorial on building glibc for a cross-compile environment (my
> specific use case is building on my P4 workstation programs to run under
> Debian on my Beagleboard).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://sourceware.org/pipermail/libc-help/attachments/20090313/efeb038d/attachment.sig>

More information about the Libc-help mailing list