Print this page
OS-3643 lx brand: add USDT provider to lx_brand.so.1
OS-3644 lx brand: ptrace_init() never called

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/Makefile.lib
          +++ new/usr/src/lib/Makefile.lib
↓ open down ↓ 13 lines elided ↑ open up ↑
  14   14  # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  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 2015 Gary Mills
  22   22  # Copyright 2015 Igor Kozhukhov <ikozhukhov@gmail.com>
  23   23  # Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
       24 +# Copyright (c) 2014, Joyent, Inc.
  24   25  #
  25   26  #
  26   27  # Definitions common to libraries.
  27   28  #
  28   29  # include global definitions; SRC should be defined in the shell.
  29   30  # SRC is needed until RFE 1026993 is implemented.
  30   31  
  31   32  include         $(SRC)/Makefile.master
  32   33  
  33   34  LORDER=         lorder
↓ open down ↓ 94 lines elided ↑ open up ↑
 128  129  LINTFLAGS64=    -uaxm -m64
 129  130  LINTSRC=        $(LINTLIB:%.ln=%)
 130  131  LINTOUT=        lint.out
 131  132  ARFLAGS=        r
 132  133  SONAME=         $(DYNLIB)
 133  134  # For most libraries, we should be able to resolve all symbols at link time,
 134  135  # either within the library or as dependencies, all text should be pure, and
 135  136  # combining relocations into one relocation table reduces startup costs.
 136  137  # All options are tunable to allow overload/omission from lower makefiles.
 137  138  
      139 +#
      140 +# DTrace related rules
      141 +#
      142 +# These allow for multiple USDT providers to be specified by a library.
      143 +# If a library needs to break up the set of objects that are passed to
      144 +# the dtrace -G invocation, then they can place the following in heir
      145 +# Makefile.com:
      146 +#
      147 +# pics/<provider>.o     := USDT_G_PICS = <files>
      148 +#
      149 +# <provider> should be replaced with the basename of one of the USDT
      150 +# providers specified in USDT_PROVIDERS in their Makefile.com.
      151 +#
      152 +USDT_HEADERS=   $(USDT_PROVIDERS:%.d=%_impl.h)
      153 +USDT_PICS=      $(USDT_PROVIDERS:%.d=pics/%.o)
      154 +USDT_G_PICS=    $(PICS)
 138  155  
      156 +
 139  157  HSONAME=        -h$(SONAME)
 140  158  DYNFLAGS=       $(HSONAME) $(ZTEXT) $(ZDEFS) $(BDIRECT) \
 141  159                  $(MAPFILES:%=-M%) $(MAPFILE.PGA:%=-M%) $(MAPFILE.NED:%=-M%)
 142  160  
 143  161  LDLIBS=         $(LDLIBS.lib)
 144  162  
 145  163  OBJS=           $(OBJECTS:%=objs/%)
 146  164  PICS=           $(OBJECTS:%=pics/%)
 147  165  
 148  166  # Declare that all library .o's can all be made in parallel.
↓ open down ↓ 1 lines elided ↑ open up ↑
 150  168  # are empty (to avoid an unconditional .PARALLEL declaration).
 151  169  .PARALLEL:      $(OBJS) $(PICS) DUMMY
 152  170  
 153  171  # default value for "portable" source
 154  172  SRCS=           $(OBJECTS:%.o=$(SRCDIR)/%.c)
 155  173  
 156  174  # default build of an archive and a shared object,
 157  175  # overridden locally when extra processing is needed
 158  176  BUILD.AR=       $(AR) $(ARFLAGS) $@ $(AROBJS)
 159  177  BUILD.SO=       $(CC) $(CFLAGS) -o $@ $(GSHARED) $(DYNFLAGS) \
 160      -                $(PICS) $(EXTPICS) $(LDLIBS)
      178 +                $(PICS) $(EXTPICS) $(USDT_PICS) $(LDLIBS)
 161  179  BUILDCCC.SO=    $(CCC) $(CCFLAGS) -o $@ $(GSHARED) $(DYNFLAGS) \
 162  180                  $(PICS) $(EXTPICS) $(LDLIBS)
 163  181  
 164  182  # default dynamic library symlink
 165  183  INS.liblink=    -$(RM) $@; $(SYMLINK) $(LIBLINKPATH)$(LIBLINKS)$(VERS) $@
 166  184  INS.liblinkccc= -$(RM) $@; $(SYMLINK) $(LIBLINKPATH)$(LIBLINKSCCC)$(VERS) $@
 167  185  
 168  186  # default 64-bit dynamic library symlink
 169  187  INS.liblink64=  -$(RM) $@; $(SYMLINK) $(LIBLINKPATH)$(LIBLINKS)$(VERS) $@
 170  188  INS.liblinkccc64= -$(RM) $@; $(SYMLINK) $(LIBLINKPATH)$(LIBLINKSCCC)$(VERS) $@
↓ open down ↓ 86 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX