[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

chopping down libc


I've been working on the procedure to build a chopped-down shared
libc to save space on the Debian installation floppy. I can automaticaly
generate one to match the undefined symbols of all executables on the

Rather than have the boot-floppies package manipulate the libc _source_
package, I modified the libc debian.rules to generate another binary
package called libc5-pic. This installs /usr/lib/libc5_pic.a, which is
used to develop subsets of the shared libc. To do this, I added the
"pic" target to debian.rules, and invoked it at the end of the "binary"
target. With this addition, three packages: libc5, libc5-dev, and
libc5-pic are generated.

I think this is neater than the alternative. How do you feel about it?
Should I upload libc source with this change, or should you do it, or
do you not like the change?



Here is the "pic" target:

	test -f stamp-build || make -f debian.rules build
	rm -f -r pic-tmp
	mkdir -m 755 pic-tmp pic-tmp/DEBIAN pic-tmp/usr pic-tmp/usr/lib
	ar cq pic-tmp/usr/lib/$p_pic.a elfshared/libc/*.o \
	sed -e 's/VvV/$(v)/g' -e 's/MmM/$(mv)/g' -e 's/DdD/$(d)/g' \
	  debian.ctl-pic > pic-tmp/DEBIAN/control
	chmod -R g-w,a-w pic-tmp
	chown -R root.root pic-tmp
	dpkg --build pic-tmp
	mv pic-tmp.deb ../$(p)-pic-$(v)-$(d).deb
	rm -f -r pic-tmp

Here is the debian.ctl-pic file

PACKAGE: libc5-pic
DESCRIPTION: Kit for building specialized versions of the shared C library.
 This installs an archive of C library object modules, /usr/lib/libc5-pic.a,
 compiled as position-independent code. This archive can be used to build
 specialized versions of the run-time-shared C library. It is almost
 identical to /usr/lib/libc.a except that it is compiled in PIC.
 You won't need this unless you are designing a custom boot floppy
 or an embedded system.
MAINTAINER: David Engel <david@ods.com>
Bruce Perens <Bruce@Pixar.com>
Pixar Animation Studios - Reality is not our business.

Reply to: