Print this page
11528 Makefile.noget can get gone
11529 Use -Wno-maybe-initialized
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/mdb/Makefile.kmdb
+++ new/usr/src/cmd/mdb/Makefile.kmdb
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 #
22 22 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 23 # Use is subject to license terms.
24 24 #
25 25 # Copyright 2011 Nexenta Systems, Inc. All rights reserved.
26 26 #
27 27
28 28 .KEEP_STATE:
29 29 .SUFFIXES:
30 30
31 31 PROG = kmdbmod
32 32
33 33 include ../Makefile.kmdb
34 34 include ../../Makefile.kmdb
35 35 include ../../../Makefile.versions
36 36 include ../../../Makefile.tools
37 37 include ../../../Makefile.kmdb.files
38 38
39 39 OBJS += mdb_lex.o mdb_grammar.o
40 40
41 41 .NO_PARALLEL:
42 42 .PARALLEL: kmdb_modlinktest.o kmdb_terminfo.c $(ALLOBJS) $(ALLOBJS:%.o=%.ln)
43 43
44 44 SRCINCDIRS += . .. ../.. ../../../common ../../../common/libstand
45 45 OSINCDIRS += $(SRC)/uts/$(MMU) $(SRC)/uts/$(ISADIR)
46 46
47 47 INCDIRS = $(SRCINCDIRS) $(OSINCDIRS)
48 48
49 49 # We don't want thread-specific errno's in kmdb, as we're single-threaded.
50 50 DTS_ERRNO=
51 51
52 52 $(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
53 53 CPPFLAGS += -D_MDB -D_KMDB $(INCDIRS:%=-I%) $(ARCHOPTS)
54 54
55 55 #
56 56 # kmdb is a kernel module, so we'll use the kernel's build flags.
57 57 CFLAGS64 += $(STAND_FLAGS_64)
58 58
59 59 ASFLAGS += -P -D_ASM $(INCDIRS:%=-I%) $(ARCHOPTS)
60 60
61 61 SUBDIR64_sparc = sparcv9
62 62 SUBDIR64_i386 = amd64
63 63 SUBDIR64 = $(SUBDIR64_$(MACH))
64 64
65 65 #
66 66 # Terminal types supported by kmdb
67 67 #
68 68 SUPPORTED_TERMS = \
69 69 ansi \
70 70 at386 \
71 71 dtterm \
72 72 h19 \
73 73 sun \
74 74 sun-cmd \
75 75 sun-color \
76 76 vt100 \
77 77 vt52 \
78 78 wyse30 \
79 79 wyse50 \
80 80 wyse60 \
81 81 xterm \
82 82 xterms
83 83
84 84 LINTFLAGS += -n -errtags=yes
85 85
86 86 # The prom interfaces (the prom_* files) are compiled with -D_KERNEL, which
87 87 # teaches them about the kernel version of the synchronization functions, while
88 88 # the core of kmdb, which is compiled without -D_KERNEL, knows about the
89 89 # userland versions. Even though nobody actually uses either one, lint
90 90 # complains that both know about different versions. The same thing applies
↓ open down ↓ |
90 lines elided |
↑ open up ↑ |
91 91 # to the driver, parts of which are executed directly by the kernel, and other
92 92 # parts which are called by kmdb via the auxv.
93 93 ALLLINTFLAGS = $(LINTFLAGS) \
94 94 -xerroff=E_FUNC_DECL_VAR_ARG2 \
95 95 -xerroff=E_INCONS_ARG_DECL \
96 96 -xerroff=E_INCONS_ARG_DECL2 \
97 97 -xerroff=E_INCONS_ARG_USED2 \
98 98 -xerroff=E_INCONS_VAL_TYPE_DECL2 \
99 99 -xerroff=E_INCONS_VAL_TYPE_USED2
100 100
101 -CERRWARN += -_gcc=-Wno-uninitialized
101 +CERRWARN += $(CNOWARN_UNINIT)
102 102 CERRWARN += -_gcc=-Wno-unused-label
103 103 CERRWARN += -_gcc=-Wno-char-subscripts
104 104 CERRWARN += -_gcc=-Wno-clobbered
105 105 CERRWARN += -_gcc=-Wno-unused-variable
106 106 CERRWARN += -_gcc=-Wno-parentheses
107 107
108 108 MAPFILE = mapfile
109 109 MAPFILE_INTERMEDIATE = $(MAPFILE).i
110 110 MAPFILE_TEMPLATE = ../../../common/kmdb/mapfile_skel
111 111 MAPFILE_SOURCES_COMMON = \
112 112 ../../../common/kmdb/kmdb_dpi.h \
113 113 ../../../common/kmdb/kmdb_kctl.h \
114 114 ../../../common/kmdb/kmdb_kdi.h \
115 115 ../../../common/kmdb/kmdb_wr.h \
116 116 ../../../common/mdb/mdb_ctf.h \
117 117 ../../../common/mdb/mdb_ks.h \
118 118 ../../../common/mdb/mdb_modapi.h \
119 119 ../../../common/mdb/mdb_param.h \
120 120 ../../../common/mdb/mdb_whatis.h
121 121
122 122 mdb_lex.o mdb_grammar.o := CCVERBOSE =
123 123
124 124 kmdb_ctf_open.o kmdb_ctf_open.ln := CPPFLAGS += -I$(SRC)/common/ctf
125 125
126 126 PROMTGTS = $(PROMOBJS) $(PROMOBJS:%.o=%.ln)
127 127 VERSTGTS = $(VERSOBJS) $(VERSOBJS:%.o=%.ln)
128 128 KCTLTGTS = $(KCTLOBJS) $(KCTLOBJS:%.o=%.ln)
129 129
130 130 $(PROMTGTS) := CPPFLAGS += -D_BOOT -D_KERNEL -D_MACHDEP $(PROMINCDIRS:%=-I%) \
131 131 -Dassfail=kmdb_prom_assfail
132 132
133 133 $(VERSTGTS) := CPPFLAGS += -DKMDB_VERSION='$(KMDB_VERSION)'
134 134
135 135 $(KCTLTGTS) := CPPFLAGS += -D_KERNEL
136 136 $(KCTLTGTS) := ASFLAGS += -D_KERNEL
137 137
138 138 ffs.o ffs.ln := CPPFLAGS += -Dffs=mdb_ffs
139 139
140 140 $(ROOTMISC) $(ROOTMISC64) := FILEMODE = 0755
141 141
142 142 include ../../../Makefile.kmdb.targ
↓ open down ↓ |
31 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX