Print this page
10063 basic support for smatch
10153 checkpaths shouldn't check packaging exceptions


   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 (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
  24 # Copyright (c) 2011 Bayard G. Bell. All rights reserved.
  25 # Copyright (c) 2011 by Delphix. All rights reserved.
  26 # Copyright (c) 2013 Andrew Stormont.  All rights reserved.
  27 # Copyright 2016 Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>

  28 #
  29 
  30 #
  31 #       This Makefile contains the common targets and definitions for
  32 #       all kernels. It is to be included in the Makefiles for specific
  33 #       implementation architectures and processor architecture dependent
  34 #       modules: i.e.: all driving kernel Makefiles.
  35 #
  36 #       Include global definitions:
  37 #
  38 include $(SRC)/Makefile.master
  39 
  40 #
  41 #       No text domain in the kernel.
  42 #
  43 DTEXTDOM =
  44 
  45 #
  46 #       Keep references to $(SRC)/common relative.
  47 COMMONBASE=     $(UTSBASE)/../common


 209 
 210 #
 211 #       Make it (relatively) easy to share compilation options between
 212 #       all kernel implementations.
 213 #
 214 
 215 # Override the default, the kernel is squeaky clean
 216 CERRWARN = -errtags=yes -errwarn=%all
 217 
 218 CERRWARN += -_gcc=-Wno-missing-braces
 219 CERRWARN += -_gcc=-Wno-sign-compare
 220 CERRWARN += -_gcc=-Wno-unknown-pragmas
 221 CERRWARN += -_gcc=-Wno-unused-parameter
 222 CERRWARN += -_gcc=-Wno-missing-field-initializers
 223 
 224 # DEBUG v. -nd make for frequent unused variables, empty conditions, etc. in
 225 # -nd builds
 226 $(RELEASE_BUILD)CERRWARN += -_gcc=-Wno-unused
 227 $(RELEASE_BUILD)CERRWARN += -_gcc=-Wno-empty-body
 228 









 229 CSTD = $(CSTD_GNU99)
 230 
 231 CFLAGS_uts              =
 232 CFLAGS_uts              += $(STAND_FLAGS_$(CLASS))
 233 CFLAGS_uts              += $(CCVERBOSE)
 234 CFLAGS_uts              += $(ILDOFF)
 235 CFLAGS_uts              += $(XAOPT)
 236 CFLAGS_uts              += $(CTF_FLAGS_$(CLASS))
 237 CFLAGS_uts              += $(CERRWARN)
 238 CFLAGS_uts              += $(CCNOAUTOINLINE)
 239 CFLAGS_uts              += $(CCNOREORDER)
 240 CFLAGS_uts              += $(CGLOBALSTATIC)
 241 CFLAGS_uts              += $(EXTRA_CFLAGS)
 242 CFLAGS_uts              += $(CSOURCEDEBUGFLAGS)
 243 CFLAGS_uts              += $(CUSERFLAGS)
 244 
 245 #
 246 #       Declare that $(OBJECTS) and $(LINTS) can be compiled in parallel.
 247 #       The DUMMY target is for those instances where OBJECTS and LINTS
 248 #       are empty (to avoid an unconditional .PARALLEL).




   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 (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
  24 # Copyright (c) 2011 Bayard G. Bell. All rights reserved.
  25 # Copyright (c) 2011 by Delphix. All rights reserved.
  26 # Copyright (c) 2013 Andrew Stormont.  All rights reserved.
  27 # Copyright 2016 Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
  28 # Copyright (c) 2018, Joyent, Inc.
  29 #
  30 
  31 #
  32 #       This Makefile contains the common targets and definitions for
  33 #       all kernels. It is to be included in the Makefiles for specific
  34 #       implementation architectures and processor architecture dependent
  35 #       modules: i.e.: all driving kernel Makefiles.
  36 #
  37 #       Include global definitions:
  38 #
  39 include $(SRC)/Makefile.master
  40 
  41 #
  42 #       No text domain in the kernel.
  43 #
  44 DTEXTDOM =
  45 
  46 #
  47 #       Keep references to $(SRC)/common relative.
  48 COMMONBASE=     $(UTSBASE)/../common


 210 
 211 #
 212 #       Make it (relatively) easy to share compilation options between
 213 #       all kernel implementations.
 214 #
 215 
 216 # Override the default, the kernel is squeaky clean
 217 CERRWARN = -errtags=yes -errwarn=%all
 218 
 219 CERRWARN += -_gcc=-Wno-missing-braces
 220 CERRWARN += -_gcc=-Wno-sign-compare
 221 CERRWARN += -_gcc=-Wno-unknown-pragmas
 222 CERRWARN += -_gcc=-Wno-unused-parameter
 223 CERRWARN += -_gcc=-Wno-missing-field-initializers
 224 
 225 # DEBUG v. -nd make for frequent unused variables, empty conditions, etc. in
 226 # -nd builds
 227 $(RELEASE_BUILD)CERRWARN += -_gcc=-Wno-unused
 228 $(RELEASE_BUILD)CERRWARN += -_gcc=-Wno-empty-body
 229 
 230 CERRWARN += -_smatch=-p=illumos_kernel
 231 include $(SRC)/Makefile.smatch
 232 
 233 #
 234 # Unfortunately, _IOWR() is regularly used with a third argument of 0,
 235 # so we have to disable all these smatch checks.
 236 #
 237 SMOFF += sizeof
 238 
 239 CSTD = $(CSTD_GNU99)
 240 
 241 CFLAGS_uts              =
 242 CFLAGS_uts              += $(STAND_FLAGS_$(CLASS))
 243 CFLAGS_uts              += $(CCVERBOSE)
 244 CFLAGS_uts              += $(ILDOFF)
 245 CFLAGS_uts              += $(XAOPT)
 246 CFLAGS_uts              += $(CTF_FLAGS_$(CLASS))
 247 CFLAGS_uts              += $(CERRWARN)
 248 CFLAGS_uts              += $(CCNOAUTOINLINE)
 249 CFLAGS_uts              += $(CCNOREORDER)
 250 CFLAGS_uts              += $(CGLOBALSTATIC)
 251 CFLAGS_uts              += $(EXTRA_CFLAGS)
 252 CFLAGS_uts              += $(CSOURCEDEBUGFLAGS)
 253 CFLAGS_uts              += $(CUSERFLAGS)
 254 
 255 #
 256 #       Declare that $(OBJECTS) and $(LINTS) can be compiled in parallel.
 257 #       The DUMMY target is for those instances where OBJECTS and LINTS
 258 #       are empty (to avoid an unconditional .PARALLEL).