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
↓ 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 \
↓ 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  
↓ 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
↓ open down ↓ 18 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX