summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstas <stas@FreeBSD.org>2011-09-27 07:14:12 +0000
committerstas <stas@FreeBSD.org>2011-09-27 07:14:12 +0000
commitd35869ca7e2985d087d51a291649c60594a7436e (patch)
tree6ace9597e6156edc50bf8fecceb879761e0028e7
parentc4b01cd5b9d4d723d64afa53a997e49199b1abb4 (diff)
downloadFreeBSD-src-d35869ca7e2985d087d51a291649c60594a7436e.zip
FreeBSD-src-d35869ca7e2985d087d51a291649c60594a7436e.tar.gz
- Add missing interdependencies to kerberos libraries. Some of the
kerberos libraries were not linked properly (missing dependencies), which causes 3rd party applications linking to fail when --as-needed ld flag is used. I also added the --no-undefined ld(1) flag to make sure that there're no missing dependencies. MFC after: 3 days
-rw-r--r--Makefile.inc117
-rw-r--r--kerberos5/lib/libasn1/Makefile3
-rw-r--r--kerberos5/lib/libgssapi_krb5/Makefile2
-rw-r--r--kerberos5/lib/libgssapi_ntlm/Makefile6
-rw-r--r--kerberos5/lib/libgssapi_spnego/Makefile6
-rw-r--r--kerberos5/lib/libhdb/Makefile3
-rw-r--r--kerberos5/lib/libheimntlm/Makefile3
-rw-r--r--kerberos5/lib/libhx509/Makefile3
-rw-r--r--kerberos5/lib/libkadm5clnt/Makefile3
-rw-r--r--kerberos5/lib/libkadm5srv/Makefile3
-rw-r--r--kerberos5/lib/libkafs5/Makefile3
-rw-r--r--kerberos5/lib/libkrb5/Makefile3
-rw-r--r--kerberos5/lib/libroken/Makefile2
-rw-r--r--tools/make_libdeps.sh2
14 files changed, 50 insertions, 9 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index 7228f85..a594050 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -1218,7 +1218,8 @@ _startup_libs+= lib/libc
gnu/lib/libgcc__L: lib/libc__L
-_prebuild_libs= ${_kerberos5_lib_libasn1} ${_kerberos5_lib_libheimntlm} \
+_prebuild_libs= ${_kerberos5_lib_libasn1} ${_kerberos5_lib_libhdb} \
+ ${_kerberos5_lib_libheimntlm} \
${_kerberos5_lib_libhx509} ${_kerberos5_lib_libkrb5} \
${_kerberos5_lib_libroken} \
lib/libbz2 lib/libcom_err lib/libcrypt \
@@ -1268,6 +1269,19 @@ secure/lib/libssh__L: lib/libgssapi__L kerberos5/lib/libkrb5__L \
_secure_lib= secure/lib
.endif
+.if ${MK_KERBEROS} != "no"
+kerberos5/lib/libasn1__L: lib/libcom_err__L kerberos5/lib/libroken__L
+kerberos5/lib/libhdb__L: kerberos5/lib/libasn1__L lib/libcom_err__L \
+ kerberos5/lib/libkrb5__L kerberos5/lib/libroken__L
+kerberos5/lib/libheimntlm__L: secure/lib/libcrypto__L kerberos5/lib/libkrb5__L
+kerberos5/lib/libhx509__L: kerberos5/lib/libasn1__L lib/libcom_err__L \
+ secure/lib/libcrypto__L kerberos5/lib/libroken__L
+kerberos5/lib/libkrb5__L: kerberos5/lib/libasn1__L lib/libcom_err__L \
+ lib/libcrypt__L secure/lib/libcrypto__L kerberos5/lib/libhx509__L \
+ kerberos5/lib/libroken__L
+kerberos5/lib/libroken__L: lib/libcrypt__L
+.endif
+
.if ${MK_GSSAPI} != "no"
_lib_libgssapi= lib/libgssapi
.endif
@@ -1279,6 +1293,7 @@ _lib_libipx= lib/libipx
.if ${MK_KERBEROS} != "no"
_kerberos5_lib= kerberos5/lib
_kerberos5_lib_libasn1= kerberos5/lib/libasn1
+_kerberos5_lib_libhdb= kerberos5/lib/libhdb
_kerberos5_lib_libkrb5= kerberos5/lib/libkrb5
_kerberos5_lib_libhx509= kerberos5/lib/libhx509
_kerberos5_lib_libroken= kerberos5/lib/libroken
diff --git a/kerberos5/lib/libasn1/Makefile b/kerberos5/lib/libasn1/Makefile
index 4a9c21e..cf91a4b 100644
--- a/kerberos5/lib/libasn1/Makefile
+++ b/kerberos5/lib/libasn1/Makefile
@@ -1,7 +1,10 @@
# $FreeBSD$
LIB= asn1
+LDFLAGS= -Wl,--no-undefined
INCS= asn1_err.h heim_asn1.h
+LDADD= -lcom_err -lroken
+DPADD= ${LIBCOM_ERR} ${LIBROKEN}
SRCS= asn1_err.c \
asn1_err.h \
diff --git a/kerberos5/lib/libgssapi_krb5/Makefile b/kerberos5/lib/libgssapi_krb5/Makefile
index 6c2f421..943e875 100644
--- a/kerberos5/lib/libgssapi_krb5/Makefile
+++ b/kerberos5/lib/libgssapi_krb5/Makefile
@@ -1,7 +1,7 @@
# $FreeBSD$
LIB= gssapi_krb5
-LDFLAGS= -Wl,-Bsymbolic
+LDFLAGS= -Wl,-Bsymbolic -Wl,--no-undefined
LDADD= -lgssapi -lkrb5 -lhx509 -lcrypto -lroken -lasn1 -lcom_err -lcrypt
DPADD= ${LIBGSSAPI} ${LIBKRB5} ${LIBHX509} ${LIBCRYPTO} ${LIBROKEN} ${LIBASN1} \
${LIBCOM_ERR} ${LIBCRYPT}
diff --git a/kerberos5/lib/libgssapi_ntlm/Makefile b/kerberos5/lib/libgssapi_ntlm/Makefile
index cbecc2d..98b47f7 100644
--- a/kerberos5/lib/libgssapi_ntlm/Makefile
+++ b/kerberos5/lib/libgssapi_ntlm/Makefile
@@ -1,9 +1,9 @@
# $FreeBSD$
LIB= gssapi_ntlm
-LDFLAGS= -Wl,-Bsymbolic
-LDADD= -lkrb5 -lhx509 -lheimntlm -lroken
-DPADD= ${LIBKRB5} ${LIBHX509} ${LIBHEIMNTLM} ${LIBROKEN}
+LDFLAGS= -Wl,-Bsymbolic -Wl,--no-undefined
+LDADD= -lcrypto -lgssapi -lkrb5 -lhx509 -lheimntlm -lroken
+DPADD= ${LIBCRYPTO} ${LIBGSSAPI} ${LIBKRB5} ${LIBHX509} ${LIBHEIMNTLM} ${LIBROKEN}
SRCS= accept_sec_context.c \
acquire_cred.c \
diff --git a/kerberos5/lib/libgssapi_spnego/Makefile b/kerberos5/lib/libgssapi_spnego/Makefile
index 32348ec..ce44dbe 100644
--- a/kerberos5/lib/libgssapi_spnego/Makefile
+++ b/kerberos5/lib/libgssapi_spnego/Makefile
@@ -1,9 +1,9 @@
# $FreeBSD$
LIB= gssapi_spnego
-LDFLAGS= -Wl,-Bsymbolic
-LDADD= -lgssapi -lasn1
-DPADD= ${LIBGSSAPI} ${LIBASN1}
+LDFLAGS= -Wl,-Bsymbolic -Wl,--no-undefined
+LDADD= -lgssapi -lasn1 -lroken
+DPADD= ${LIBGSSAPI} ${LIBASN1} ${LIBROKEN}
SRCS= accept_sec_context.c \
compat.c \
diff --git a/kerberos5/lib/libhdb/Makefile b/kerberos5/lib/libhdb/Makefile
index 75465d3..653690a 100644
--- a/kerberos5/lib/libhdb/Makefile
+++ b/kerberos5/lib/libhdb/Makefile
@@ -1,6 +1,9 @@
# $FreeBSD$
LIB= hdb
+LDFLAGS= -Wl,--no-undefined
+LDADD= -lasn1 -lcom_err -lkrb5 -lroken
+DPADD= ${LIBASN1} ${LIBCOM_ERR} ${LIBKRB5} ${LIBROKEN}
INCS= hdb-private.h \
hdb-protos.h \
diff --git a/kerberos5/lib/libheimntlm/Makefile b/kerberos5/lib/libheimntlm/Makefile
index e223258..ba7c922 100644
--- a/kerberos5/lib/libheimntlm/Makefile
+++ b/kerberos5/lib/libheimntlm/Makefile
@@ -1,6 +1,9 @@
# $FreeBSD$
LIB= heimntlm
+LDFLAGS= -Wl,--no-undefined
+LDADD= -lcrypto -lkrb5
+DPADD= ${LIBCRYPTO} ${LIBKRB5}
SRCS= ntlm.c
INCS= heimntlm.h heimntlm-protos.h
CFLAGS+=-I${KRB5DIR}/lib/ntlm
diff --git a/kerberos5/lib/libhx509/Makefile b/kerberos5/lib/libhx509/Makefile
index e94831a..9238a74 100644
--- a/kerberos5/lib/libhx509/Makefile
+++ b/kerberos5/lib/libhx509/Makefile
@@ -1,7 +1,10 @@
# $FreeBSD$
LIB= hx509
+LDFLAGS= -Wl,--no-undefined
VERSION_MAP= ${KRB5DIR}/lib/hx509/version-script.map
+LDADD= -lasn1 -lcom_err -lcrypto -lroken
+DPADD= ${LIBASN1} ${LIBCOM_ERR} ${LIBCRYPTO} ${LIBROKEN}
INCS= hx509-private.h \
hx509-protos.h \
diff --git a/kerberos5/lib/libkadm5clnt/Makefile b/kerberos5/lib/libkadm5clnt/Makefile
index 3390866..dd93847 100644
--- a/kerberos5/lib/libkadm5clnt/Makefile
+++ b/kerberos5/lib/libkadm5clnt/Makefile
@@ -1,6 +1,9 @@
# $FreeBSD$
LIB= kadm5clnt
+LDFLAGS= -Wl,--no-undefined
+LDADD= -lcom_err -lkrb5 -lroken
+DPADD= ${LIBCOM_ERR} ${LIBKRB5} ${LIBROKEN}
INCS= admin.h \
kadm5-private.h \
diff --git a/kerberos5/lib/libkadm5srv/Makefile b/kerberos5/lib/libkadm5srv/Makefile
index c0be477..43bd6e0 100644
--- a/kerberos5/lib/libkadm5srv/Makefile
+++ b/kerberos5/lib/libkadm5srv/Makefile
@@ -1,6 +1,9 @@
# $FreeBSD$
LIB= kadm5srv
+LDFLAGS= -Wl,--no-undefined
+LDADD= -lcom_err -lhdb -lkrb5 -lroken
+DPADD= ${LIBCOM_ERR} ${LIBHDB} ${LIBKRB5} ${LIBROKEN}
VERSION_MAP= ${KRB5DIR}/lib/kadm5/version-script.map
SRCS= acl.c \
diff --git a/kerberos5/lib/libkafs5/Makefile b/kerberos5/lib/libkafs5/Makefile
index e0e0b30..962a900 100644
--- a/kerberos5/lib/libkafs5/Makefile
+++ b/kerberos5/lib/libkafs5/Makefile
@@ -1,6 +1,9 @@
# $FreeBSD$
LIB= kafs5
+LDFLAGS= -Wl,--no-undefined
+LDADD= -lasn1 -lkrb5 -lroken
+DPADD= ${LIBASN1} ${LIBKRB5} ${LIBROKEN}
INCS= kafs.h
MAN= kafs5.3
diff --git a/kerberos5/lib/libkrb5/Makefile b/kerberos5/lib/libkrb5/Makefile
index 2965338..71175cd 100644
--- a/kerberos5/lib/libkrb5/Makefile
+++ b/kerberos5/lib/libkrb5/Makefile
@@ -1,7 +1,10 @@
# $FreeBSD$
LIB= krb5
+LDFLAGS= -Wl,--no-undefined
VERSION_MAP= ${KRB5DIR}/lib/krb5/version-script.map
+LDADD= -lasn1 -lcom_err -lcrypt -lcrypto -lhx509 -lroken
+DPADD= ${LIBASN1} ${LIBCOM_ERR} ${LIBCRYPT} ${LIBCRYPTO} ${LIBHX509} ${LIBROKEN}
INCS= heim_err.h \
heim_threads.h \
diff --git a/kerberos5/lib/libroken/Makefile b/kerberos5/lib/libroken/Makefile
index 92f38a8..c88e1ce 100644
--- a/kerberos5/lib/libroken/Makefile
+++ b/kerberos5/lib/libroken/Makefile
@@ -1,6 +1,8 @@
# $FreeBSD$
LIB= roken
+LDADD= -lcrypt
+DPADD= ${LIBCRYPT}
INCS= roken.h roken-common.h
SRCS= base64.c \
diff --git a/tools/make_libdeps.sh b/tools/make_libdeps.sh
index b0b3f18..608422ae 100644
--- a/tools/make_libdeps.sh
+++ b/tools/make_libdeps.sh
@@ -52,7 +52,7 @@ sed -E
-e's;-l(ncurses|termcap)!;lib/ncurses/ncurses;g'
-e's;-l(gcc)!;gnu/lib/lib\1;g'
-e's;-lssp_nonshared!;gnu/lib/libssp/libssp_nonshared;g'
- -e's;-l(asn1|heimntlm|hx509|krb5|roken)!;kerberos5/lib/lib\1;g'
+ -e's;-l(asn1|hdb|heimntlm|hx509|krb5|roken)!;kerberos5/lib/lib\1;g'
-e's;-l(crypto|ssh|ssl)!;secure/lib/lib\1;g'
-e's;-l([^!]+)!;lib/lib\1;g'
"
OpenPOWER on IntegriCloud