summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2015-11-25 19:13:35 +0000
committerbdrewery <bdrewery@FreeBSD.org>2015-11-25 19:13:35 +0000
commit6fcce128fcc664a07d51b1298e989b1ce54bc1a8 (patch)
treef374753805c1287c38b8d3bec3f3ca53520aa4a6
parentd1050e87e395ec2c7c844c9a0089d522dd1a0d2e (diff)
downloadFreeBSD-src-6fcce128fcc664a07d51b1298e989b1ce54bc1a8.zip
FreeBSD-src-6fcce128fcc664a07d51b1298e989b1ce54bc1a8.tar.gz
META MODE: Rework circular dependency guard for librtld_db/libproc.
librtld_db only needs libutil.h to build, not the libproc library. So it can safely use its header and allow libproc to depend on librtld_rb to be built first to link. This is required after fixing ld --sysroot in r291226. Sponsored by: EMC / Isilon Storage Division
-rw-r--r--lib/libproc/Makefile3
-rw-r--r--lib/libproc/Makefile.depend1
-rw-r--r--lib/librtld_db/Makefile2
-rw-r--r--lib/librtld_db/Makefile.depend1
4 files changed, 3 insertions, 4 deletions
diff --git a/lib/libproc/Makefile b/lib/libproc/Makefile
index 3feddb5..8c4f484 100644
--- a/lib/libproc/Makefile
+++ b/lib/libproc/Makefile
@@ -14,9 +14,6 @@ SRCS= proc_bkpt.c \
INCS= libproc.h
CFLAGS+= -I${.CURDIR}
-# avoid cyclic dependency
-CFLAGS+= -I${.CURDIR:H}/librtld_db
-GENDIRDEPS_FILTER+= Nlib/librtld_db
.if ${MK_CXX} == "no"
CFLAGS+= -DNO_CXA_DEMANGLE
diff --git a/lib/libproc/Makefile.depend b/lib/libproc/Makefile.depend
index 1615031..33b871f 100644
--- a/lib/libproc/Makefile.depend
+++ b/lib/libproc/Makefile.depend
@@ -12,6 +12,7 @@ DIRDEPS = \
lib/libcompiler_rt \
lib/libcxxrt \
lib/libelf \
+ lib/librtld_db \
lib/libutil \
diff --git a/lib/librtld_db/Makefile b/lib/librtld_db/Makefile
index 2815a07..9f9b603 100644
--- a/lib/librtld_db/Makefile
+++ b/lib/librtld_db/Makefile
@@ -10,5 +10,7 @@ SRCS= rtld_db.c
INCS= rtld_db.h
CFLAGS+= -I${.CURDIR}
+# Avoid circular dependency, we only need the libproc.h header here.
+CFLAGS+= -I${.CURDIR:H}/libproc
.include <bsd.lib.mk>
diff --git a/lib/librtld_db/Makefile.depend b/lib/librtld_db/Makefile.depend
index 4a7dcd9..90c66d4 100644
--- a/lib/librtld_db/Makefile.depend
+++ b/lib/librtld_db/Makefile.depend
@@ -10,7 +10,6 @@ DIRDEPS = \
lib/libc \
lib/libcompiler_rt \
lib/libelf \
- lib/libproc \
lib/libutil \
OpenPOWER on IntegriCloud