Print this page
10077 usr/src/uts/ Makefile changes for smatch


   6 # You may not use this file except in compliance with the License.
   7 #
   8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9 # or http://www.opensolaris.org/os/licensing.
  10 # See the License for the specific language governing permissions
  11 # and limitations under the License.
  12 #
  13 # When distributing Covered Code, include this CDDL HEADER in each
  14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15 # If applicable, add the following below this CDDL HEADER, with the
  16 # fields enclosed by brackets "[]" replaced with your own identifying
  17 # information: Portions Copyright [yyyy] [name of copyright owner]
  18 #
  19 # CDDL HEADER END
  20 #
  21 
  22 #
  23 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  24 # Use is subject to license terms.
  25 #

  26 
  27 #
  28 #       This makefile drives the production of the generic
  29 #       unix kernel module.
  30 #
  31 #       x86 implementation architecture dependent
  32 #
  33 
  34 #
  35 #       Path to the base of the uts directory tree (usually /usr/src/uts).
  36 #
  37 UTSBASE = ../..
  38 
  39 #
  40 #       Define the module and object file sets.
  41 #
  42 MODULE          = genunix
  43 GENUNIX         = $(OBJS_DIR)/$(MODULE)
  44 
  45 OBJECTS         = $(GENUNIX_OBJS:%=$(OBJS_DIR)/%) \


  93 # Please do not carry these forward to new Makefiles.
  94 #
  95 LINTTAGS        += -erroff=E_SUSPICIOUS_COMPARISON
  96 LINTTAGS        += -erroff=E_BAD_PTR_CAST_ALIGN
  97 LINTTAGS        += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
  98 LINTTAGS        += -erroff=E_STATIC_UNUSED
  99 LINTTAGS        += -erroff=E_PTRDIFF_OVERFLOW
 100 LINTTAGS        += -erroff=E_ASSIGN_NARROW_CONV
 101 
 102 CERRWARN        += -_gcc=-Wno-unused-label
 103 CERRWARN        += -_gcc=-Wno-unused-variable
 104 CERRWARN        += -_gcc=-Wno-unused-value
 105 CERRWARN        += -_gcc=-Wno-unused-function
 106 CERRWARN        += -_gcc=-Wno-parentheses
 107 CERRWARN        += -_gcc=-Wno-switch
 108 CERRWARN        += -_gcc=-Wno-type-limits
 109 CERRWARN        += -_gcc=-Wno-uninitialized
 110 CERRWARN        += -_gcc=-Wno-clobbered
 111 CERRWARN        += -_gcc=-Wno-empty-body
 112 


















 113 #
 114 # Ensure that lint sees 'struct cpu' containing a fully declared
 115 # embedded 'struct machcpu'
 116 #
 117 LINTFLAGS       += -D_MACHDEP -I../../i86pc
 118 
 119 #
 120 #       Default build targets.
 121 #
 122 .KEEP_STATE:
 123 
 124 def:            $(DEF_DEPS)
 125 
 126 all:            $(ALL_DEPS)
 127 
 128 clean:          $(CLEAN_DEPS)
 129 
 130 clobber:        $(CLOBBER_DEPS)
 131 
 132 lint:           $(LINT_DEPS)




   6 # You may not use this file except in compliance with the License.
   7 #
   8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9 # or http://www.opensolaris.org/os/licensing.
  10 # See the License for the specific language governing permissions
  11 # and limitations under the License.
  12 #
  13 # When distributing Covered Code, include this CDDL HEADER in each
  14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15 # If applicable, add the following below this CDDL HEADER, with the
  16 # fields enclosed by brackets "[]" replaced with your own identifying
  17 # information: Portions Copyright [yyyy] [name of copyright owner]
  18 #
  19 # CDDL HEADER END
  20 #
  21 
  22 #
  23 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  24 # Use is subject to license terms.
  25 #
  26 # Copyright (c) 2018, Joyent, Inc.
  27 
  28 #
  29 #       This makefile drives the production of the generic
  30 #       unix kernel module.
  31 #
  32 #       x86 implementation architecture dependent
  33 #
  34 
  35 #
  36 #       Path to the base of the uts directory tree (usually /usr/src/uts).
  37 #
  38 UTSBASE = ../..
  39 
  40 #
  41 #       Define the module and object file sets.
  42 #
  43 MODULE          = genunix
  44 GENUNIX         = $(OBJS_DIR)/$(MODULE)
  45 
  46 OBJECTS         = $(GENUNIX_OBJS:%=$(OBJS_DIR)/%) \


  94 # Please do not carry these forward to new Makefiles.
  95 #
  96 LINTTAGS        += -erroff=E_SUSPICIOUS_COMPARISON
  97 LINTTAGS        += -erroff=E_BAD_PTR_CAST_ALIGN
  98 LINTTAGS        += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
  99 LINTTAGS        += -erroff=E_STATIC_UNUSED
 100 LINTTAGS        += -erroff=E_PTRDIFF_OVERFLOW
 101 LINTTAGS        += -erroff=E_ASSIGN_NARROW_CONV
 102 
 103 CERRWARN        += -_gcc=-Wno-unused-label
 104 CERRWARN        += -_gcc=-Wno-unused-variable
 105 CERRWARN        += -_gcc=-Wno-unused-value
 106 CERRWARN        += -_gcc=-Wno-unused-function
 107 CERRWARN        += -_gcc=-Wno-parentheses
 108 CERRWARN        += -_gcc=-Wno-switch
 109 CERRWARN        += -_gcc=-Wno-type-limits
 110 CERRWARN        += -_gcc=-Wno-uninitialized
 111 CERRWARN        += -_gcc=-Wno-clobbered
 112 CERRWARN        += -_gcc=-Wno-empty-body
 113 
 114 # false positives
 115 SMOFF += index_overflow
 116 $(OBJS_DIR)/seg_vn.o := SMOFF += deref_check
 117 $(OBJS_DIR)/ddi_intr_irm.o := SMOFF += deref_check
 118 
 119 # need work still
 120 SMOFF += signed,indenting,all_func_returns
 121 $(OBJS_DIR)/clock_highres.o := SMOFF += signed_integer_overflow_check
 122 $(OBJS_DIR)/evchannels.o := SMOFF += allocating_enough_data
 123 $(OBJS_DIR)/klpd.o := SMOFF += cast_assign
 124 $(OBJS_DIR)/lookup.o := SMOFF += strcpy_overflow
 125 $(OBJS_DIR)/process.o := SMOFF += or_vs_and
 126 $(OBJS_DIR)/sunpci.o := SMOFF += deref_check
 127 $(OBJS_DIR)/timers.o := SMOFF += signed_integer_overflow_check
 128 
 129 # definitely wrong
 130 $(OBJS_DIR)/acl_common.o := SMOFF += or_vs_and
 131 
 132 #
 133 # Ensure that lint sees 'struct cpu' containing a fully declared
 134 # embedded 'struct machcpu'
 135 #
 136 LINTFLAGS       += -D_MACHDEP -I../../i86pc
 137 
 138 #
 139 #       Default build targets.
 140 #
 141 .KEEP_STATE:
 142 
 143 def:            $(DEF_DEPS)
 144 
 145 all:            $(ALL_DEPS)
 146 
 147 clean:          $(CLEAN_DEPS)
 148 
 149 clobber:        $(CLOBBER_DEPS)
 150 
 151 lint:           $(LINT_DEPS)