summaryrefslogtreecommitdiffstats
path: root/cddl
diff options
context:
space:
mode:
authorrpaulo <rpaulo@FreeBSD.org>2010-08-21 13:48:04 +0000
committerrpaulo <rpaulo@FreeBSD.org>2010-08-21 13:48:04 +0000
commit26d140a225ce9d9a3a4ef4765c2345be9c08e514 (patch)
tree10541a784d24f1a6019cd266eb1b8ed7867ed89c /cddl
parent735dfcf54775bf6d68bdee79852fe9a072555aae (diff)
downloadFreeBSD-src-26d140a225ce9d9a3a4ef4765c2345be9c08e514.zip
FreeBSD-src-26d140a225ce9d9a3a4ef4765c2345be9c08e514.tar.gz
Link drti.o with a PIC version of libelf. This is needed because
drti.o depends on libelf and this avoids linking every other drti.o program (namely programs with USDT probes) with libelf. Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'cddl')
-rw-r--r--cddl/lib/drti/Makefile11
1 files changed, 9 insertions, 2 deletions
diff --git a/cddl/lib/drti/Makefile b/cddl/lib/drti/Makefile
index ffd161c..57b161f 100644
--- a/cddl/lib/drti/Makefile
+++ b/cddl/lib/drti/Makefile
@@ -8,13 +8,20 @@ FILESOWN= ${LIBOWN}
FILESGRP= ${LIBGRP}
FILESMODE= ${LIBMODE}
FILESDIR= ${LIBDIR}/dtrace
-CLEANFILES= ${FILES}
+CLEANFILES= ${FILES} ${FILES}.tmp
CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \
-I${.CURDIR}/../../../cddl/compat/opensolaris/include \
-I${OPENSOLARIS_USR_DISTDIR}/head \
-I${OPENSOLARIS_USR_DISTDIR}/lib/libctf/common \
-I${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common \
- -I${OPENSOLARIS_SYS_DISTDIR}/uts/common
+ -I${OPENSOLARIS_SYS_DISTDIR}/uts/common \
+ -DPIC -fpic
+
+.c.o:
+ ${CC} ${CFLAGS} -c ${.IMPSRC}
+ mv ${FILES} ${FILES}.tmp
+ ${LD} -o ${FILES} -r ${FILES}.tmp ${LIBELF_PIC}
+ rm -f ${FILES}.tmp
.include <bsd.prog.mk>
OpenPOWER on IntegriCloud