Print this page
11506 smatch resync
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/intel/genunix/Makefile
+++ new/usr/src/uts/intel/genunix/Makefile
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.
27 -
26 +# Copyright 2019 Joyent, Inc.
28 27 #
29 -# This makefile drives the production of the generic
30 -# unix kernel module.
31 -#
32 -# x86 implementation architecture dependent
33 -#
34 28
35 29 #
36 30 # Path to the base of the uts directory tree (usually /usr/src/uts).
37 31 #
38 32 UTSBASE = ../..
39 33
40 34 #
41 35 # Define the module and object file sets.
42 36 #
43 37 MODULE = genunix
44 38 GENUNIX = $(OBJS_DIR)/$(MODULE)
45 39
46 40 OBJECTS = $(GENUNIX_OBJS:%=$(OBJS_DIR)/%) \
47 41 $(NOT_YET_KMODS:%=$(OBJS_DIR)/%)
48 42
49 -LINTS = $(GENUNIX_OBJS:%.o=$(LINTS_DIR)/%.ln) \
50 - $(NOT_YET_KMODS:%.o=$(LINTS_DIR)/%.ln)
51 -
52 43 ROOTMODULE = $(ROOT_KERN_DIR)/$(MODULE)
53 44
54 45 LIBGEN = $(OBJS_DIR)/libgenunix.so
55 46 LIBSTUBS = $(GENSTUBS_OBJS:%=$(OBJS_DIR)/%)
56 47
57 48 #
58 49 # Include common rules.
59 50 #
60 51 include $(UTSBASE)/intel/Makefile.intel
61 52
62 53 #
63 54 # Define targets
64 55 #
65 56 ALL_TARGET = $(LIBGEN) $(GENUNIX)
66 -LINT_TARGET = $(MODULE).lint
67 57 INSTALL_TARGET = $(LIBGEN) $(GENUNIX) $(ROOTMODULE)
68 58
69 59 #
70 60 # Overrides
71 61 #
72 62 CLOBBERFILES += $(GENUNIX)
73 63 CLEANFILES += $(LIBSTUBS) $(LIBGEN)
74 64 BINARY =
75 65
76 66 #
77 67 # Non-patch genunix builds merge a version of the ip module called ipctf. This
78 68 # is to ensure that the common network-related types are included in genunix and
79 69 # can thus be uniquified out of other modules. We don't want to do this for
80 70 # patch builds, since we can't guarantee that ip and genunix will be in the same
↓ open down ↓ |
4 lines elided |
↑ open up ↑ |
81 71 # patch.
82 72 #
83 73 IPCTF_TARGET = $(IPCTF)
84 74 $(PATCH_BUILD)IPCTF_TARGET =
85 75
86 76 CPPFLAGS += -I$(SRC)/common
87 77 CPPFLAGS += -I$(SRC)/uts/common/fs/zfs
88 78
89 79 CPPFLAGS += -I$(UTSBASE)/i86pc
90 80
91 -#
92 -# For now, disable these lint checks; maintainers should endeavor
93 -# to investigate and remove these for maximum lint coverage.
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 81 CERRWARN += -_gcc=-Wno-unused-label
104 82 CERRWARN += -_gcc=-Wno-unused-variable
105 83 CERRWARN += -_gcc=-Wno-unused-value
106 84 CERRWARN += -_gcc=-Wno-unused-function
107 85 CERRWARN += -_gcc=-Wno-parentheses
108 86 CERRWARN += -_gcc=-Wno-switch
109 87 CERRWARN += -_gcc=-Wno-type-limits
110 88 CERRWARN += -_gcc=-Wno-uninitialized
111 89 CERRWARN += -_gcc=-Wno-clobbered
112 90 CERRWARN += -_gcc=-Wno-empty-body
113 91
92 +# very hairy
93 +$(OBJS_DIR)/u8_textprep.o := SMATCH=off
94 +
114 95 # false positives
115 96 SMOFF += index_overflow
116 97 $(OBJS_DIR)/seg_vn.o := SMOFF += deref_check
117 98 $(OBJS_DIR)/ddi_intr_irm.o := SMOFF += deref_check
118 99
119 100 # need work still
120 101 SMOFF += signed,indenting,all_func_returns
121 102 $(OBJS_DIR)/clock_highres.o := SMOFF += signed_integer_overflow_check
122 103 $(OBJS_DIR)/evchannels.o := SMOFF += allocating_enough_data
123 104 $(OBJS_DIR)/klpd.o := SMOFF += cast_assign
124 105 $(OBJS_DIR)/lookup.o := SMOFF += strcpy_overflow
125 106 $(OBJS_DIR)/process.o := SMOFF += or_vs_and
126 107 $(OBJS_DIR)/sunpci.o := SMOFF += deref_check
127 108 $(OBJS_DIR)/timers.o := SMOFF += signed_integer_overflow_check
128 109
129 110 # definitely wrong
130 111 $(OBJS_DIR)/acl_common.o := SMOFF += or_vs_and
131 112
132 113 #
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 114 # Default build targets.
140 115 #
141 116 .KEEP_STATE:
142 117
143 118 def: $(DEF_DEPS)
144 119
145 120 all: $(ALL_DEPS)
146 121
147 122 clean: $(CLEAN_DEPS)
148 123
149 124 clobber: $(CLOBBER_DEPS)
150 125
151 -lint: $(LINT_DEPS)
152 -
153 -modlintlib: $(MODLINTLIB_DEPS)
154 -
155 -clean.lint: $(CLEAN_LINT_DEPS)
156 -
157 126 install: $(INSTALL_DEPS)
158 127
159 128 # Due to what seems to be an issue in GCC 4 generated DWARF containing
160 129 # symbolic relocations against non-allocatable .debug sections, libgenunix.so
161 130 # must be built from a stripped object, thus we create an intermediary
162 131 # libgenunix.o we can safely strip.
163 132 LIBGENUNIX_O = $(OBJS_DIR)/libgenunix.o
164 133 CLEANFILES += $(LIBGENUNIX_O)
165 134
166 135 $(LIBGENUNIX_O): $(OBJECTS)
167 136 $(LD) -r -o $(OBJS_DIR)/libgenunix.o $(OBJECTS)
168 137 $(STRIP) -x $(OBJS_DIR)/libgenunix.o
169 138
170 139 $(LIBGEN): $(LIBGENUNIX_O) $(LIBSTUBS)
171 140 $(BUILD.SO) $(LIBGENUNIX_O) $(LIBSTUBS)
172 141
173 142 $(IPCTF_TARGET) ipctf_target: FRC
174 143 @cd $(IPDRV_DIR); pwd; $(MAKE) ipctf.$(OBJS_DIR)
175 144 @pwd
176 145
177 146 $(GENUNIX): $(IPCTF_TARGET) $(OBJECTS)
178 147 $(LD) -r $(LDFLAGS) -o $@ $(OBJECTS)
179 148 $(CTFMERGE_GENUNIX_MERGE)
180 149 $(POST_PROCESS)
181 150
182 151 #
↓ open down ↓ |
16 lines elided |
↑ open up ↑ |
183 152 # Include common targets.
184 153 #
185 154 include $(UTSBASE)/intel/Makefile.targ
186 155
187 156 #
188 157 # Software workarounds for hardware "features".
189 158 #
190 159 include $(UTSBASE)/i86pc/Makefile.workarounds
191 160
192 161 ALL_DEFS += $(WORKAROUND_DEFS)
193 -
194 -#
195 -# Override.
196 -#
197 -$(MODULE).lint := GEN_LINT_LIB =
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX