--- old/./.gitignore	2014-08-09 20:12:22.145826113 +0000
+++ new/./.gitignore	2014-08-09 20:12:22.161021389 +0000
@@ -1,13 +1,14 @@
 /bash/bash-4.1-32
 /bind/bind-9.8.0-32
-/binutils/binutils-2.22-32
-/bzip2/bzip2-1.0.6
+/binutils/binutils-2.22-32*
+/bzip2/bzip2-1.0.6*
 /bzip2/bzgrep.tmp
 /coreutils/coreutils-8.13-32
 /cpp/cpp
-/cpp/cpp.o
+/cpp/cppstrap
+/cpp/cpp.o*
 /cpp/y.tab.c
-/cpp/y.tab.o
+/cpp/y.tab.o*
 /curl/curl-7.27.0-32
 /dialog/dialog-1.1-20111020-32
 /g11n/proto/
@@ -22,44 +23,44 @@
 /g11n/src/lib/iconv/utf-8/*.bt
 /g11n/src/lib/iconv/utf-8/*.o
 /g11n/src/lib/iconv/utf-8/*.so
-/gcc4/gcc-4.4.4-32
-/gcc4/gcc-4.4.4-32.build/
+/gcc4/gcc-4.4.4-32*
 /gnupg/gnupg-1.4.11-32
 /gtar/tar-1.23-32
 /gzip/gzip-1.3.5-32
 /ipmitool/ipmitool-1.8.14-32
 /less/less-436-32
-/libexpat/expat-2.0.1-32
-/libexpat/expat-2.0.1-64
-/libidn/libidn-1.11-32
+/libexpat/expat-2.0.1-32*
+/libexpat/expat-2.0.1-64*
+/libidn/libidn-1.11-32*
 /libm/destdir
 /libm/statdir
 /libm/usr/src/libm/wos/f80387
 /libm/usr/src/libm/wos/libmvec
 /libm/usr/src/libm/wos64/amd64
-/libxml/libxml2-2.7.6-32
-/libxml/libxml2-2.7.6-64
-/libz/zlib-1.2.3-32
-/libz/zlib-1.2.3-64
+/libxml/libxml2-2.7.6-32*
+/libxml/libxml2-2.7.6-64*
+/libz/zlib-1.2.3-32*
+/libz/zlib-1.2.3-64*
 /make/.unpack32
-/make/usr-32
+/make/usr-32*
 /ncurses/ncurses-5.7-32
 /ncurses/ncurses-5.7-64
 /node.js/genversionjs
 /node.js/wrapper
-/node.js/node-v0.8.26-32
-/nss-nspr/nss-3.12.8-32
-/nss-nspr/nss-3.12.8-64
+/node.js/node-v0.10.26-32*
+/nss-nspr/nss-3.12.8-32*
+/nss-nspr/nss-3.12.8-64*
 /ntp/ntp-dev-4.2.7p446-32
 /openldap/openldap-2.4.26-32
 /openlldp/openlldp-0.4alpha-32
-/openssl/openssl-0.9.8x
-/openssl/openssl-0.9.8x-64
-/openssl1x/openssl-1.0.1d-32
-/openssl1x/openssl-1.0.1d-64
+/openssl/openssl-0.9.8za
+/openssl/openssl-0.9.8za-64
+/openssl1x/openssl-1.0.1h-32*
+/openssl1x/openssl-1.0.1h-64*
 /pbzip2/pbzip2-1.1.6-32
-/perl/perl-5.12.3-32
+/perl/perl-5.12.3-32*
 /perl/Config_heavy.pl
+/perl/Config_heavy.plstrap
 /proto
 /rsync/rsync-3.0.6-32
 /rsyslog/rsyslog-5.8.9-32
@@ -70,3 +71,6 @@
 /vim/vim73-32
 /wget/wget-1.12-32
 /illumos-extra-*.tgz
+/*/ctfobjects-32
+/*/ctfobjects-64
+.*.swp
--- old/./Makefile	2014-08-09 20:12:22.461091721 +0000
+++ new/./Makefile	2014-08-09 20:12:22.474290856 +0000
@@ -143,6 +143,8 @@
 	(cd $@ && \
 	    PKG_CONFIG_LIBDIR="" \
 	    STRAP=$(STRAP) \
+	    CTFMERGE=$(CTFMERGE) \
+	    CTFCONVERT=$(CTFCONVERT) \
 	    $(MAKE) DESTDIR=$(DESTDIR) install)
 
 install: $(SUBDIRS) gcc4 binutils
--- old/./Makefile.defs	2014-08-09 20:12:22.762229679 +0000
+++ new/./Makefile.defs	2014-08-09 20:12:22.775359518 +0000
@@ -27,6 +27,8 @@
 VER.64 =	$(VER)-64$(STRAP)
 OBJ.32 =	$(VER.32)$(SEPARATE_BUILD:yes=.build)
 OBJ.64 =	$(VER.64)$(SEPARATE_BUILD:yes=.build)
+CTF.32 =	ctfobjects-32$(STRAP)
+CTF.64 =	ctfobjects-64$(STRAP)
 
 ifeq ($(STRAP),strap)
 STRAPPROTO =	$(DESTDIR)
@@ -160,4 +162,8 @@
 	    $(GPATCH) -d .unpack64/$(VER) -p$(PATCHSTRIP) < "$$p" || exit 1; \
 	    done
 
+MAKE_CTF =		$(BASE)/../tools/make-ctf
+MAKE_CTF.32 =		$(MAKE_CTF) $(OBJ.32) $(CTF.32) $(VER)
+MAKE_CTF.64 =		$(MAKE_CTF) $(OBJ.64) $(CTF.64) $(VER)
+
 .DEFAULT_GOAL =		all
--- old/./Makefile.targ	2014-08-09 20:12:23.063502206 +0000
+++ new/./Makefile.targ	2014-08-09 20:12:23.076667570 +0000
@@ -85,4 +85,4 @@
 
 clean:
 	-rm -rf $(VER) $(VER.32) $(VER.64) .unpack32 .unpack64 $(CLEANFILES) \
-	    $(VER.32)strap $(VER.64)strap $(OBJ.32) $(OBJ.64)
+	    $(VER.32)strap $(VER.64)strap $(OBJ.32) $(OBJ.64) $(CTF.32) $(CTF.64)
--- old/ntp/Makefile	2014-08-09 20:12:23.346384117 +0000
+++ new/ntp/Makefile	2014-08-09 20:12:23.359544670 +0000
@@ -46,19 +46,37 @@
 	--with-crypto=sunw \
 	--disable-getifaddrs
 
-CFLAGS +=	-O2
+CFLAGS += \
+	-O2 -gdwarf-2 \
+	-fno-inline-functions \
+	-fno-inline-functions-called-once \
+	-fno-inline-small-functions
 
 AUTOCONF_ENV += \
 	LD_OPTIONS="$(LDFLAGS)" \
-	DESTDIR="$(DESTDIR)"
+	DESTDIR="$(DESTDIR)" \
+	CTFMERGE="$(CTFMERGE)" \
+	CTFCONVERT="$(CTFCONVERT)"
 
 PATCHSTRIP =	0
 PATCHES =	Patches/*
 
+CTF_PROGRAMS_USR_SBIN = \
+	ntp-keygen \
+	ntpd \
+	ntpdate \
+	ntpdc \
+	ntpq \
+	ntptime \
+	tickadj
+
+CTF_PROGRAMS = $(CTF_PROGRAMS_USR_SBIN:%=/usr/sbin/%)
+
 include ../Makefile.targ
 
 all: all_autoconf
 
 install: all
 	(cd $(VER.32); env - $(AUTOCONF_ENV) PATH=$(PATH) gmake $(install_PARALLEL) install)
+	(env - $(AUTOCONF_ENV) $(MAKE_CTF.32) $(CTF_PROGRAMS))
 	(env - $(AUTOCONF_ENV) ./install-ntp)
--- old/openlldp/Makefile	2014-08-09 20:12:23.640500583 +0000
+++ new/openlldp/Makefile	2014-08-09 20:12:23.653685519 +0000
@@ -26,8 +26,21 @@
 PATCHES =	Patches/*
 
 include ../Makefile.defs
+
+CFLAGS += \
+	-gdwarf-2 \
+	-fno-inline-functions \
+	-fno-inline-functions-called-once \
+	-fno-inline-small-functions
+
 include ../Makefile.targ
 
+CTF_PROGRAMS_USR_SBIN = \
+	lldpd \
+	lldpneighbors
+
+CTF_PROGRAMS = $(CTF_PROGRAMS_USR_SBIN:%=/usr/sbin/%)
+
 all: all_autoconf
 
 install: all
@@ -38,3 +51,4 @@
 	install -s -m 555 -f $(DESTDIR)/usr/sbin $(VER.32)/src/lldpd
 	install -s -m 555 -f $(DESTDIR)/usr/sbin $(VER.32)/src/lldpneighbors
 	install -s -m 444 -f $(DESTDIR)/lib/svc/manifest/network lldpd.xml
+	$(MAKE_CTF.32) $(CTF_PROGRAMS)
--- /dev/null	2014-08-09 20:12:23.000000000 +0000
+++ new/tools/make-ctf	2014-08-09 20:12:23.956121114 +0000
@@ -0,0 +1,72 @@
+#!/bin/ksh
+# vim: set ts=8 sts=8 sw=8 noet:
+
+set -o errexit
+set -o pipefail
+
+function usage
+{
+	printf "Usage: $0 %s %s %s %s[...]\n" "<build_dir>" \
+	    "<ctf_object_dir>" "<container_version>" "<program>" >&2
+	exit 1
+}
+
+# Process input arguments:
+BUILD_DIR="$1"
+CTF_OBJECT_DIR="$2"
+CONTAINER_VERSION="$3"
+if [[ ! -d "${BUILD_DIR}" || -z "${CTF_OBJECT_DIR}" || \
+    -z "${CONTAINER_VERSION}" ]]; then
+	usage
+fi
+shift 3
+
+# Process input program list:
+if (( $# < 1 )); then
+	usage
+fi
+PROGRAMS="$*"
+
+# Read from environment:
+if [[ -z "${DESTDIR}" ]]; then
+	printf "Must set DESTDIR in the environment\n" >&2
+	exit 1
+fi
+
+# These may contain wildcards, so expand:
+CTFMERGE="$(echo $CTFMERGE)"
+CTFCONVERT="$(echo $CTFCONVERT)"
+if [[ ! -n "${CTFMERGE}" || ! -n "${CTFCONVERT}" ]]; then
+	printf "You must set CTFMERGE and CTFCONVERT in the environment.\n" >&2
+	exit 1
+fi
+if [[ ! -x "${CTFMERGE}" ]]; then
+	printf "Could not find CTFMERGE at '%s'\n" "${CTFMERGE}" >&2
+	exit 1
+fi
+if [[ ! -x "${CTFCONVERT}" ]]; then
+	printf "Could not find CTFCONVERT at '%s'\n" "${CTFCONVERT}" >&2
+	exit 1
+fi
+
+# Convert DWARF to CTF in every object file we can find:
+rm -rf "${CTF_OBJECT_DIR}"
+mkdir -p "${CTF_OBJECT_DIR}"
+(cd "${BUILD_DIR}" && find * -name '*.o' -type f) | \
+    sort | while read objf; do
+	printf "  CTFCONVERT %s\n" "${objf}" >&2
+	ctff="$(echo "$objf" | sed -e 's,/,%,g' -e 's/\.o$/\.ctf/')"
+	${CTFCONVERT} -l "${CONTAINER_VERSION}" \
+	    -o "${CTF_OBJECT_DIR}/${ctff}" \
+	    "${BUILD_DIR}/${objf}"
+done
+
+# Merge the CTF into the set of programs we ship:
+for program in ${PROGRAMS}; do
+	program_path="${DESTDIR}${program}"
+	printf "  CTFMERGE   %s\n" "${program_path}" >&2
+	chmod u+w "${program_path}"
+	${CTFMERGE} -l "${CONTAINER_VERSION}" \
+	    -o "${program_path}" \
+	    ${CTF_OBJECT_DIR}/*.ctf
+done
