Print this page
8516 Suppress gcc errors with -Wno- in Makefile for usr/src/cmd
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/sgs/libld/Makefile.com
+++ new/usr/src/cmd/sgs/libld/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 #
↓ open down ↓ |
12 lines elided |
↑ open up ↑ |
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 #
23 +# Copyright 2017 Gary Mills
23 24 # Copyright 2010 Sun Microsystems, Inc. All rights reserved.
24 25 # Use is subject to license terms.
25 26 #
26 27
27 28 LIBRARY = libld.a
28 29 VERS = .4
29 30
30 31 COMOBJS = debug.o globals.o util.o
31 32
32 33 COMOBJS32 = args32.o entry32.o exit32.o groups32.o \
33 34 ldentry32.o ldlibs32.o ldmachdep32.o ldmain32.o \
34 35 libs32.o files32.o map32.o map_core32.o \
35 36 map_support32.o map_v232.o order32.o outfile32.o \
36 37 place32.o relocate32.o resolve32.o sections32.o \
37 38 sunwmove32.o support32.o syms32.o update32.o \
38 39 unwind32.o version32.o wrap32.o
39 40
40 41 COMOBJS64 = args64.o entry64.o exit64.o groups64.o \
41 42 ldentry64.o ldlibs64.o ldmachdep64.o ldmain64.o \
42 43 libs64.o files64.o map64.o map_core64.o \
43 44 map_support64.o map_v264.o order64.o outfile64.o \
44 45 place64.o relocate64.o resolve64.o sections64.o \
45 46 sunwmove64.o support64.o syms64.o update64.o \
46 47 unwind64.o version64.o wrap64.o
47 48
48 49 TOOLOBJS = alist.o assfail.o findprime.o string_table.o \
49 50 strhash.o
50 51 AVLOBJ = avl.o
51 52
52 53 # Relocation engine objects. These are kept separate from the L_XXX_MACHOBJS
53 54 # lists below in order to facilitate linting them.
54 55 G_MACHOBJS32 = doreloc_sparc_32.o doreloc_x86_32.o
55 56 G_MACHOBJS64 = doreloc_sparc_64.o doreloc_x86_64.o
56 57
57 58 # Target specific objects (sparc/sparcv9)
58 59 L_SPARC_MACHOBJS32 = machrel.sparc32.o machsym.sparc32.o
59 60 L_SPARC_MACHOBJS64 = machrel.sparc64.o machsym.sparc64.o
60 61
61 62 # Target specific objects (i386/amd64)
62 63 E_X86_TOOLOBJS = leb128.o
63 64 L_X86_MACHOBJS32 = machrel.intel32.o
64 65 L_X86_MACHOBJS64 = machrel.amd64.o
65 66
66 67
67 68 # All target specific objects rolled together
68 69 E_TOOLOBJS = $(E_SPARC_TOOLOBJS) \
69 70 $(E_X86_TOOLOBJS)
70 71 L_MACHOBJS32 = $(L_SPARC_MACHOBJS32) \
71 72 $(L_X86_MACHOBJS32)
72 73 L_MACHOBJS64 = $(L_SPARC_MACHOBJS64) \
73 74 $(L_X86_MACHOBJS64)
74 75
75 76
76 77
77 78 BLTOBJ = msg.o
78 79 ELFCAPOBJ = elfcap.o
79 80
80 81 OBJECTS = $(BLTOBJ) $(G_MACHOBJS32) $(G_MACHOBJS64) \
81 82 $(L_MACHOBJS32) $(L_MACHOBJS64) \
82 83 $(COMOBJS) $(COMOBJS32) $(COMOBJS64) \
83 84 $(TOOLOBJS) $(E_TOOLOBJS) $(AVLOBJ) $(ELFCAPOBJ)
84 85
85 86 include $(SRC)/lib/Makefile.lib
86 87 include $(SRC)/cmd/sgs/Makefile.com
↓ open down ↓ |
54 lines elided |
↑ open up ↑ |
87 88
88 89 SRCDIR = ../common
89 90
90 91 CERRWARN += -_gcc=-Wno-unused-value
91 92 CERRWARN += -_gcc=-Wno-parentheses
92 93 CERRWARN += -_gcc=-Wno-uninitialized
93 94 CERRWARN += -_gcc=-Wno-switch
94 95 CERRWARN += -_gcc=-Wno-char-subscripts
95 96 CERRWARN += -_gcc=-Wno-type-limits
96 97
98 +# Suppress the error for: _vdp
99 +pics/version32.o pics/version64.o := \
100 + CERRWARN += -_gcc=-Wno-unused-but-set-variable
101 +
97 102 # Location of the shared relocation engines maintained under usr/src/uts.
98 103 #
99 104 KRTLD_I386 = $(SRCBASE)/uts/$(VAR_PLAT_i386)/krtld
100 105 KRTLD_AMD64 = $(SRCBASE)/uts/$(VAR_PLAT_amd64)/krtld
101 106 KRTLD_SPARC = $(SRCBASE)/uts/$(VAR_PLAT_sparc)/krtld
102 107
103 108
104 109 CPPFLAGS += -DUSE_LIBLD_MALLOC -I$(SRCBASE)/lib/libc/inc \
105 110 -I$(SRCBASE)/uts/common/krtld -I$(SRCBASE)/uts/sparc \
106 111 $(VAR_LIBLD_CPPFLAGS)
107 112 LDLIBS += $(CONVLIBDIR) $(CONV_LIB) $(LDDBGLIBDIR) $(LDDBG_LIB) \
108 113 $(ELFLIBDIR) -lelf $(DLLIB) -lc
109 114
110 115 LINTFLAGS += -u -D_REENTRANT
111 116 LINTFLAGS64 += -u -D_REENTRANT
112 117
113 118 DYNFLAGS += $(VERSREF) $(CC_USE_PROTO) '-R$$ORIGIN'
114 119
115 120 native:= DYNFLAGS += $(CONVLIBDIR)
116 121
117 122 BLTDEFS = msg.h
118 123 BLTDATA = msg.c
119 124 BLTMESG = $(SGSMSGDIR)/libld
120 125
121 126 BLTFILES = $(BLTDEFS) $(BLTDATA) $(BLTMESG)
122 127
123 128 # Due to cross linking support, every copy of libld contains every message.
124 129 # However, we keep target specific messages in their own separate files for
125 130 # organizational reasons.
126 131 #
127 132 SGSMSGCOM = ../common/libld.msg
128 133 SGSMSGSPARC = ../common/libld.sparc.msg
129 134 SGSMSGINTEL = ../common/libld.intel.msg
130 135 SGSMSGTARG = $(SGSMSGCOM) $(SGSMSGSPARC) $(SGSMSGINTEL)
131 136 SGSMSGALL = $(SGSMSGCOM) $(SGSMSGSPARC) $(SGSMSGINTEL)
132 137
133 138 SGSMSGFLAGS1 = $(SGSMSGFLAGS) -m $(BLTMESG)
134 139 SGSMSGFLAGS2 = $(SGSMSGFLAGS) -h $(BLTDEFS) -d $(BLTDATA) -n libld_msg
135 140
136 141 CHKSRCS = $(SRCBASE)/uts/common/krtld/reloc.h \
137 142 $(COMOBJS32:%32.o=../common/%.c) \
138 143 $(L_MACHOBJS32:%32.o=../common/%.c) \
139 144 $(L_MACHOBJS64:%64.o=../common/%.c) \
140 145 $(KRTLD_I386)/doreloc.c \
141 146 $(KRTLD_AMD64)/doreloc.c \
142 147 $(KRTLD_SPARC)/doreloc.c
143 148
144 149 SRCS = ../common/llib-lld
145 150 LIBSRCS = $(TOOLOBJS:%.o=$(SGSTOOLS)/common/%.c) \
146 151 $(E_TOOLOBJS:%.o=$(SGSTOOLS)/common/%.c) \
147 152 $(COMOBJS:%.o=../common/%.c) \
148 153 $(AVLOBJS:%.o=$(VAR_AVLDIR)/%.c) \
149 154 $(BLTDATA)
150 155
151 156 LINTSRCS = $(LIBSRCS) ../common/lintsup.c
152 157 LINTSRCS32 = $(COMOBJS32:%32.o=../common/%.c) \
153 158 $(L_MACHOBJS32:%32.o=../common/%.c)
154 159 LINTSRCS64 = $(COMOBJS64:%64.o=../common/%.c) \
155 160 $(L_MACHOBJS64:%64.o=../common/%.c)
156 161
157 162 # Add the shared relocation engine source files to the lint
158 163 # sources and add the necessary command line options to lint them
159 164 # correctly. Make can't derive the files since the source and object
160 165 # names are not directly related
161 166 $(LINTOUT32) := CPPFLAGS += -DDO_RELOC_LIBLD
162 167 $(LINTOUT64) := CPPFLAGS += -DDO_RELOC_LIBLD -D_ELF64
163 168 $(LINTLIB32) := CPPFLAGS += -DDO_RELOC_LIBLD
164 169 $(LINTLIB64) := CPPFLAGS += -DDO_RELOC_LIBLD -D_ELF64
165 170 LINTSRCS32 += $(KRTLD_I386)/doreloc.c \
166 171 $(KRTLD_SPARC)/doreloc.c
167 172 LINTSRCS64 += $(KRTLD_AMD64)/doreloc.c \
168 173 $(KRTLD_SPARC)/doreloc.c
169 174
170 175 CLEANFILES += $(LINTOUTS) $(BLTFILES)
171 176 CLOBBERFILES += $(DYNLIB) $(LINTLIBS) $(LIBLINKS)
172 177
173 178 ROOTFS_DYNLIB = $(DYNLIB:%=$(ROOTFS_LIBDIR)/%)
↓ open down ↓ |
67 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX