New build infrastructure in svn

Peter S. Mazinger ps.m at gmx.net
Wed Oct 26 08:42:51 UTC 2005


Hello!

I have committed a new set of Makefile's to svn, that allow:

1. IMA compiling (cc -c *.c -o) allowing the compiler to better optimize, 
producing smaller libraries (added -fcombine check for gcc-4.x, so that it 
does not remove "unused" functions). Currently 
libc/linuxthreads/libm/librt/ldso are not done, failure causes are either 
syscall use, where 3 macros are redefined (libc/librt) (to see what 
happens, comment DOMULTI=n in the library's toplevel Makefile.in), .c and 
.S can't be combined (ldso), different multiple defines, that show 
discrepancies between headers and sources
2. Allow non-PIC objects for archives (dependent on DOPIC, if DOPIC=y, 
the current behaviour is retained)
3. Allow objects to be added separately to 
uclibc-nonshared.a/libc.so/libc.a. This should be used by __uClibc_main.c 
and ldso (both do currently different hacks, weaks ..., to get around the 
problem having some objects in libc.so, but not in libc.a for ex.). 
Probably weaks.c could be also redone.
This feature could also be used to put lets say a pthread function into 
libc.
4. Started to support out of tree building (TOPDIR has to go, replaced by 
top_srcdir/top_builddir), not working, needs handling of includes and the 
make *config/conf at least. This will also need changes to Rules.mak, 
currently backward compat is retained.
5. Allows specifying CFLAGS-<suffix>, CFLAGS-<sourcefile>, 
CFLAGS-<targetfile>+=<some-flag> to compile an object w/ non-default flags
6. Other changes: PTINC is added to CFLAGS in Rules.mak, removed from 
each subdir Makefile, reordered PTINC to include first arch-specific 
version, then the generic one
6. changes to be done: ASFLAGS should default to empty (not as currently 
to CFLAGS, introduces incompat if changed now in Rules.mak), replace all 
TOPDIR occurences accordingly

Note to devs:
Only files using the same CFLAGS are allowed to go into IMA compiling, for 
this lib*-multi-y and lib*-nomulti-y should be used, so any file having 
other CFLAGS should be built as separate object (multi object, single 
source are handled by CFLAGS-multi-y, defining all -DL_* at once where 
possible)

Please test:
a. Backup your Makefile's (those removed/replaced by create_links.sh)
b. ./extra/scripts/create_links.sh will add a minimal set of symlinks to 
allow building make -f Makefile.in.

Thanks, 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