[uClibc] [patch] parallel build support for libc

Mike Frysinger vapier at gentoo.org
Wed Jan 19 23:56:22 UTC 2005


ive tweaked all the other subdirectories so they build in parallel, but libc 
was the only one which was hard :)

problem:
 - every subdir would run $AR in order to add the subdir .o's to the libc.a
 - if all subdirs executed $AR at the sametime, libc.a would get corrupted

solution:
 - have every subdir build a list of the object files it generated
 - once all subdirs have executed, the toplevel libc Makefile runs $(AR) using 
the list files generated

so in uClibc/libc/ we end up with 'obj.inet' and 'obj.inet.rpc' and 
'obj.stdlib' ... each of these files just contains a list of objects:
obj.inet: inet/inet_aton.o inet/inet_addr.o inet/inet_ntoa.o ...
obj.inet.rpc: inet/rpc/auth_none.o inet/rpc/auth_unix.o ...
obj.stdlib: stdlib/abs.o stdlib/labs.o stdlib/atoi.o

i'm sending this to the list because it's quite a drastic change in how the 
previous libc was built, but it does seem to wfm with just build tests (i ran 
`while make -j clean && make -j ; do :; done` on an amd64 for about an hour 
and got no errors)

so, feedback is welcome ! :)
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: parallel-libc.patch.bz2
Type: application/x-bzip2
Size: 4961 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20050119/2603d123/attachment.bin 


More information about the uClibc mailing list