svn commit: branches/uClibc-nptl: ldso ldso/ldso ldso/ldso/i386 ldso/ldso/ etc...

Peter S. Mazinger ps.m at gmx.net
Mon Nov 28 00:54:22 UTC 2005


On Tue, 22 Nov 2005, Steven J. Hill wrote:

> Peter S. Mazinger wrote:
> > 
> > PTINC is added to CFLAGS (Rules.mak), so no need to add it separately
> > -DSHARED shouldn't be added at all to any CFLAGS (in libdl it will build
> > incorrect libdl.a)
> > -DSHARED is automagically used for .oS targets (and libdl.oS is already 
> > built w/ -DSHARED). If you need a file built w/ -DSHARED you add
> > lib*-so-y += file.oS to the list (see libdl/Makefile.in)
> >
> Too bad the 'ldso/ldso' directory Makefile.in file is broke. How about
> you fix it since I am trying to pick up the pieces of this effect on
> NPTL. 'ldso' should be built with '.oS' targets not '.os'.

ldso/ldso does not have 2 variants, only the shared one, looking at the 
source files only dl-elf.c (newly) has a reference to -DSHARED, but that 
was added for libdl.so. I can't see why you would need to do separation 
based on ifdef SHARED for ld.so itself.

the line is #ifdef IS_IN_rtld || (defined IS_IN_libdl && !defined SHARED)
so the section applies always to ld.so (and will apply only to libdl.o[s], 
but not libdl.oS

Something I can think of is that you use the libc-symbols.h file, that 
uses different options for files based on SHARED, maybe you should look 
there for your trouble.

There is a main difference between glibc and uclibc that you should take 
into account. glibc builds always 2 objects, one for lib*.so (w/ -DSHARED) 
and one for lib*.a w/o SHARED). That would be an overkill for uClibc I 
can't see justified, so I decided to build only one (if DO_PIC is 
enabled, else there are .os(PIC) and .o(non-PIC)) and only where it is 
needed (like libdl.c, __uClibc_main.c) there are always 2.

Peter

-- 
Peter S. Mazinger <ps dot m at gmx dot net>           ID: 0xA5F059F2
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08  BB6E C389 975E A5F0 59F2




More information about the uClibc mailing list