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

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 2017 RackTop Systems.
  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 ↓ 96 lines elided ↑ open up ↑
 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  
 138  139  
 139  140  HSONAME=        -h$(SONAME)
 140      -DYNFLAGS=       $(HSONAME) $(ZTEXT) $(ZDEFS) $(BDIRECT) \
      141 +DYNFLAGS=       $(HSONAME) $(ZTEXT) $(ZDEFS) $(ZASSERTDEFLIB) $(BDIRECT) \
 141  142                  $(MAPFILES:%=-M%) $(MAPFILE.PGA:%=-M%) $(MAPFILE.NED:%=-M%)
 142  143  
 143  144  LDLIBS=         $(LDLIBS.lib)
 144  145  
 145  146  OBJS=           $(OBJECTS:%=objs/%)
 146  147  PICS=           $(OBJECTS:%=pics/%)
 147  148  
 148  149  # Declare that all library .o's can all be made in parallel.
 149  150  # The DUMMY target is for those instances where OBJS and PICS
 150  151  # are empty (to avoid an unconditional .PARALLEL declaration).
↓ open down ↓ 55 lines elided ↑ open up ↑
 206  207  $(LIBRARY):=    AROBJS = $(OBJS)
 207  208  $(LIBRARY):=    DIR = objs
 208  209  $(DYNLIB):=     DIR = pics
 209  210  $(DYNLIBCCC):=  DIR = pics
 210  211  
 211  212  SONAMECCC=      $(DYNLIBCCC)
 212  213  HSONAMECCC=     -h $(SONAMECCC)
 213  214  #
 214  215  # Keep in sync with the standard DYNFLAGS
 215  216  #
 216      -$(DYNLIBCCC):=  DYNFLAGS = $(HSONAMECCC) $(ZTEXT) $(ZDEFS) \
      217 +$(DYNLIBCCC):=  DYNFLAGS = $(HSONAMECCC) $(ZTEXT) $(ZDEFS) $(ZASSERTDEFLIB) \
 217  218                  $(MAPFILES:%=-M%) $(MAPFILE.PGA:%=-M%) $(MAPFILE.NED:%=-M%) \
 218  219                  $(BDIRECT) $(NORUNPATH)
 219  220  
 220  221  
 221  222  # build rule for "portable" source 
 222  223  objs/%.o pics/%.o: %.c
 223  224          $(COMPILE.c) -o $@ $<
 224  225          $(POST_PROCESS_O)
 225  226  
 226  227  objs/%.o pics/%.o: %.cc
↓ open down ↓ 30 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX