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

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/hal/tools/Makefile
          +++ new/usr/src/cmd/hal/tools/Makefile
↓ 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  SUBDIR =        sunos   
  27   29  
  28   30  HAL_PROG =      hal-device hal-find-by-capability hal-find-by-property \
  29   31                  hal-get-property hal-set-property lshal
  30   32  
  31   33  HAL_LIB =       hal-is-caller-privileged
  32   34  
  33   35  SCRIPT_BIN =    hal-fdi-validate
  34   36  
↓ open down ↓ 27 lines elided ↑ open up ↑
  62   64  $(HAL_PROG) :=          LDLIBS += -lc -ldbus-1 -lhal
  63   65  
  64   66  lshal :=                LDLIBS += -ldbus-glib-1 -lglib-2.0
  65   67  
  66   68  $(HAL_LIB) :=   LDLIBS += -lc -ldbus-1 -lpolkit $(ZIGNORE) -lglib-2.0
  67   69  
  68   70  $(STORAGE_PROG) :=      LDLIBS += -lc -ldbus-1 -lglib-2.0 -lhal -lhal-storage -lbsm
  69   71  
  70   72  $(STORAGE_METHOD_PROG) := LDLIBS += -lpolkit
  71   73  
       74 +# Allow HAL to take some of its dependencies from outside the proto area.
       75 +$(ADJUNCT_PROTO_NOT_SET)LDFLAGS += $(ZASSERTDEFLIB)=libdbus-1.so
       76 +$(ADJUNCT_PROTO_NOT_SET)LDFLAGS += $(ZASSERTDEFLIB)=libdbus-glib-1.so
       77 +$(ADJUNCT_PROTO_NOT_SET)LDFLAGS += $(ZASSERTDEFLIB)=libglib-2.0.so
       78 +
  72   79  CPPFLAGS += $(HAL_DBUS_CPPFLAGS) $(HAL_GLIB_CPPFLAGS) $(HAL_CONFIG_CPPFLAGS)
  73   80  CPPFLAGS += -I$(ROOT)/usr/include/hal
  74   81  CPPFLAGS += -I$(ROOT)/usr/include/libpolkit
  75   82  C99MODE = $(C99_ENABLE)
  76   83  
  77   84  ROOTUSRSBINPROG =       $(HAL_PROG:%=$(ROOTUSRSBIN)/%) \
  78   85                          $(SCRIPT_BIN:%=$(ROOTUSRSBIN)/%)
  79   86  
  80   87  ROOTCMDDIR =            $(ROOTLIB_HAL)
  81   88  ROOTCMD =               $(STORAGE_PROG:%=$(ROOTCMDDIR)/%) \
↓ open down ↓ 89 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX