[uClibc] arm toolchain/static binaries

David Muse dmuse at 4accesscommunications.com
Mon Jun 21 18:02:06 UTC 2004


> On Wednesday 16 June 2004 10:04, David Muse wrote:
> > Hello all,
> >
> > I've been using an arm-uclibc toolchain based on uclibc-0.9.21 for a while
> > now and I recently tried to upgrade to a toolchain based on the current cvs
> > snapshot.  I have been able to compile a complete toolchain and it can
> > build most of my code, but every now and then, it generates a static
> > binary.  If I rebuild the same code base again, the same binaries get
> > linked statically, so it's not exactly random, but I can't figure out why
> > it's linking them statically.  I'm not passing any flags that would cause
> > static linking, dynamic versions of each of the libraries that need to be
> > linked in are available, and the 0.9.21 toolchain builds dynamically linked
> > binaries.  It's kind of a subtle bug, I didn't notice it for a while until
> > one day I just noticed that the size of the jffs2 filesystem image that my
> > build process generates was larger than I remember.
> >
> > Has anyone else seen this?

I narrowed the problem down further and I think I figured out part of the problem.

When building the toolchain, the development library symlinks aren't getting
built right, so the linker can't necessarily find the shared object libraries.

For example, libdl.so should be symlinked to libdl-0.9.26.so in the same directory,
but instead, it's symlinked to libdl-0.9.26.so in another, non-existent directory.

It looks like RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB in the Makefile
at the top level of the uClibc distribution may be getting set to the wrong value.  I'm
not sure about that though, I'll have to do some more checking.

David Muse
dmuse at 4accesscommunications.com



More information about the uClibc mailing list