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


  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 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23 # Use is subject to license terms.
  24 #
  25 #       This makefile drives the production of the zfs file system
  26 #       kernel module.
  27 #
  28 # Copyright 2013 Saso Kiselkov. All rights reserved.
  29 #
  30 # Copyright (c) 2016 by Delphix. All rights reserved.
  31 #

  32 
  33 #
  34 #       Path to the base of the uts directory tree (usually /usr/src/uts).
  35 #
  36 UTSBASE = ../..
  37 
  38 ARCHDIR:sh = cd ..; basename `pwd`
  39 
  40 #
  41 #       Define the module and object file sets.
  42 #
  43 MODULE          = zfs
  44 OBJECTS         = $(ZFS_OBJS:%=$(OBJS_DIR)/%) $(LUA_OBJS:%=$(OBJS_DIR)/%)
  45 # LUA_OBJS are intentionally omitted from LINTS
  46 LINTS           = $(ZFS_OBJS:%.o=$(LINTS_DIR)/%.ln)
  47 ROOTMODULE      = $(ROOT_DRV_DIR)/$(MODULE)
  48 ROOTLINK        = $(ROOT_FS_DIR)/$(MODULE)
  49 CONF_SRCDIR     = $(UTSBASE)/common/fs/zfs
  50 
  51 #


  76 
  77 #
  78 # For now, disable these lint checks; maintainers should endeavor
  79 # to investigate and remove these for maximum lint coverage.
  80 # Please do not carry these forward to new Makefiles.
  81 #
  82 LINTTAGS        += -erroff=E_SUSPICIOUS_COMPARISON
  83 LINTTAGS        += -erroff=E_BAD_PTR_CAST_ALIGN
  84 LINTTAGS        += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
  85 LINTTAGS        += -erroff=E_STATIC_UNUSED
  86 LINTTAGS        += -erroff=E_PTRDIFF_OVERFLOW
  87 LINTTAGS        += -erroff=E_ASSIGN_NARROW_CONV
  88 
  89 CERRWARN        += -_gcc=-Wno-type-limits
  90 CERRWARN        += -_gcc=-Wno-switch
  91 CERRWARN        += -_gcc=-Wno-parentheses
  92 CERRWARN        += -_gcc=-Wno-unused-variable
  93 CERRWARN        += -_gcc=-Wno-unused-function
  94 CERRWARN        += -_gcc=-Wno-unused-label
  95 












  96 #
  97 #       Default build targets.
  98 #
  99 .KEEP_STATE:
 100 
 101 def:            $(DEF_DEPS)
 102 
 103 all:            $(ALL_DEPS)
 104 
 105 clean:          $(CLEAN_DEPS)
 106 
 107 clobber:        $(CLOBBER_DEPS)
 108 
 109 lint:           $(LINT_DEPS)
 110 
 111 modlintlib:     $(MODLINTLIB_DEPS)
 112 
 113 clean.lint:     $(CLEAN_LINT_DEPS)
 114 
 115 install:        $(INSTALL_DEPS)


  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 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23 # Use is subject to license terms.
  24 #
  25 #       This makefile drives the production of the zfs file system
  26 #       kernel module.
  27 #
  28 # Copyright 2013 Saso Kiselkov. All rights reserved.
  29 #
  30 # Copyright (c) 2016 by Delphix. All rights reserved.
  31 #
  32 # Copyright (c) 2018, Joyent, Inc.
  33 
  34 #
  35 #       Path to the base of the uts directory tree (usually /usr/src/uts).
  36 #
  37 UTSBASE = ../..
  38 
  39 ARCHDIR:sh = cd ..; basename `pwd`
  40 
  41 #
  42 #       Define the module and object file sets.
  43 #
  44 MODULE          = zfs
  45 OBJECTS         = $(ZFS_OBJS:%=$(OBJS_DIR)/%) $(LUA_OBJS:%=$(OBJS_DIR)/%)
  46 # LUA_OBJS are intentionally omitted from LINTS
  47 LINTS           = $(ZFS_OBJS:%.o=$(LINTS_DIR)/%.ln)
  48 ROOTMODULE      = $(ROOT_DRV_DIR)/$(MODULE)
  49 ROOTLINK        = $(ROOT_FS_DIR)/$(MODULE)
  50 CONF_SRCDIR     = $(UTSBASE)/common/fs/zfs
  51 
  52 #


  77 
  78 #
  79 # For now, disable these lint checks; maintainers should endeavor
  80 # to investigate and remove these for maximum lint coverage.
  81 # Please do not carry these forward to new Makefiles.
  82 #
  83 LINTTAGS        += -erroff=E_SUSPICIOUS_COMPARISON
  84 LINTTAGS        += -erroff=E_BAD_PTR_CAST_ALIGN
  85 LINTTAGS        += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
  86 LINTTAGS        += -erroff=E_STATIC_UNUSED
  87 LINTTAGS        += -erroff=E_PTRDIFF_OVERFLOW
  88 LINTTAGS        += -erroff=E_ASSIGN_NARROW_CONV
  89 
  90 CERRWARN        += -_gcc=-Wno-type-limits
  91 CERRWARN        += -_gcc=-Wno-switch
  92 CERRWARN        += -_gcc=-Wno-parentheses
  93 CERRWARN        += -_gcc=-Wno-unused-variable
  94 CERRWARN        += -_gcc=-Wno-unused-function
  95 CERRWARN        += -_gcc=-Wno-unused-label
  96 
  97 # needs work
  98 SMOFF += all_func_returns,indenting
  99 $(OBJS_DIR)/llex.o := SMOFF += index_overflow
 100 $(OBJS_DIR)/metaslab.o := SMOFF += no_if_block
 101 $(OBJS_DIR)/zfs_vnops.o := SMOFF += signed
 102 # needs work
 103 $(OBJS_DIR)/zvol.o := SMOFF += deref_check,signed
 104 
 105 # false positives
 106 $(OBJS_DIR)/zfs_ctldir.o := SMOFF += strcpy_overflow
 107 $(OBJS_DIR)/zfs_ioctl.o := SMOFF += strcpy_overflow
 108 
 109 #
 110 #       Default build targets.
 111 #
 112 .KEEP_STATE:
 113 
 114 def:            $(DEF_DEPS)
 115 
 116 all:            $(ALL_DEPS)
 117 
 118 clean:          $(CLEAN_DEPS)
 119 
 120 clobber:        $(CLOBBER_DEPS)
 121 
 122 lint:           $(LINT_DEPS)
 123 
 124 modlintlib:     $(MODLINTLIB_DEPS)
 125 
 126 clean.lint:     $(CLEAN_LINT_DEPS)
 127 
 128 install:        $(INSTALL_DEPS)