Print this page
8411 Build should warn when linking against libraries outside proto area
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/lib/libldap5/Makefile.com
+++ new/usr/src/lib/libldap5/Makefile.com
1 1 #
2 2 # CDDL HEADER START
3 3 #
4 4 # The contents of this file are subject to the terms of the
5 5 # Common Development and Distribution License (the "License").
6 6 # You may not use this file except in compliance with the License.
7 7 #
8 8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 # or http://www.opensolaris.org/os/licensing.
10 10 # See the License for the specific language governing permissions
11 11 # and limitations under the License.
12 12 #
13 13 # When distributing Covered Code, include this CDDL HEADER in each
14 14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
↓ open down ↓ |
14 lines elided |
↑ open up ↑ |
15 15 # If applicable, add the following below this CDDL HEADER, with the
16 16 # fields enclosed by brackets "[]" replaced with your own identifying
17 17 # information: Portions Copyright [yyyy] [name of copyright owner]
18 18 #
19 19 # CDDL HEADER END
20 20 #
21 21 #
22 22 # Copyright 2008 Sun Microsystems, Inc. All rights reserved.
23 23 # Use is subject to license terms.
24 24 #
25 +# Copyright 2017 RackTop Systems.
26 +#
25 27
26 28 LIBRARY= libldap.a
27 29 VERS= .5
28 30
29 31 # Definition of all the objects macros
30 32 # The LDAP specific objects
31 33
32 34 BEROBJS= bprint.o decode.o encode.o io.o
33 35
34 36 LDAPOBJS= abandon.o add.o bind.o cache.o charray.o \
35 37 charset.o compare.o compat.o control.o countvalues.o \
36 38 delete.o disptmpl.o dsparse.o error.o extendop.o free.o freevalues.o \
37 39 friendly.o getattr.o getdn.o getdxbyname.o getentry.o \
38 40 getfilter.o getoption.o getvalues.o memcache.o message.o \
39 41 modify.o open.o os-ip.o proxyauthctrl.o psearch.o referral.o \
40 42 rename.o request.o reslist.o result.o saslbind.o sasl.o \
41 43 sbind.o search.o setoption.o sort.o sortctrl.o srchpref.o \
42 44 tmplout.o ufn.o unbind.o unescape.o url.o ldaputf8.o vlistctrl.o \
43 45 cram_md5.o secutil.o spagectrl.o digest_md5.o
44 46
45 47 SSLDAPOBJS= clientinit.o ldapsinit.o errormap.o
46 48
47 49 PRLDAPOBJS= ldappr-dns.o ldappr-error.o ldappr-public.o \
48 50 ldappr-io.o ldappr-threads.o
49 51
50 52 UTILOBJS= log.o line64.o
51 53
52 54 # Grouping it all together
53 55 OBJECTS= $(BEROBJS) $(LDAPOBJS) $(SSLDAPOBJS) $(PRLDAPOBJS) \
54 56 $(UTILOBJS)
55 57
56 58 # include library definitions
57 59 include ../../Makefile.lib
58 60
59 61 NSS_LIBS= -lnspr4 -lplc4 -lnss3 -lssl3
60 62 NSS_HDRS= $(ADJUNCT_PROTO)/usr/include/mps
61 63 NSS_LDPATH= /usr/lib/mps
62 64 NSS_LDPATH64= $(NSS_LDPATH)/64
63 65
64 66
65 67 LDAP_FLAGS= -DSVR4 -DSYSV -D__svr4 -D__svr4__ -DSOLARIS \
66 68 -D_SOLARIS_SDK \
67 69 -DUSE_WAITPID -DNEEDPROTOS \
68 70 -DNET_SSL -DNO_LIBLCACHE -DLDAP_REFERRALS \
69 71 -DNS_DOMESTIC -DLDAP_SSLIO_HOOKS -DSTR_TRANSLATION \
70 72 -DLDAP_SASLIO_HOOKS
71 73
72 74
73 75 # Include directories for all files
74 76 COM_INC= -I$(SRC)/lib/libldap5/include/ldap \
75 77 -I$(NSS_HDRS)
↓ open down ↓ |
41 lines elided |
↑ open up ↑ |
76 78
77 79 SRCS= $(BEROBJS:%.o=../sources/ldap/ber/%.c) \
78 80 $(LDAPOBJS:%.o=../sources/ldap/common/%.c) \
79 81 $(SSLDAPOBJS:%.o=../sources/ldap/ssldap/%.c) \
80 82 $(PRLDAPOBJS:%.o=../sources/ldap/prldap/%.c) \
81 83 $(UTILOBJS:%.o=../sources/ldap/util/%.c)
82 84
83 85 LIBS = $(DYNLIB) $(LINTLIB)
84 86 DYNFLAGS += $(ZNODELETE)
85 87
88 +# Allow the NSS libraries to be taken from outside the proto area.
89 +$(ADJUNCT_PROTO_NOT_SET)DYNFLAGS += $(NSS_LIBS:-l%=$(ZASSERTDEFLIB)=lib%.so)
90 +
86 91 CPPFLAGS= $(COM_INC) $(CPPFLAGS.master)
87 92
88 93 # definitions for lint
89 94
90 95 $(LINTLIB):= SRCS=../sources/ldap/common/llib-lldap
91 96 $(LINTLIB):= LINTFLAGS=-nvx
92 97 $(LINTLIB):= TARGET_ARCH=
93 98
94 99 LINTOUT= lint.out
95 100
96 101 LINTSRC= $(LINTLIB:%.ln=%)
97 102 ROOTLINTDIR= $(ROOTLIBDIR)
98 103 ROOTLINT= $(LINTSRC:%=$(ROOTLINTDIR)/%)
99 104
100 105
101 106 CLEANFILES += $(LINTOUT) $(LINTLIB)
102 107
103 108 # Local Libldap definitions
104 109 LOCFLAGS += $(XSTRCONST) -D_REENTRANT
105 110
106 111 # Following values defined in Makefile.master are overwritten here.
107 112 #sparc_C_PICFLAGS = $(sparc_C_BIGPICFLAGS)
108 113 sparcv9_C_PICFLAGS = $(sparcv9_C_BIGPICFLAGS)
109 114 #i386_C_PICFLAGS = $(i386_C_BIGPICFLAGS)
110 115 #amd64_C_PICFLAGS = $(amd64_C_BIGPICFLAGS)
111 116
112 117 CFLAGS += $(CCVERBOSE) $(LOCFLAGS)
↓ open down ↓ |
17 lines elided |
↑ open up ↑ |
113 118 CFLAGS64 += $(LOCFLAGS)
114 119
115 120 CERRWARN += -_gcc=-Wno-parentheses
116 121 CERRWARN += -_gcc=-Wno-uninitialized
117 122 CERRWARN += -_gcc=-Wno-type-limits
118 123 CERRWARN += -_gcc=-Wno-unused-function
119 124 CERRWARN += -_gcc=-Wno-unused-variable
120 125 CERRWARN += -_gcc=-Wno-unused-value
121 126 CERRWARN += -_gcc=-Wno-address
122 127
123 -LDLIBS += -lsasl -lsocket -lnsl -lmd -lc
128 +# Override the default linker path so that libraries found in the host
129 +# directories will trigger the -zassert-deflib logic.
130 +LDLIBS32 += -YP,$(DEFLDPATH):$(NSS_LDPATH)
131 +LDLIBS64 += -YP,$(DEFLDPATH64):$(NSS_LDPATH64)
124 132
133 +# Only add -L options for the NSS directories if ADJUNCT_PROTO is being
134 +# used because it disables the -zassert-deflib logic.
135 +$(ADJUNCT_PROTO_SET)LDLIBS32 += -L$(NSS_LDPATH)
136 +$(ADJUNCT_PROTO_SET)LDLIBS64 += -L$(NSS_LDPATH64)
137 +
138 +LDLIBS += -lsasl -lsocket -lnsl -lmd -lc $(NSS_LIBS)
139 +
125 140 .KEEP_STATE:
126 141
127 142 # include library targets
128 143 include ../../Makefile.targ
129 144
130 145 pics/%.o: ../sources/ldap/ber/%.c
131 146 $(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -o $@ $<
132 147 $(POST_PROCESS_O)
133 148
134 149 pics/%.o: ../sources/ldap/common/%.c
135 150 $(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -o $@ $<
136 151 $(POST_PROCESS_O)
137 152
138 153 pics/%.o: ../sources/ldap/ssldap/%.c
139 154 $(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -w -o $@ $<
140 155 $(POST_PROCESS_O)
141 156
142 157 pics/%.o: ../sources/ldap/prldap/%.c
143 158 $(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -w -o $@ $<
144 159 $(POST_PROCESS_O)
145 160
146 161 pics/%.o: ../sources/ldap/util/%.c
147 162 $(COMPILE.c) $(LDAP_FLAGS) $(COM_INC) -w -o $@ $<
148 163 $(POST_PROCESS_O)
149 164
150 165 # install rule for lint library target
151 166 $(ROOTLINTDIR)/%: ../sources/ldap/common/%
152 167 $(INS.file)
↓ open down ↓ |
18 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX