This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Difficulties building a static glibc


Hi all!

I'm trying to cross compile a static glibc (building for mips from an x86_64 machine).
I've successfully built a cross compiled system using the musl libc before, however there appeared to be a few bugs in the libc or gcc or something in the way I configured the various bits of software. Since I'm mostly unfamiliar with MIPS assembly, I figured that a sensible debugging step would be to build an alternative libc and compare the two.
Unfortunately, I've run into a few issues.

The first issue is that glibc for mips doesn't correctly generate libc-modules.h, needed for building the libc. This appears to be due to a patchset posted late last year:
https://sourceware.org/ml/libc-alpha/2014-09/msg00422.html
which appears to have made it into glibc-2.22.
Unfortunately, for a static build, libc-modules.h is not generated, breaking the build.

What would be an appropriate workaround?

I'm configuring glibc with:
--prefix=/usr \
--build=x86_64-unknown-linux-gnu \
--host=mips-linux-gnu \
--libexecdir=/usr/lib \
--libdir=/usr/lib \
--bindir=/usr/lib \
--includedir=/usr/include \
--with-headers=${sysroot}/usr/include \
--with-binutils=${sysroot}/bin \
--without-tls \
--disable-werror \
--disable-shared \
--disable-profile \
--enable-obsolete-rpc \
--enable-kernel=2.6.32

Thanks,
Alastair Hughes


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]