Print this page
11528 Makefile.noget can get gone
11529 Use -Wno-maybe-initialized
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/lib/brand/solaris10/s10_brand/Makefile.com
+++ new/usr/src/lib/brand/solaris10/s10_brand/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 (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
23 23 # Copyright (c) 2016 by Delphix. All rights reserved.
24 24 #
25 25
26 26 LIBRARY = s10_brand.a
27 27 VERS = .1
28 28 COBJS = s10_brand.o s10_deleted.o s10_signal.o
29 29 ASOBJS = crt.o handler.o runexe.o brand_util.o
30 30 OBJECTS = $(COBJS)
31 31
32 32 include ../../Makefile.s10
33 33 include $(SRC)/lib/Makefile.lib
34 34
35 35 SRCDIR = ../common
36 36 UTSBASE = $(SRC)/uts
37 37
38 38 LIBS = $(DYNLIB)
39 39 CSRCS = $(COBJS:%o=../common/%c)
40 40 SHAREDOBJS = $(ASOBJS:%o=$(ISAOBJDIR)/%o)
41 41 SRCS = $(CSRCS)
42 42
43 43 #
44 44 # Note that the architecture specific makefiles MUST update DYNFLAGS to
45 45 # explicitly specify an interpreter for the brand emulation library so that we
46 46 # use /lib/ld.so.1 or /lib/64/ld.so.1, which in a s10 zone is the Solaris 10
47 47 # linker. This is different from some other brands where the linker that is
48 48 # used is the native system linker (/.SUNWnative/.../ld.so.1). We have to do
49 49 # this because the linker has a very incestuous relationship with libc and we
50 50 # don't want to use the native linker with the s10 version of libc. (This may
51 51 # come as a surprise to the reader, but when our library is loaded it get's
52 52 # linked against the s10 version of libc.) Although the linker interfaces are
53 53 # normally stable, there are examples, such as with the solaris8 brand, where
54 54 # we could not combine the brand's libc with the native linker. Since we want
55 55 # to run in a known configuration, we use the S10 libc/linker combination.
56 56 #
57 57 # There is one more non-obvious side effect of using the s10 linker that
58 58 # should be mentioned. Since the linker is used to setup processes before
59 59 # libc is loaded, it makes system calls directly (ie avoiding libc), and
60 60 # it makes these system calls before our library has been initialized.
61 61 # Since our library hasn't been initialized yet, there's no way for us
62 62 # to intercept and emulate any of those system calls. So if any of those
63 63 # system calls ever change in the native code such that they break the s10
64 64 # linker then we're kinda screwed and will need to re-visit the current
65 65 # solution. (The likely solution then will probably be to start using the
66 66 # native linker with our brand emulation library.)
67 67 #
68 68 # Note that we make sure to link our brand emulation library
69 69 # libmapmalloc. This is required because in most cases there will be two
70 70 # copies of libc in the same process and we don't want them to fight over
71 71 # the heap. So for our brand library we link against libmapmalloc so that
72 72 # if we (our or copy of libc) try to allocate any memory it will be done
73 73 # via mmap() instead of brk().
74 74 #
75 75 CPPFLAGS += -D_REENTRANT -U_ASM \
76 76 -I. -I$(BRAND_SHARED)/brand/sys -I../sys \
77 77 -I$(UTSBASE)/common/brand/solaris10 \
78 78 -I$(SRC)/uts/common/fs/zfs
↓ open down ↓ |
78 lines elided |
↑ open up ↑ |
79 79 CFLAGS += $(CCVERBOSE)
80 80 # Needed to handle zfs include files
81 81 CSTD= $(CSTD_GNU99)
82 82 C99LMODE= -Xc99=%all
83 83 DYNFLAGS += $(DYNFLAGS_$(CLASS))
84 84 DYNFLAGS += $(BLOCAL) $(ZNOVERSION) -Wl,-e_start
85 85 LDLIBS += -lc -lmapmalloc
86 86 LINTFLAGS += -erroff=E_STATIC_UNUSED
87 87 LINTFLAGS64 += -erroff=E_STATIC_UNUSED
88 88
89 -CERRWARN += -_gcc=-Wno-uninitialized
89 +CERRWARN += $(CNOWARN_UNINIT)
90 90
91 91 $(LIBS):= PICS += $(SHAREDOBJS)
92 92
93 93 .KEEP_STATE:
94 94
95 95 all: $(LIBS)
96 96
97 97 lint: lintcheck
98 98
99 99 include $(SRC)/lib/Makefile.targ
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX