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

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/availdevs/Makefile
          +++ new/usr/src/cmd/availdevs/Makefile
↓ open down ↓ 15 lines elided ↑ open up ↑
  16   16  # If applicable, add the following below this CDDL HEADER, with the
  17   17  # fields enclosed by brackets "[]" replaced with your own identifying
  18   18  # information: Portions Copyright [yyyy] [name of copyright owner]
  19   19  #
  20   20  # CDDL HEADER END
  21   21  #
  22   22  #
  23   23  # Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  24   24  # Use is subject to license terms.
  25   25  #
       26 +# Copyright 2017 RackTop Systems.
       27 +#
  26   28  
  27   29  PROG=           availdevs
  28   30  
  29   31  include ../Makefile.cmd
  30   32  
  31   33  ROOTCMDDIR=     $(ROOTLIB)/zfs
  32   34  
  33   35  INCS += -I$(ADJUNCT_PROTO)/usr/include/libxml2
  34   36  
  35   37  #
  36   38  # There is no lint library for libxml2, so we need to avoid linking against
  37   39  # it during lint, as well as turning off the warnings lint would generate.
  38   40  #
  39   41  LDLIBS += -lzfs_jni -lnvpair -lzfs
  40   42  all install := LDLIBS += -lxml2
  41   43  LINTFLAGS += -xerroff=E_NAME_USED_NOT_DEF2
  42   44  
       45 +# Allow libxml2 to be taken from outside the proto area.
       46 +$(ADJUNCT_PROTO_NOT_SET)LDFLAGS += $(ZASSERTDEFLIB)=libxml2.so
       47 +
  43   48  CPPFLAGS += $(INCS) -D_LARGEFILE64_SOURCE=1 -D_REENTRANT
  44   49  $(NOT_RELEASE_BUILD) CPPFLAGS += -DDEBUG
  45   50  
  46   51  .KEEP_STATE:
  47   52  
  48   53  all: $(PROG)
  49   54  
  50   55  install: all $(ROOTCMD)
  51   56  
  52   57  clean:
  53   58  
  54   59  lint: lint_PROG
  55   60  
  56   61  include ../Makefile.targ
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX