Print this page
    
10079 smatch Makefile changes for usr/src/lib
    
      
        | Split | Close | 
      | Expand all | 
      | Collapse all | 
    
    
          --- old/usr/src/lib/libsum/Makefile.com
          +++ new/usr/src/lib/libsum/Makefile.com
   1    1  #
   2    2  # CDDL HEADER START
   3    3  #
   4    4  # The contents of this file are subject to the terms of the
   5    5  # Common Development and Distribution License (the "License").
   6    6  # You may not use this file except in compliance with the License.
   7    7  #
   8    8  # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9    9  # or http://www.opensolaris.org/os/licensing.
  10   10  # See the License for the specific language governing permissions
  11   11  # and limitations under the License.
  12   12  #
  13   13  # When distributing Covered Code, include this CDDL HEADER in each
  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
  
    | ↓ open down ↓ | 15 lines elided | ↑ open up ↑ | 
  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  #
  23   23  # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  24   24  # Use is subject to license terms.
  25   25  #
       26 +# Copyright (c) 2018, Joyent, Inc.
  26   27  
  27   28  SHELL=/usr/bin/ksh93
  28   29  
  29   30  LIBRARY=        libsum.a
  30   31  VERS=           .1
  31   32  
  32   33  OBJECTS= \
  33   34          sumlib.o
  34   35  
  35   36  include ../../Makefile.astmsg
  36   37  
  37   38  include ../../Makefile.lib
  38   39  
  39   40  # mapfile-vers does not live with the sources in in common/ to make
  40   41  # automated code updates easier.
  41   42  MAPFILES=       ../mapfile-vers
  42   43  
  43   44  # Set common AST build flags (e.g. C99/XPG6, needed to support the math stuff)
  44   45  include ../../../Makefile.ast
  45   46  
  46   47  LIBS =          $(DYNLIB) $(LINTLIB)
  47   48  
  48   49  LDLIBS += \
  49   50                  -last \
  50   51                  -lmd \
  51   52                  -lc
  52   53  
  53   54  $(LINTLIB) :=   SRCS = $(SRCDIR)/$(LINTSRC)
  54   55  
  55   56  SRCDIR =        ../common
  56   57  
  57   58  # We use "=" here since using $(CPPFLAGS.master) is very tricky in our
  58   59  # case - it MUST come as the last element but future changes in -D options
  59   60  # may then cause silent breakage in the AST sources because the last -D
  60   61  # option specified overrides previous -D options so we prefer the current
  61   62  # way to explicitly list each single flag.
  62   63  # Notes:
  63   64  #   - "-D_BLD_DLL" comes from ${mam_cc_DLL} in Mamfile
  64   65  CPPFLAGS = \
  65   66          $(DTEXTDOM) $(DTS_ERRNO) \
  66   67          -Isrc/lib/libsum \
  67   68          -I$(ROOT)/usr/include/ast \
  68   69          -I$(ROOT)/usr/include \
  
    | ↓ open down ↓ | 33 lines elided | ↑ open up ↑ | 
  69   70          -D_PACKAGE_ast \
  70   71          -D_BLD_DLL
  71   72  
  72   73  CFLAGS += \
  73   74          $(ASTCFLAGS)
  74   75  CFLAGS64 += \
  75   76          $(ASTCFLAGS64)
  76   77  
  77   78  CERRWARN        += -_gcc=-Wno-parentheses
  78   79  
       80 +SMOFF += all_func_returns
       81 +
  79   82  # This codepath is performance-critical
  80   83  sparc_COPTFLAG=-xO5 -_cc=-xprefetch=auto,explicit
  81   84  sparcv9_COPTFLAG=-xO5 -_cc=-xprefetch=auto,explicit
  82   85  i386_COPTFLAG=-_cc=-xO5 -_cc=-xprefetch=auto,explicit
  83   86  amd64_COPTFLAG=-_cc=-xO5  -_cc=-xprefetch=auto,explicit
  84   87  
  85   88  # Suppress this one warning as the fix would break old gcc, which upstream
  86   89  # still supports. This needs a better fix (later).
  87   90  pics/sumlib.o   := CERRWARN += -erroff=E_CONST_PROMOTED_UNSIGNED_LONG
  88   91  
  89   92  .KEEP_STATE:
  90   93  
  91   94  all: $(LIBS)
  92   95  
  93   96  #
  94   97  # libsum is not lint-clean yet; fake up a target.  (You can use
  95   98  # "make lintcheck" to actually run lint; please send all lint fixes
  96   99  # upstream (to AT&T) so the next update will pull them into ON.)
  97  100  #
  98  101  lint:
  99  102          @ print "usr/src/lib/libsum is not lint-clean: skipping"
 100  103  
 101  104  include ../../Makefile.targ
  
    | ↓ open down ↓ | 13 lines elided | ↑ open up ↑ | 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX