Print this page
11528 Makefile.noget can get gone
11529 Use -Wno-maybe-initialized
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/lib/libdisasm/Makefile.com
+++ new/usr/src/lib/libdisasm/Makefile.com
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 2007 Sun Microsystems, Inc. All rights reserved.
23 23 # Use is subject to license terms.
24 24 # Copyright 2012 Joshua M. Clulow <josh@sysmgr.org>
25 25 # Copyright 2015 Nexenta Systems, Inc. All rights reserved.
26 26 # Copyright (c) 2018, Joyent, Inc.
27 27 #
28 28
29 29 #
30 30 # The build process for libdisasm is sightly different from that used by other
31 31 # libraries, because libdisasm must be built in two flavors - as a standalone
32 32 # for use by kmdb and as a normal library. We use $(CURTYPE) to indicate the
33 33 # current flavor being built.
34 34 #
35 35
36 36 LIBRARY= libdisasm.a
37 37 STANDLIBRARY= libstanddisasm.so
38 38 VERS= .1
39 39
40 40 # By default, we build the shared library. Construction of the standalone
41 41 # is specifically requested by architecture-specific Makefiles.
42 42 TYPES= library
43 43 CURTYPE= library
44 44
45 45 COMDIR= $(SRC)/lib/libdisasm/common
46 46
47 47 #
48 48 # Architecture-independent files
49 49 #
50 50 SRCS_common= $(COMDIR)/libdisasm.c
51 51 OBJECTS_common= libdisasm.o
52 52
53 53 #
54 54 # Architecture-dependent disassembly files
55 55 #
56 56 SRCS_i386= $(COMDIR)/dis_i386.c \
57 57 $(SRC)/common/dis/i386/dis_tables.c
58 58 SRCS_sparc= $(COMDIR)/dis_sparc.c \
59 59 $(COMDIR)/dis_sparc_fmt.c \
60 60 $(COMDIR)/dis_sparc_instr.c
61 61 SRCS_s390x= $(COMDIR)/dis_s390x.c
62 62 SRCS_riscv= $(COMDIR)/dis_riscv.c
63 63
64 64 OBJECTS_i386= dis_i386.o \
65 65 dis_tables.o
66 66 OBJECTS_sparc= dis_sparc.o \
67 67 dis_sparc_fmt.o \
68 68 dis_sparc_instr.o
69 69 OBJECTS_s390x= dis_s390x.o
70 70 OBJECTS_riscv= dis_riscv.o
71 71
72 72 #
73 73 # We build the regular shared library with support for all architectures.
74 74 # The standalone version should only contain code for the native
75 75 # architecture to reduce the memory footprint of kmdb.
76 76 #
77 77 OBJECTS_library= $(OBJECTS_common) \
78 78 $(OBJECTS_i386) \
79 79 $(OBJECTS_sparc) \
80 80 $(OBJECTS_s390x) \
81 81 $(OBJECTS_riscv)
82 82 OBJECTS_standalone= $(OBJECTS_common) \
83 83 $(OBJECTS_$(MACH))
84 84 OBJECTS= $(OBJECTS_$(CURTYPE))
85 85
86 86 include $(SRC)/lib/Makefile.lib
87 87
88 88 SRCS_library= $(SRCS_common) \
89 89 $(SRCS_i386) \
90 90 $(SRCS_sparc) \
91 91 $(SRCS_s390x) \
92 92 $(SRCS_riscv)
93 93 SRCS_standalone= $(SRCS_common) \
94 94 $(SRCS_$(MACH))
95 95 SRCS= $(SRCS_$(CURTYPE))
96 96
97 97 #
98 98 # Used to verify that the standalone doesn't have any unexpected external
99 99 # dependencies.
100 100 #
101 101 LINKTEST_OBJ = objs/linktest_stand.o
102 102
103 103 CLOBBERFILES_standalone = $(LINKTEST_OBJ)
104 104 CLOBBERFILES += $(CLOBBERFILES_$(CURTYPE))
105 105
106 106 LIBS_standalone = $(STANDLIBRARY)
107 107 LIBS_library = $(DYNLIB) $(LINTLIB)
108 108 LIBS = $(LIBS_$(CURTYPE))
109 109
110 110 MAPFILES = $(COMDIR)/mapfile-vers
111 111
112 112 LDLIBS += -lc
113 113
↓ open down ↓ |
113 lines elided |
↑ open up ↑ |
114 114 LDFLAGS_standalone = $(ZNOVERSION) $(BREDUCE) -dy -r
115 115 LDFLAGS = $(LDFLAGS_$(CURTYPE))
116 116
117 117 ASFLAGS_standalone = -DDIS_STANDALONE
118 118 ASFLAGS_library =
119 119 ASFLAGS += -P $(ASFLAGS_$(CURTYPE)) -D_ASM
120 120
121 121 $(LINTLIB) := SRCS = $(COMDIR)/$(LINTSRC)
122 122
123 123 CERRWARN += -_gcc=-Wno-parentheses
124 -CERRWARN += -_gcc=-Wno-uninitialized
124 +CERRWARN += $(CNOWARN_UNINIT)
125 125
126 126 # not linted
127 127 SMATCH=off
128 128
129 129 # We want the thread-specific errno in the library, but we don't want it in
130 130 # the standalone. $(DTS_ERRNO) is designed to add -D_TS_ERRNO to $(CPPFLAGS),
131 131 # in order to enable this feature. Conveniently, -D_REENTRANT does the same
132 132 # thing. As such, we null out $(DTS_ERRNO) to ensure that the standalone
133 133 # doesn't get it.
134 134 DTS_ERRNO=
135 135
136 136 CPPFLAGS_standalone = -DDIS_STANDALONE -I$(SRC)/cmd/mdb/common
137 137 CPPFLAGS_library = -D_REENTRANT
138 138 CPPFLAGS += -I$(COMDIR) $(CPPFLAGS_$(CURTYPE))
139 139
140 140 # For the x86 disassembler we have to include sources from usr/src/common
141 141 CPPFLAGS += -I$(SRC)/common/dis/i386 -DDIS_TEXT
142 142
143 143 CFLAGS_standalone = $(STAND_FLAGS_32)
144 144 CFLAGS_common =
145 145 CFLAGS += $(CFLAGS_$(CURTYPE)) $(CFLAGS_common)
146 146
147 147 CFLAGS64_standalone = $(STAND_FLAGS_64)
148 148 CFLAGS64 += $(CCVERBOSE) $(CFLAGS64_$(CURTYPE)) $(CFLAGS64_common)
149 149
150 150 CSTD = $(CSTD_GNU99)
151 151
152 152 DYNFLAGS += $(ZINTERPOSE)
153 153
154 154 .KEEP_STATE:
↓ open down ↓ |
20 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX