Print this page
10593 illumos build should not use kernel modules as link-editor input
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/sun4u/genunix/Makefile
+++ new/usr/src/uts/sun4u/genunix/Makefile
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 #
23 23 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 24 # Use is subject to license terms.
25 25 #
26 26
27 27 #
28 28 # This makefile drives the production of the generic
29 29 # unix kernel module.
30 30 #
31 31 # sparc implementation architecture dependent
32 32 #
33 33
34 34 #
35 35 # Path to the base of the uts directory tree (usually /usr/src/uts).
36 36 #
37 37 UTSBASE = ../..
38 38
39 39 #
40 40 # Define the module and object file sets.
41 41 #
42 42 MODULE = genunix
43 43 GENUNIX = $(OBJS_DIR)/$(MODULE)
44 44
45 45 OBJECTS = $(GENUNIX_OBJS:%=$(OBJS_DIR)/%) \
46 46 $(NOT_YET_KMODS:%=$(OBJS_DIR)/%)
47 47
48 48 LINTS = $(GENUNIX_OBJS:%.o=$(LINTS_DIR)/%.ln) \
49 49 $(NOT_YET_KMODS:%.o=$(LINTS_DIR)/%.ln)
50 50
51 51 ROOTMODULE = $(ROOT_PSM_KERN_DIR)/$(MODULE)
52 52
53 53 PLATFORM = sun4u
54 54 LIBGEN = $(OBJS_DIR)/libgenunix.so
55 55 LIBSTUBS = $(GENSTUBS_OBJS:%=$(OBJS_DIR)/%)
56 56
57 57 #
58 58 # Include common rules.
59 59 #
60 60 include $(UTSBASE)/sparc/Makefile.sparc
61 61
62 62 #
63 63 # Define targets
64 64 #
65 65 ALL_TARGET = $(LIBGEN) $(GENUNIX)
66 66 LINT_TARGET = $(MODULE).lint
67 67 INSTALL_TARGET = $(LIBGEN) $(GENUNIX) $(ROOTMODULE)
68 68
69 69 #
70 70 # Override defaults
71 71 #
72 72 CLEANFILES += $(LIBSTUBS) $(LIBGEN)
73 73
74 74 LINT_LIB_DIR = $(UTSBASE)/$(PLATFORM)/lint-libs/$(OBJS_DIR)
75 75 LINT_LIB = $(LINT_LIB_DIR)/llib-lunix.ln
76 76 GEN_LINT_LIB =
77 77
78 78 BINARY =
79 79
80 80 CLOBBERFILES += $(GENUNIX)
81 81
↓ open down ↓ |
81 lines elided |
↑ open up ↑ |
82 82 #
83 83 # Non-patch genunix builds merge a version of the ip module called ipctf. This
84 84 # is to ensure that the common network-related types are included in genunix and
85 85 # can thus be uniquified out of other modules. We don't want to do this for
86 86 # patch builds, since we can't guarantee that ip and genunix will be in the same
87 87 # patch.
88 88 #
89 89 IPCTF_TARGET = $(IPCTF)
90 90 $(PATCH_BUILD)IPCTF_TARGET =
91 91
92 -#
93 -# lint pass one enforcement
94 -#
92 +#
93 +# lint pass one enforcement
94 +#
95 95 CFLAGS += $(CCVERBOSE)
96 96 CPPFLAGS += -I$(SRC)/common
97 97 CPPFLAGS += -I$(SRC)/uts/common/fs/zfs
98 98
99 99 INC_PATH += -I$(UTSBASE)/sun4
100 100
101 101 #
102 102 # For now, disable these lint checks; maintainers should endeavor
103 103 # to investigate and remove these for maximum lint coverage.
104 104 # Please do not carry these forward to new Makefiles.
105 105 #
106 106 LINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON
107 107 LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
108 108 LINTTAGS += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
109 109 LINTTAGS += -erroff=E_STATIC_UNUSED
110 110 LINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
111 111 LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
112 112
113 113 CERRWARN += -_gcc=-Wno-unused-label
114 114 CERRWARN += -_gcc=-Wno-unused-variable
115 115 CERRWARN += -_gcc=-Wno-unused-value
116 116 CERRWARN += -_gcc=-Wno-unused-function
117 117 CERRWARN += -_gcc=-Wno-parentheses
118 118 CERRWARN += -_gcc=-Wno-switch
119 119 CERRWARN += -_gcc=-Wno-type-limits
120 120 CERRWARN += -_gcc=-Wno-uninitialized
121 121 CERRWARN += -_gcc=-Wno-clobbered
122 122 CERRWARN += -_gcc=-Wno-empty-body
123 123
124 124 #
125 125 # Ensure that lint sees 'struct cpu' containing a fully declared
126 126 # embedded 'struct machcpu'
127 127 #
128 128 LINTFLAGS += -D_MACHDEP -I../../sun4 -I../../$(PLATFORM) -I../../sfmmu
129 129
130 130 # Default build targets.
131 131 #
132 132 .KEEP_STATE:
133 133
134 134 .PARALLEL: $(LIBSTUBS)
135 135
136 136 def: $(DEF_DEPS)
137 137
138 138 all: $(ALL_DEPS)
139 139
↓ open down ↓ |
35 lines elided |
↑ open up ↑ |
140 140 clean: $(CLEAN_DEPS)
141 141
142 142 clobber: $(CLOBBER_DEPS)
143 143
144 144 lint: $(LINT_DEPS)
145 145
146 146 modlintlib: $(MODLINTLIB_DEPS)
147 147
148 148 clean.lint: $(CLEAN_LINT_DEPS)
149 149
150 -install: $(INSTALL_DEPS)
150 +install: $(INSTALL_DEPS)
151 151
152 152 install_h:
153 153
154 154
155 -$(LIBGEN): $(GENUNIX) $(LIBSTUBS)
156 - $(BUILD.SO) $(GENUNIX) $(LIBSTUBS)
155 +$(LIBGEN): $(OBJECTS) $(LIBSTUBS)
156 + $(BUILD.SO) $(OBJECTS) $(LIBSTUBS)
157 157
158 158 $(IPCTF_TARGET) ipctf_target: FRC
159 159 @cd $(IPDRV_DIR); pwd; $(MAKE) ipctf.$(OBJS_DIR)
160 160 @pwd
161 161
162 162 $(GENUNIX): $(IPCTF_TARGET) $(OBJECTS)
163 163 $(LD) -r $(LDFLAGS) -o $@ $(OBJECTS)
164 164 $(CTFMERGE_GENUNIX_MERGE)
165 165 $(POST_PROCESS)
166 166
167 167 $(OBJECTS): $(OBJS_DIR)
168 168
169 169 #
170 170 # Include common targets.
171 171 #
172 172 include $(UTSBASE)/sparc/Makefile.targ
173 173
174 174 #
175 175 # Include sun4u workarounds.
176 176 #
177 177 include $(UTSBASE)/sun4u/Makefile.workarounds
178 178
179 179 ALL_DEFS += $(WORKAROUND_DEFS)
↓ open down ↓ |
13 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX