Print this page
11506 smatch resync
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/i86pc/unix/Makefile
+++ new/usr/src/uts/i86pc/unix/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
↓ open down ↓ |
13 lines elided |
↑ open up ↑ |
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
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 # Copyright 2008 Sun Microsystems, Inc. All rights reserved.
22 22 # Use is subject to license terms.
23 23 #
24 -# Copyright (c) 2018, Joyent, Inc.
24 +# Copyright 2019 Joyent, Inc.
25 25 # Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
26 26
27 27 #
28 28 # Path to the base of the uts directory tree (usually /usr/src/uts).
29 29 #
30 30 UTSBASE = ../..
31 31
32 32 #
33 33 # Define the module and object file sets.
34 34 #
35 35 UNIX = unix
36 36 DBOOT = dboot
37 37
38 38 OBJECTS = $(SPECIAL_OBJS:%=$(OBJS_DIR)/%) \
39 39 $(CORE_OBJS:%=$(OBJS_DIR)/%) \
40 40 $(KRTLD_OBJS:%=$(OBJS_DIR)/%) \
41 41 $(MACH_NOT_YET_KMODS:%=$(OBJS_DIR)/%)
42 42
43 43 ROOTMODULE = $(ROOT_PSM_KERN_DIR)/$(UNIX)
44 44
45 45 UNIX_BIN = $(OBJS_DIR)/$(UNIX)
46 46
47 47 LIBS = $(GENLIB)
48 48
49 49 GENUNIX = genunix
50 50 GENUNIX_DIR = ../../intel/$(GENUNIX)
51 51
52 52 LIBOPTS = -L $(GENUNIX_DIR)/$(OBJS_DIR) -l $(GENUNIX)
53 53
54 54 COMMP_CTF_SRC = $(OBJS_DIR)/comm_page_ctf.c
55 55
56 56 CTFEXTRAOBJS = $(OBJS_DIR)/vers.o $(OBJS_DIR)/comm_page_ctf.o
57 57
58 58 DBOOT_OBJS_DIR = dboot/$(OBJS_DIR)
59 59 DBOOT_OBJECTS = $(DBOOT_OBJS:%=$(DBOOT_OBJS_DIR)/%)
60 60 DBOOT_BIN = $(DBOOT_OBJS_DIR)/$(DBOOT)
61 61 DBOOT_O = $(OBJS_DIR)/$(DBOOT).o
62 62 DBOOT_S = $(DBOOT_O:%.o=%.s)
63 63
64 64 #
65 65 # Include common rules.
66 66 #
67 67 include $(UTSBASE)/i86pc/Makefile.i86pc
68 68
69 69 #
70 70 # Define targets
71 71 #
72 72 ALL_TARGET = $(UNIX_BIN)
73 73 INSTALL_TARGET = $(UNIX_BIN) $(ROOTMODULE)
74 74
75 75 #
76 76 # This is UNIX_DIR. Use a short path.
77 77 #
78 78 UNIX_DIR = .
79 79
80 80 #
81 81 # Overrides
82 82 #
83 83 CLEANFILES += \
84 84 $(UNIX_O) $(MODSTUBS_O) \
85 85 $(OBJS_DIR)/vers.c \
86 86 $(OBJS_DIR)/dtracestubs.s \
87 87 $(DTRACESTUBS_O) $(DTRACESTUBS) \
88 88 $(CTFEXTRAOBJS) \
89 89 $(COMMP_CTF_SRC)
90 90
91 91 CLEANFILES += \
92 92 $(DBOOT_O) $(DBOOT_S) \
93 93 $(DBOOT_OBJECTS) \
94 94 $(OBJS_DIR)/bios_call_src.o \
95 95 $(OBJS_DIR)/bios_call_src \
96 96 $(OBJS_DIR)/bios_call.s \
97 97 $(DBOOT_BIN)
98 98
99 99 CLEANFILES += \
100 100 $(DBOOT_OBJS_DIR)/$(FONT).c \
101 101 $(OBJS_DIR)/$(FONT).c
102 102
103 103 CLEANFILES += \
104 104 $(OBJS_DIR)/fb_swtch_src.o \
105 105 $(OBJS_DIR)/fb_swtch_src \
106 106 $(OBJS_DIR)/fb_swtch.s
107 107
108 108 CLEANFILES += \
109 109 $(ZLIB_OBJS:%.o=$(OBJS_DIR)/%.o) \
110 110 $(ZLIB_OBJS:%.o=$(OBJS_DIR)/%.ln)
111 111
112 112 CLOBBERFILES = $(CLEANFILES) $(UNIX_BIN)
113 113
114 114 # instr_size needs a special header
115 115 $(OBJS_DIR)/instr_size.o := EXTRA_OPTIONS = -I$(SRC)/common/dis/i386
116 116 $(OBJS_DIR)/instr_size.ln := EXTRA_OPTIONS = -I$(SRC)/common/dis/i386
117 117
118 118 #
119 119 # When performing shadow studio builds, the pre-processed comm page
120 120 # output from gcc can end up confusing studio.
121 121 #
122 122 $(OBJS_DIR)/comm_page_ctf.o := CERRWARN += -_cc=-erroff=E_TKNS_IGNORED_AT_END_OF_DIR
123 123
124 124 CFLAGS += -DDIS_MEM
125 125
126 126 #
127 127 # For now, disable these checks; maintainers should endeavor
128 128 # to investigate and remove these for maximum coverage.
129 129 # Please do not carry these forward to new Makefiles.
130 130 #
131 131 CERRWARN += -_gcc=-Wno-parentheses
132 132 CERRWARN += -_gcc=-Wno-uninitialized
133 133 CERRWARN += -_gcc=-Wno-char-subscripts
134 134 CERRWARN += -_gcc=-Wno-unused-variable
135 135 CERRWARN += -_gcc=-Wno-unused-function
136 136 CERRWARN += -_gcc=-Wno-unused-label
137 137 CERRWARN += -_gcc=-Wno-type-limits
138 138 CERRWARN += -_gcc=-Wno-clobbered
139 139 CERRWARN += -_gcc=-Wno-empty-body
140 140 CERRWARN += -_gcc=-Wno-unused-value
141 141
↓ open down ↓ |
107 lines elided |
↑ open up ↑ |
142 142 # false positives
143 143 SMOFF += index_overflow
144 144
145 145 # needs work
146 146 SMOFF += all_func_returns,deref_check,signed
147 147
148 148 $(OBJS_DIR)/fmsmb.o := SMOFF += indenting
149 149 $(OBJS_DIR)/zutil.o := SMOFF += indenting
150 150 $(OBJS_DIR)/bootrd_cpio.o := SMOFF += allocating_enough_data
151 151
152 +# too hairy
153 +$(OBJS_DIR)/inflate.o := SMATCH=off
154 +
152 155 #
153 156 # Default build targets.
154 157 #
155 158 .KEEP_STATE:
156 159
157 160 def: $(DEF_DEPS)
158 161
159 162 all: $(ALL_DEPS)
160 163
161 164 clean: $(CLEAN_DEPS)
162 165
163 166 clobber: $(CLOBBER_DEPS)
164 167
165 168 install: $(INSTALL_DEPS)
166 169
167 170 MAPFILE_32 = $(MAPFILE)
168 171 MAPFILE_64 = $(MAPFILE).amd64
169 172
170 173 MAPFILE_NAME = $(MAPFILE_$(CLASS))
171 174
172 175 $(UNIX_BIN): $(UNIX_O) $(MODSTUBS_O) $(MAPFILE_NAME) \
173 176 $(GENLIB) $(DTRACESTUBS) $(DBOOT_O)
174 177 $(LD) -dy -b -o $@ -e dboot_image -znointerp -M $(MAPFILE_NAME) \
175 178 $(UNIX_O) $(DBOOT_O) $(MODSTUBS_O) $(LIBOPTS) \
176 179 $(DTRACESTUBS)
177 180 $(MBH_PATCH) $(UNIX_BIN)
178 181 $(CTFMERGE_UNIQUIFY_AGAINST_GENUNIX)
179 182 $(POST_PROCESS)
180 183
181 184 $(UNIX_O): $(OBJECTS) $(CTFEXTRAOBJS)
182 185 $(LD) -r -o $@ $(OBJECTS) $(OBJS_DIR)/vers.o
183 186
184 187 $(DBOOT_BIN): $(DBOOT_OBJS_DIR) $(DBOOT_OBJECTS) dboot/Mapfile.dboot
185 188 $(LD) -dn -e _start -M dboot/Mapfile.dboot \
186 189 -o $(DBOOT_BIN) $(DBOOT_OBJECTS)
187 190
188 191 $(DBOOT_O): $(DBOOT_BIN)
189 192 @echo " .data" > $(DBOOT_S)
190 193 @echo " .globl dboot_image" >> $(DBOOT_S)
191 194 @echo "dboot_image:" >> $(DBOOT_S)
192 195 $(ELFEXTRACT) $(DBOOT_BIN) >> $(DBOOT_S)
193 196 $(COMPILE.s) -o $(DBOOT_O) $(DBOOT_S)
194 197
195 198 $(DBOOT_OBJS_DIR):
196 199 -@mkdir -p $@ 2> /dev/null
197 200
198 201 $(COMMP_CTF_SRC): $(UTSBASE)/i86pc/ml/comm_page.s
199 202 $(COMPILE.cpp) -D_GENCTF -o $@ $(UTSBASE)/i86pc/ml/comm_page.s
200 203
201 204 $(OBJS_DIR)/comm_page_ctf.o: $(COMMP_CTF_SRC)
202 205 $(COMPILE.c) -o $@ $<
203 206 $(CTFCONVERT_O)
204 207
205 208 #
206 209 # Special rules for generating assym.h for inclusion in assembly files.
207 210 #
208 211 $(DSF_DIR)/$(OBJS_DIR)/assym.h $(DSF_DIR)/$(OBJS_DIR)/kdi_assym.h: FRC
209 212 @cd $(DSF_DIR); $(MAKE) all.targ
210 213
211 214 #
212 215 # Include common targets.
213 216 #
214 217 include $(UTSBASE)/i86pc/Makefile.targ
↓ open down ↓ |
53 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX