Subject: I want all binaries stripped
To: None <tech-pkg@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 06/03/2005 21:14:43
Any suggestions on getting all executables and shared libraries to be
stripped?

So file(1) says "stripped"?

For example, notice this huge space savings:

montecristo:/usr/pkgsrc/www/curl$ ls -l /usr/lib/libcurl.so.3.0.0
-rwxr-xr-x  1 root root 3177005 Jun  4 03:55 /usr/lib/libcurl.so.3.0.0

montecristo:/usr/pkgsrc/www/curl$ sudo strip /usr/lib/libcurl.so.3.0.0

montecristo:/usr/pkgsrc/www/curl$ ls -l /usr/lib/libcurl.so.3.0.0
-rwxr-xr-x  1 root root 230648 Jun  4 04:01 /usr/lib/libcurl.so.3.0.0

I want this done by pkgsrc.

curl doesn't use @INSTALL_PROGRAM@ and does not know INSTALL_LIB. (It does
have an install-strip target though.)

Somethings I am playing with in pkgsrc (in bsd.pkg.mk):

 INSTALL_LIB?=          \
-       ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE}
+       ${INSTALL} ${COPY} ${_STRIPFLAG_INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE}

+.if !empty(CC_VERSION:Mgcc*)
+# and maybe have an option to say to use _STRIPFLAG_CC ??
+# 13/Oct/2004 for arts build testing
+CFLAGS+=       ${_STRIPFLAG_CC}
+.endif


 Jeremy C. Reed

 	  	 	 open source, Unix, *BSD, Linux training
	  	 	 http://www.pugetsoundtechnology.com/