Print this page
10080 smatch Makefile changes for usr/src/cmd
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/sgs/rtld/Makefile.com
+++ new/usr/src/cmd/sgs/rtld/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.
↓ open down ↓ |
14 lines elided |
↑ open up ↑ |
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 23 # Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
24 24 #
25 +# Copyright (c) 2018, Joyent, Inc.
25 26
26 27 RTLD= ld.so.1
27 28
28 29 AVLOBJ= avl.o
29 30 DTROBJ= dtrace_data.o
30 31 TOOLOBJS= alist.o strhash.o
31 32 BLTOBJ= msg.o
32 33 ELFCAPOBJ= elfcap.o
33 34 OBJECTS= $(BLTOBJ) \
34 35 $(AVLOBJ) \
35 36 $(DTROBJ) \
36 37 $(TOOLOBJS) \
37 38 $(ELFCAPOBJ) \
38 39 $(P_ASOBJS) $(P_COMOBJS) $(P_MACHOBJS) $(G_MACHOBJS) \
39 40 $(S_ASOBJS) $(S_COMOBJS) $(S_MACHOBJS) $(CP_MACHOBJS)
40 41
41 42 COMOBJS= $(P_COMOBJS) $(S_COMOBJS)
42 43 ASOBJS= $(P_ASOBJS) $(S_ASOBJS)
43 44 MACHOBJS= $(P_MACHOBJS) $(S_MACHOBJS)
44 45 NOCTFOBJS= $(ASOBJS)
45 46
46 47 include $(SRC)/lib/Makefile.lib
47 48 include $(SRC)/cmd/sgs/Makefile.com
48 49
49 50 SRCDIR = ../common
50 51 ELFCAP = $(SRC)/common/elfcap
51 52 PLAT = $(VAR_PLAT_$(BASEPLAT))
52 53
53 54 # DTrace needs an executable data segment.
54 55 MAPFILE.NED=
55 56
56 57 MAPFILES += $(MAPFILE-ORDER)
57 58
58 59 # For the libc/libthread unified world:
59 60 # This library needs to be placed in /lib to allow
60 61 # dlopen() functionality while in single-user mode.
61 62 ROOTFS_DYNLIB= $(RTLD:%=$(ROOTFS_LIBDIR)/%)
62 63 ROOTFS_DYNLIB64= $(RTLD:%=$(ROOTFS_LIBDIR64)/%)
63 64
64 65 # For the libc/libthread separated world:
65 66 # A version of this library needs to be placed in /etc/lib to allow
66 67 # dlopen() functionality while in single-user mode.
67 68 ETCLIBDIR= $(ROOT)/etc/lib
68 69 ETCDYNLIB= $(RTLD:%=$(ETCLIBDIR)/%)
69 70
70 71 ROOTDYNLIB= $(RTLD:%=$(ROOTFS_LIBDIR)/%)
71 72 ROOTDYNLIB64= $(RTLD:%=$(ROOTFS_LIBDIR64)/%)
72 73
73 74
74 75 FILEMODE = 755
75 76
76 77 CPPFLAGS += -I$(SRCBASE)/lib/libc/inc \
77 78 -I$(SRCBASE)/uts/common/krtld \
78 79 -I$(SRCBASE)/uts/$(PLAT) \
79 80 -I$(SRCBASE)/uts/$(PLAT)/krtld \
80 81 -I$(SRC)/common/sgsrtcid \
81 82 -I$(ELFCAP) \
↓ open down ↓ |
47 lines elided |
↑ open up ↑ |
82 83 $(CPPFEATUREMACROS)
83 84
84 85 ASFLAGS= -P -D_ASM $(CPPFLAGS)
85 86 LDLIB = -L ../../libld/$(MACH)
86 87 RTLDLIB = -L ../../librtld/$(MACH)
87 88
88 89 CERRWARN += -_gcc=-Wno-uninitialized
89 90 CERRWARN += -_gcc=-Wno-unused-variable
90 91 CERRWARN += -_gcc=-Wno-switch
91 92
93 +# not linted
94 +SMATCH=off
95 +
92 96 # These definitions require that libc be built in the same workspace
93 97 # as the run-time linker and before the run-time linker is built.
94 98 # This is required for the system's self-consistency in any case.
95 99 CPICLIB = $(VAR_RTLD_CPICLIB)
96 100 CPICLIB64 = $(VAR_RTLD_CPICLIB64)
97 101 CLIB = -lc_pic
98 102
99 103 LDLIBS += $(CONVLIBDIR) $(CONV_LIB) \
100 104 $(CPICLIB) $(CLIB) \
101 105 $(LDDBGLIBDIR) $(LDDBG_LIB) \
102 106 $(RTLDLIB) -lrtld \
103 - $(LDLIB) $(LD_LIB)
107 + $(LDLIB) $(LD_LIB)
104 108
105 109 DYNFLAGS += -i -e _rt_boot $(VERSREF) $(ZNODLOPEN) \
106 110 $(ZINTERPOSE) -zdtrace=dtrace_data '-R$$ORIGIN'
107 111
108 112 BUILD.s= $(AS) $(ASFLAGS) $< -o $@
109 113
110 114 BLTDEFS= msg.h
111 115 BLTDATA= msg.c
112 116 BLTMESG= $(SGSMSGDIR)/rtld
113 117
114 118 BLTFILES= $(BLTDEFS) $(BLTDATA) $(BLTMESG)
115 119
116 120 SGSMSGCOM= ../common/rtld.msg
117 121 SGSMSG32= ../common/rtld.32.msg
118 122 SGSMSG64= ../common/rtld.64.msg
119 123 SGSMSGSPARC= ../common/rtld.sparc.msg
120 124 SGSMSGSPARC32= ../common/rtld.sparc32.msg
121 125 SGSMSGSPARC64= ../common/rtld.sparc64.msg
122 126 SGSMSGINTEL= ../common/rtld.intel.msg
123 127 SGSMSGINTEL32= ../common/rtld.intel32.msg
124 128 SGSMSGINTEL64= ../common/rtld.intel64.msg
125 129 SGSMSGCHK= ../common/rtld.chk.msg
126 130 SGSMSGTARG= $(SGSMSGCOM)
127 131 SGSMSGALL= $(SGSMSGCOM) $(SGSMSG32) $(SGSMSG64) \
128 132 $(SGSMSGSPARC) $(SGSMSGSPARC32) $(SGSMSGSPARC64) \
129 133 $(SGSMSGINTEL) $(SGSMSGINTEL32) $(SGSMSGINTEL64)
130 134
131 135 SGSMSGFLAGS1= $(SGSMSGFLAGS) -m $(BLTMESG)
132 136 SGSMSGFLAGS2= $(SGSMSGFLAGS) -h $(BLTDEFS) -d $(BLTDATA) -n rtld_msg
133 137
134 138 SRCS= $(AVLOBJ:%.o=$(VAR_AVLDIR)/%.c) \
135 139 $(DTROBJ:%.o=$(VAR_DTRDIR)/%.c) \
136 140 $(TOOLOBJS:%.o=$(SGSTOOLS)/common/%.c) \
137 141 $(COMOBJS:%.o=../common/%.c) $(MACHOBJS:%.o=%.c) $(BLTDATA) \
138 142 $(G_MACHOBJS:%.o=$(SRCBASE)/uts/$(PLAT)/krtld/%.c) \
139 143 $(CP_MACHOBJS:%.o=../$(MACH)/%.c) \
140 144 $(ASOBJS:%.o=%.s)
141 145 LINTSRCS= $(SRCS) ../common/lintsup.c
142 146
143 147 LINTFLAGS += -u -Dsun -D_REENTRANT -erroff=E_EMPTY_TRANSLATION_UNIT \
144 148 -erroff=E_NAME_DECL_NOT_USED_DEF2
145 149 LINTFLAGS64 += -u -D_REENTRANT -erroff=E_CAST_INT_TO_SMALL_INT \
146 150 -erroff=E_NAME_DECL_NOT_USED_DEF2
147 151
148 152 CLEANFILES += $(LINTOUTS) $(CRTS) $(BLTFILES)
149 153 CLOBBERFILES += $(RTLD)
↓ open down ↓ |
36 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX