Print this page
8411 Build should warn when linking against libraries outside proto area

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libwanboot/Makefile.com
          +++ new/usr/src/lib/libwanboot/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  # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  22   22  # Use is subject to license terms.
  23   23  #
  24   24  # Copyright (c) 2012 by Delphix. All rights reserved.
       25 +# Copyright 2017 RackTop Systems.
  25   26  #
  26   27  
  27   28  LIBRARY =       libwanboot.a
  28   29  VERS =          .1
  29   30  
  30   31  # List of locally located modules.
  31   32  LOC_DIR =       ../common
  32   33  LOC_OBJS =      socket_inet.o bootinfo_aux.o
  33   34  LOC_SRCS =      $(LOC_OBJS:%.o=$(LOC_DIR)/%.c)
  34   35  
↓ open down ↓ 19 lines elided ↑ open up ↑
  54   55  DHCP_OBJS =     dhcpinfo.o
  55   56  DHCP_SRCS =     $(DHCP_OBJS:%.o=$(DHCP_DIR)/%.c)
  56   57  
  57   58  OBJECTS =       $(LOC_OBJS) $(COM_OBJS) $(DHCP_OBJS)
  58   59  
  59   60  include ../../Makefile.lib
  60   61  
  61   62  LIBS +=         $(LINTLIB)
  62   63  LDLIBS +=       -lnvpair -lresolv -lnsl -lsocket -ldevinfo -ldhcputil \
  63   64                  -linetutil -lc -lcrypto -lssl
       65 +
       66 +# Allow libcrypto and libssl to be taken from outside the proto area.
       67 +$(ADJUNCT_PROTO_NOT_SET)DYNFLAGS += $(ZASSERTDEFLIB)=libcrypto.so
       68 +$(ADJUNCT_PROTO_NOT_SET)DYNFLAGS += $(ZASSERTDEFLIB)=libssl.so
       69 +
  64   70  CPPFLAGS =      -I$(SRC)/common/net/wanboot/crypt $(CPPFLAGS.master)
  65   71  CERRWARN +=     -_gcc=-Wno-switch
  66   72  CERRWARN +=     -_gcc=-Wno-parentheses
  67   73  CERRWARN +=     -_gcc=-Wno-unused-value
  68   74  CERRWARN +=     -_gcc=-Wno-uninitialized
  69   75  
  70   76  # Must override SRCS from Makefile.lib since sources have
  71   77  # multiple source directories.
  72   78  SRCS =          $(LOC_SRCS) $(COM_SRCS) $(DHCP_SRCS)
  73   79  
↓ open down ↓ 26 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX