aboutsummaryrefslogtreecommitdiffstats
path: root/usr.bin/cpio/Makefile
diff options
context:
space:
mode:
authorTim Kientzle <kientzle@FreeBSD.org>2009-04-19 06:59:12 +0000
committerTim Kientzle <kientzle@FreeBSD.org>2009-04-19 06:59:12 +0000
commit4f6b15547b99cc0ff26d1f0905cd96755e2b7282 (patch)
tree51ea96a5a2dadb84a13c34c8ec4b6017cbc09f3e /usr.bin/cpio/Makefile
parent55fba05bf54457c5df976993ce5f384e654d38e2 (diff)
downloadsrc-4f6b15547b99cc0ff26d1f0905cd96755e2b7282.tar.gz
src-4f6b15547b99cc0ff26d1f0905cd96755e2b7282.zip
When compiled for the release crunches, be a bit
more selective about what libarchive features we pull in: * No compression support * Only cpio and ustar writing * Only cpio and tar/pax readers This reduces a statically linked, stripped binary from 900k to 680k and completely eliminates the dependency on libcrypto.
Notes
Notes: svn path=/head/; revision=191262
Diffstat (limited to 'usr.bin/cpio/Makefile')
-rw-r--r--usr.bin/cpio/Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/usr.bin/cpio/Makefile b/usr.bin/cpio/Makefile
index fce50b223b77..c64ab6c6a040 100644
--- a/usr.bin/cpio/Makefile
+++ b/usr.bin/cpio/Makefile
@@ -9,6 +9,11 @@ WARNS?= 6
DPADD= ${LIBARCHIVE} ${LIBZ} ${LIBBZ2}
CFLAGS+= -DBSDCPIO_VERSION_STRING=\"${BSDCPIO_VERSION_STRING}\"
CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\"
+.ifdef RELEASE_CRUNCH
+# FreeBSD's installer uses cpio in crunched binaries that are
+# statically linked, cannot use -lcrypto, and are size sensitive.
+CFLAGS+= -DSMALLER
+.endif
LDADD+= -larchive -lz -lbz2 -lmd
.if ${MK_OPENSSL} != "no"
LDADD+= -lcrypto