Subject: DynLink'd gzip(1) for CF Bootstrap
To: None <netbsd-users@netbsd.org>
From: Brian A. Seklecki <lavalamp@spiritual-machines.org>
List: netbsd-users
Date: 05/10/2006 11:44:38
I'm looking to make a 'rescue' gzip(1) binary for a CF Bootstrap, however
/rescue/gzip is staticly linked and thus 2+MB.
Space is limited for binaries in /bin and /lib because of size limitations
of the in-kernel RD/MD image.
Space is limited on the CF device for usr.tar.gz (which gets extracted
into an MFS /usr), so /rescue/gzip is out of the question.
Thus my RD/MD root file system lacks a /usr until after the start of
/etc/rc.
With our in-tree gzip(1) substitute, could the Makefile be modified to
link against the libc/libz in /lib instead of /usr/lib (which are actually
symlinks any way?).
It seems pretty simple:
# link gzip/gzip
/nbsd/tools/bin/i386--netbsdelf-gcc -Wl,-nostdlib -o gzip
-Wl,-rpath-link,/lib:/usr/lib -L/lib -B/usr/lib/ -B/usr/lib/ gzip.o -lz
-lbz2 -L/usr/lib -L/usr/lib
But it would nice if there was some conditional environmental that could
be set for this non-standard build behavior.
Also, could a the bzip2 support be killed off easily? That might not be
prodent since it doesn't really add that much space (60K?).
Thanks,
~BAS