Print this page
11528 Makefile.noget can get gone
11529 Use -Wno-maybe-initialized
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
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 24 # Copyright (c) 2018, 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 #
↓ open down ↓ |
121 lines elided |
↑ open up ↑ |
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 -CERRWARN += -_gcc=-Wno-uninitialized
132 +CERRWARN += $(CNOWARN_UNINIT)
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
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 152 #
153 153 # Default build targets.
154 154 #
155 155 .KEEP_STATE:
156 156
157 157 def: $(DEF_DEPS)
158 158
159 159 all: $(ALL_DEPS)
160 160
161 161 clean: $(CLEAN_DEPS)
162 162
163 163 clobber: $(CLOBBER_DEPS)
164 164
165 165 install: $(INSTALL_DEPS)
166 166
167 167 MAPFILE_32 = $(MAPFILE)
168 168 MAPFILE_64 = $(MAPFILE).amd64
169 169
170 170 MAPFILE_NAME = $(MAPFILE_$(CLASS))
171 171
172 172 $(UNIX_BIN): $(UNIX_O) $(MODSTUBS_O) $(MAPFILE_NAME) \
173 173 $(GENLIB) $(DTRACESTUBS) $(DBOOT_O)
174 174 $(LD) -dy -b -o $@ -e dboot_image -znointerp -M $(MAPFILE_NAME) \
175 175 $(UNIX_O) $(DBOOT_O) $(MODSTUBS_O) $(LIBOPTS) \
176 176 $(DTRACESTUBS)
177 177 $(MBH_PATCH) $(UNIX_BIN)
178 178 $(CTFMERGE_UNIQUIFY_AGAINST_GENUNIX)
179 179 $(POST_PROCESS)
180 180
181 181 $(UNIX_O): $(OBJECTS) $(CTFEXTRAOBJS)
182 182 $(LD) -r -o $@ $(OBJECTS) $(OBJS_DIR)/vers.o
183 183
184 184 $(DBOOT_BIN): $(DBOOT_OBJS_DIR) $(DBOOT_OBJECTS) dboot/Mapfile.dboot
185 185 $(LD) -dn -e _start -M dboot/Mapfile.dboot \
186 186 -o $(DBOOT_BIN) $(DBOOT_OBJECTS)
187 187
188 188 $(DBOOT_O): $(DBOOT_BIN)
189 189 @echo " .data" > $(DBOOT_S)
190 190 @echo " .globl dboot_image" >> $(DBOOT_S)
191 191 @echo "dboot_image:" >> $(DBOOT_S)
192 192 $(ELFEXTRACT) $(DBOOT_BIN) >> $(DBOOT_S)
193 193 $(COMPILE.s) -o $(DBOOT_O) $(DBOOT_S)
194 194
195 195 $(DBOOT_OBJS_DIR):
196 196 -@mkdir -p $@ 2> /dev/null
197 197
198 198 $(COMMP_CTF_SRC): $(UTSBASE)/i86pc/ml/comm_page.s
199 199 $(COMPILE.cpp) -D_GENCTF -o $@ $(UTSBASE)/i86pc/ml/comm_page.s
200 200
201 201 $(OBJS_DIR)/comm_page_ctf.o: $(COMMP_CTF_SRC)
202 202 $(COMPILE.c) -o $@ $<
203 203 $(CTFCONVERT_O)
204 204
205 205 #
206 206 # Special rules for generating assym.h for inclusion in assembly files.
207 207 #
208 208 $(DSF_DIR)/$(OBJS_DIR)/assym.h $(DSF_DIR)/$(OBJS_DIR)/kdi_assym.h: FRC
209 209 @cd $(DSF_DIR); $(MAKE) all.targ
210 210
211 211 #
212 212 # Include common targets.
213 213 #
214 214 include $(UTSBASE)/i86pc/Makefile.targ
↓ open down ↓ |
72 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX