| @@ -1,1134 +1,1134 @@ | | | @@ -1,1134 +1,1134 @@ |
1 | # $NetBSD: bsd.own.mk,v 1.1309 2023/04/02 15:06:06 christos Exp $ | | 1 | # $NetBSD: bsd.own.mk,v 1.1310 2023/04/18 20:11:34 christos Exp $ |
2 | | | 2 | |
3 | # This needs to be before bsd.init.mk | | 3 | # This needs to be before bsd.init.mk |
4 | .if defined(BSD_MK_COMPAT_FILE) | | 4 | .if defined(BSD_MK_COMPAT_FILE) |
5 | .include <${BSD_MK_COMPAT_FILE}> | | 5 | .include <${BSD_MK_COMPAT_FILE}> |
6 | .endif | | 6 | .endif |
7 | | | 7 | |
8 | .if !defined(_BSD_OWN_MK_) | | 8 | .if !defined(_BSD_OWN_MK_) |
9 | _BSD_OWN_MK_=1 | | 9 | _BSD_OWN_MK_=1 |
10 | | | 10 | |
11 | MAKECONF?= /etc/mk.conf | | 11 | MAKECONF?= /etc/mk.conf |
12 | .-include "${MAKECONF}" | | 12 | .-include "${MAKECONF}" |
13 | | | 13 | |
14 | # | | 14 | # |
15 | # CPU model, derived from MACHINE_ARCH | | 15 | # CPU model, derived from MACHINE_ARCH |
16 | # | | 16 | # |
17 | MACHINE_CPU= ${MACHINE_ARCH:C/mips.*e[bl]/mips/:C/sh3e[bl]/sh3/:S/coldfire/m68k/:S/m68000/m68k/:C/e?arm.*/arm/:S/powerpc64/powerpc/:S/aarch64eb/aarch64/:S/or1knd/or1k/:C/riscv../riscv/} | | 17 | MACHINE_CPU= ${MACHINE_ARCH:C/mips.*e[bl]/mips/:C/sh3e[bl]/sh3/:S/coldfire/m68k/:S/m68000/m68k/:C/e?arm.*/arm/:S/powerpc64/powerpc/:S/aarch64eb/aarch64/:S/or1knd/or1k/:C/riscv../riscv/} |
18 | | | 18 | |
19 | .if (${MACHINE_ARCH} == "mips64el" || \ | | 19 | .if (${MACHINE_ARCH} == "mips64el" || \ |
20 | ${MACHINE_ARCH} == "mips64eb" || \ | | 20 | ${MACHINE_ARCH} == "mips64eb" || \ |
21 | ${MACHINE_ARCH} == "mipsn64el" || \ | | 21 | ${MACHINE_ARCH} == "mipsn64el" || \ |
22 | ${MACHINE_ARCH} == "mipsn64eb") | | 22 | ${MACHINE_ARCH} == "mipsn64eb") |
23 | MACHINE_MIPS64= 1 | | 23 | MACHINE_MIPS64= 1 |
24 | .else | | 24 | .else |
25 | MACHINE_MIPS64= 0 | | 25 | MACHINE_MIPS64= 0 |
26 | .endif | | 26 | .endif |
27 | | | 27 | |
28 | # | | 28 | # |
29 | # Subdirectory used below ${RELEASEDIR} when building a release | | 29 | # Subdirectory used below ${RELEASEDIR} when building a release |
30 | # | | 30 | # |
31 | .if ${MACHINE:Mevbarm} || ${MACHINE:Mevbmips} \ | | 31 | .if ${MACHINE:Mevbarm} || ${MACHINE:Mevbmips} \ |
32 | || ${MACHINE:Mevbsh3} | | 32 | || ${MACHINE:Mevbsh3} |
33 | RELEASEMACHINEDIR?= ${MACHINE}-${MACHINE_ARCH} | | 33 | RELEASEMACHINEDIR?= ${MACHINE}-${MACHINE_ARCH} |
34 | .else | | 34 | .else |
35 | RELEASEMACHINEDIR?= ${MACHINE} | | 35 | RELEASEMACHINEDIR?= ${MACHINE} |
36 | .endif | | 36 | .endif |
37 | | | 37 | |
38 | # | | 38 | # |
39 | # Subdirectory or path component used for the following paths: | | 39 | # Subdirectory or path component used for the following paths: |
40 | # distrib/${RELEASEMACHINE} | | 40 | # distrib/${RELEASEMACHINE} |
41 | # distrib/notes/${RELEASEMACHINE} | | 41 | # distrib/notes/${RELEASEMACHINE} |
42 | # etc/etc.${RELEASEMACHINE} | | 42 | # etc/etc.${RELEASEMACHINE} |
43 | # Used when building a release. | | 43 | # Used when building a release. |
44 | # | | 44 | # |
45 | RELEASEMACHINE?= ${MACHINE} | | 45 | RELEASEMACHINE?= ${MACHINE} |
46 | | | 46 | |
47 | # | | 47 | # |
48 | # NEED_OWN_INSTALL_TARGET is set to "no" by pkgsrc/mk/bsd.pkg.mk to | | 48 | # NEED_OWN_INSTALL_TARGET is set to "no" by pkgsrc/mk/bsd.pkg.mk to |
49 | # ensure that things defined by <bsd.own.mk> (default targets, | | 49 | # ensure that things defined by <bsd.own.mk> (default targets, |
50 | # INSTALL_FILE, etc.) are not conflicting with bsd.pkg.mk. | | 50 | # INSTALL_FILE, etc.) are not conflicting with bsd.pkg.mk. |
51 | # | | 51 | # |
52 | NEED_OWN_INSTALL_TARGET?= yes | | 52 | NEED_OWN_INSTALL_TARGET?= yes |
53 | | | 53 | |
54 | # | | 54 | # |
55 | # This lists the platforms which do not have working in-tree toolchains. For | | 55 | # This lists the platforms which do not have working in-tree toolchains. For |
56 | # the in-tree gcc toolchain, this list is empty. | | 56 | # the in-tree gcc toolchain, this list is empty. |
57 | # | | 57 | # |
58 | # If some future port is not supported by the in-tree toolchain, this should | | 58 | # If some future port is not supported by the in-tree toolchain, this should |
59 | # be set to "yes" for that port only. | | 59 | # be set to "yes" for that port only. |
60 | # | | 60 | # |
61 | # .if ${MACHINE} == "playstation2" | | 61 | # .if ${MACHINE} == "playstation2" |
62 | # TOOLCHAIN_MISSING?= yes | | 62 | # TOOLCHAIN_MISSING?= yes |
63 | # .endif | | 63 | # .endif |
64 | | | 64 | |
65 | TOOLCHAIN_MISSING?= no | | 65 | TOOLCHAIN_MISSING?= no |
66 | | | 66 | |
67 | # | | 67 | # |
68 | # GCC Using platforms. | | 68 | # GCC Using platforms. |
69 | # | | 69 | # |
70 | .if ${MKGCC:Uyes} != "no" | | 70 | .if ${MKGCC:Uyes} != "no" |
71 | | | 71 | |
72 | # | | 72 | # |
73 | # What GCC is used? | | 73 | # What GCC is used? |
74 | # | | 74 | # |
75 | HAVE_GCC?= 10 | | 75 | HAVE_GCC?= 10 |
76 | | | 76 | |
77 | # | | 77 | # |
78 | # Platforms that can't run a modern GCC natively | | 78 | # Platforms that can't run a modern GCC natively |
79 | .if ${MACHINE_ARCH} == "m68000" | | 79 | .if ${MACHINE_ARCH} == "m68000" |
80 | MKGCCCMDS?= no | | 80 | MKGCCCMDS?= no |
81 | .endif | | 81 | .endif |
82 | | | 82 | |
83 | # | | 83 | # |
84 | # We import the old gcc as "gcc.old" when upgrading. EXTERNAL_GCC_SUBDIR is | | 84 | # We import the old gcc as "gcc.old" when upgrading. EXTERNAL_GCC_SUBDIR is |
85 | # set to the relevant subdirectory in src/external/gpl3 for his HAVE_GCC. | | 85 | # set to the relevant subdirectory in src/external/gpl3 for his HAVE_GCC. |
86 | # | | 86 | # |
87 | .if ${HAVE_GCC} == 10 | | 87 | .if ${HAVE_GCC} == 10 |
88 | EXTERNAL_GCC_SUBDIR?= gcc.old | | 88 | EXTERNAL_GCC_SUBDIR?= gcc.old |
89 | .elif ${HAVE_GCC} == 11 | | 89 | .elif ${HAVE_GCC} == 11 |
90 | EXTERNAL_GCC_SUBDIR?= gcc | | 90 | EXTERNAL_GCC_SUBDIR?= gcc |
91 | .else | | 91 | .else |
92 | EXTERNAL_GCC_SUBDIR?= /does/not/exist | | 92 | EXTERNAL_GCC_SUBDIR?= /does/not/exist |
93 | .endif | | 93 | .endif |
94 | .else | | 94 | .else |
95 | MKGCCCMDS?= no | | 95 | MKGCCCMDS?= no |
96 | .endif | | 96 | .endif |
97 | | | 97 | |
98 | # | | 98 | # |
99 | # What binutils is used? | | 99 | # What binutils is used? |
100 | # | | 100 | # |
101 | .if ${MACHINE_ARCH} != "mips64el" | | 101 | .if ${MACHINE_ARCH} != "mips64el" |
102 | HAVE_BINUTILS?= 239 | | 102 | HAVE_BINUTILS?= 239 |
103 | .else | | 103 | .else |
104 | HAVE_BINUTILS?= 234 | | 104 | HAVE_BINUTILS?= 234 |
105 | .endif | | 105 | .endif |
106 | | | 106 | |
107 | .if ${HAVE_BINUTILS} == 239 | | 107 | .if ${HAVE_BINUTILS} == 239 |
108 | EXTERNAL_BINUTILS_SUBDIR= binutils | | 108 | EXTERNAL_BINUTILS_SUBDIR= binutils |
109 | .elif ${HAVE_BINUTILS} == 234 | | 109 | .elif ${HAVE_BINUTILS} == 234 |
110 | EXTERNAL_BINUTILS_SUBDIR= binutils.old | | 110 | EXTERNAL_BINUTILS_SUBDIR= binutils.old |
111 | .else | | 111 | .else |
112 | EXTERNAL_BINUTILS_SUBDIR= /does/not/exist | | 112 | EXTERNAL_BINUTILS_SUBDIR= /does/not/exist |
113 | .endif | | 113 | .endif |
114 | | | 114 | |
115 | # | | 115 | # |
116 | # What GDB is used? | | 116 | # What GDB is used? |
117 | # | | 117 | # |
118 | HAVE_GDB?= 1100 | | 118 | HAVE_GDB?= 1100 |
119 | | | 119 | |
120 | .if ${HAVE_GDB} == 1310 | | 120 | .if ${HAVE_GDB} == 1310 |
121 | EXTERNAL_GDB_SUBDIR= gdb | | 121 | EXTERNAL_GDB_SUBDIR= gdb |
122 | .elif ${HAVE_GDB} == 1100 | | 122 | .elif ${HAVE_GDB} == 1100 |
123 | EXTERNAL_GDB_SUBDIR= gdb.old | | 123 | EXTERNAL_GDB_SUBDIR= gdb.old |
124 | .else | | 124 | .else |
125 | EXTERNAL_GDB_SUBDIR= /does/not/exist | | 125 | EXTERNAL_GDB_SUBDIR= /does/not/exist |
126 | .endif | | 126 | .endif |
127 | | | 127 | |
128 | # | | 128 | # |
129 | # What OpenSSL is used? | | 129 | # What OpenSSL is used? |
130 | # | | 130 | # |
131 | HAVE_OPENSSL?= 11 | | 131 | HAVE_OPENSSL?= 11 |
132 | | | 132 | |
133 | .if ${HAVE_OPENSSL} == 11 | | 133 | .if ${HAVE_OPENSSL} == 30 |
134 | EXTERNAL_OPENSSL_SUBDIR=openssl | | 134 | EXTERNAL_OPENSSL_SUBDIR=openssl |
135 | .elif ${HAVE_OPENSSL} == 10 | | 135 | .elif ${HAVE_OPENSSL} == 11 |
136 | EXTERNAL_OPENSSL_SUBDIR=openssl.old | | 136 | EXTERNAL_OPENSSL_SUBDIR=openssl.old |
137 | .else | | 137 | .else |
138 | EXTERNAL_OPENSSL_SUBDIR=/does/not/exist | | 138 | EXTERNAL_OPENSSL_SUBDIR=/does/not/exist |
139 | .endif | | 139 | .endif |
140 | | | 140 | |
141 | # | | 141 | # |
142 | # Does the platform support ACPI? | | 142 | # Does the platform support ACPI? |
143 | # | | 143 | # |
144 | .if ${MACHINE} == "i386" || \ | | 144 | .if ${MACHINE} == "i386" || \ |
145 | ${MACHINE} == "amd64" || \ | | 145 | ${MACHINE} == "amd64" || \ |
146 | ${MACHINE} == "ia64" || \ | | 146 | ${MACHINE} == "ia64" || \ |
147 | ${MACHINE_ARCH:Maarch64*} | | 147 | ${MACHINE_ARCH:Maarch64*} |
148 | HAVE_ACPI= yes | | 148 | HAVE_ACPI= yes |
149 | .else | | 149 | .else |
150 | HAVE_ACPI= no | | 150 | HAVE_ACPI= no |
151 | .endif | | 151 | .endif |
152 | | | 152 | |
153 | # | | 153 | # |
154 | # Does the platform support UEFI? | | 154 | # Does the platform support UEFI? |
155 | # | | 155 | # |
156 | .if ${MACHINE} == "i386" || \ | | 156 | .if ${MACHINE} == "i386" || \ |
157 | ${MACHINE} == "amd64" || \ | | 157 | ${MACHINE} == "amd64" || \ |
158 | ${MACHINE} == "ia64" || \ | | 158 | ${MACHINE} == "ia64" || \ |
159 | ${MACHINE_ARCH:Mearmv7*} || \ | | 159 | ${MACHINE_ARCH:Mearmv7*} || \ |
160 | ${MACHINE_ARCH:Maarch64*} || \ | | 160 | ${MACHINE_ARCH:Maarch64*} || \ |
161 | ${MACHINE_ARCH} == "riscv64" | | 161 | ${MACHINE_ARCH} == "riscv64" |
162 | HAVE_UEFI= yes | | 162 | HAVE_UEFI= yes |
163 | .else | | 163 | .else |
164 | HAVE_UEFI= no | | 164 | HAVE_UEFI= no |
165 | .endif | | 165 | .endif |
166 | | | 166 | |
167 | # | | 167 | # |
168 | # Does the platform support NVMM? | | 168 | # Does the platform support NVMM? |
169 | # | | 169 | # |
170 | .if ${MACHINE_ARCH} == "x86_64" | | 170 | .if ${MACHINE_ARCH} == "x86_64" |
171 | HAVE_NVMM= yes | | 171 | HAVE_NVMM= yes |
172 | .else | | 172 | .else |
173 | HAVE_NVMM= no | | 173 | HAVE_NVMM= no |
174 | .endif | | 174 | .endif |
175 | | | 175 | |
176 | | | 176 | |
177 | .if ${MACHINE_ARCH:Mearm*} | | 177 | .if ${MACHINE_ARCH:Mearm*} |
178 | _LIBC_COMPILER_RT.${MACHINE_ARCH}= yes | | 178 | _LIBC_COMPILER_RT.${MACHINE_ARCH}= yes |
179 | .endif | | 179 | .endif |
180 | | | 180 | |
181 | _LIBC_COMPILER_RT.aarch64= yes | | 181 | _LIBC_COMPILER_RT.aarch64= yes |
182 | _LIBC_COMPILER_RT.aarch64eb= yes | | 182 | _LIBC_COMPILER_RT.aarch64eb= yes |
183 | _LIBC_COMPILER_RT.i386= yes | | 183 | _LIBC_COMPILER_RT.i386= yes |
184 | _LIBC_COMPILER_RT.powerpc= yes | | 184 | _LIBC_COMPILER_RT.powerpc= yes |
185 | _LIBC_COMPILER_RT.powerpc64= yes | | 185 | _LIBC_COMPILER_RT.powerpc64= yes |
186 | _LIBC_COMPILER_RT.sparc= yes | | 186 | _LIBC_COMPILER_RT.sparc= yes |
187 | _LIBC_COMPILER_RT.sparc64= yes | | 187 | _LIBC_COMPILER_RT.sparc64= yes |
188 | _LIBC_COMPILER_RT.x86_64= yes | | 188 | _LIBC_COMPILER_RT.x86_64= yes |
189 | | | 189 | |
190 | .if ${HAVE_LLVM:Uno} == "yes" && ${_LIBC_COMPILER_RT.${MACHINE_ARCH}:Uno} == "yes" | | 190 | .if ${HAVE_LLVM:Uno} == "yes" && ${_LIBC_COMPILER_RT.${MACHINE_ARCH}:Uno} == "yes" |
191 | HAVE_LIBGCC?= no | | 191 | HAVE_LIBGCC?= no |
192 | .else | | 192 | .else |
193 | HAVE_LIBGCC?= yes | | 193 | HAVE_LIBGCC?= yes |
194 | .endif | | 194 | .endif |
195 | | | 195 | |
196 | | | 196 | |
197 | # Should libgcc have unwinding code? | | 197 | # Should libgcc have unwinding code? |
198 | .if ${HAVE_LLVM:Uno} == "yes" || ${MACHINE_ARCH:Mearm*} | | 198 | .if ${HAVE_LLVM:Uno} == "yes" || ${MACHINE_ARCH:Mearm*} |
199 | HAVE_LIBGCC_EH?= no | | 199 | HAVE_LIBGCC_EH?= no |
200 | .else | | 200 | .else |
201 | HAVE_LIBGCC_EH?= yes | | 201 | HAVE_LIBGCC_EH?= yes |
202 | .endif | | 202 | .endif |
203 | | | 203 | |
204 | # Coverity does not like SSP | | 204 | # Coverity does not like SSP |
205 | .if defined(COVERITY_TOP_CONFIG) || \ | | 205 | .if defined(COVERITY_TOP_CONFIG) || \ |
206 | ${MACHINE} == "alpha" || \ | | 206 | ${MACHINE} == "alpha" || \ |
207 | ${MACHINE} == "hppa" || \ | | 207 | ${MACHINE} == "hppa" || \ |
208 | ${MACHINE} == "ia64" || \ | | 208 | ${MACHINE} == "ia64" || \ |
209 | ${MACHINE_CPU} == "mips" | | 209 | ${MACHINE_CPU} == "mips" |
210 | HAVE_SSP?= no | | 210 | HAVE_SSP?= no |
211 | .else | | 211 | .else |
212 | HAVE_SSP?= yes | | 212 | HAVE_SSP?= yes |
213 | .if !defined(NOFORT) && ${USE_FORT:Uno} != "no" | | 213 | .if !defined(NOFORT) && ${USE_FORT:Uno} != "no" |
214 | USE_SSP?= yes | | 214 | USE_SSP?= yes |
215 | .endif | | 215 | .endif |
216 | .endif | | 216 | .endif |
217 | | | 217 | |
218 | # | | 218 | # |
219 | # What version of jemalloc we use (100 is the one | | 219 | # What version of jemalloc we use (100 is the one |
220 | # built-in to libc from 2005 (pre version 3). | | 220 | # built-in to libc from 2005 (pre version 3). |
221 | # | | 221 | # |
222 | .if ${MACHINE_ARCH} == "vax" || ${MACHINE} == "sun2" | | 222 | .if ${MACHINE_ARCH} == "vax" || ${MACHINE} == "sun2" |
223 | HAVE_JEMALLOC?= 100 | | 223 | HAVE_JEMALLOC?= 100 |
224 | .else | | 224 | .else |
225 | HAVE_JEMALLOC?= 510 | | 225 | HAVE_JEMALLOC?= 510 |
226 | .endif | | 226 | .endif |
227 | | | 227 | |
228 | .if empty(.MAKEFLAGS:tW:M*-V .OBJDIR*) | | 228 | .if empty(.MAKEFLAGS:tW:M*-V .OBJDIR*) |
229 | .if defined(MAKEOBJDIRPREFIX) || defined(MAKEOBJDIR) | | 229 | .if defined(MAKEOBJDIRPREFIX) || defined(MAKEOBJDIR) |
230 | PRINTOBJDIR= ${MAKE} -r -V .OBJDIR -f /dev/null xxx | | 230 | PRINTOBJDIR= ${MAKE} -r -V .OBJDIR -f /dev/null xxx |
231 | .else | | 231 | .else |
232 | PRINTOBJDIR= ${MAKE} -V .OBJDIR | | 232 | PRINTOBJDIR= ${MAKE} -V .OBJDIR |
233 | .endif | | 233 | .endif |
234 | .else | | 234 | .else |
235 | PRINTOBJDIR= echo /error/bsd.own.mk/PRINTOBJDIR # avoid infinite recursion | | 235 | PRINTOBJDIR= echo /error/bsd.own.mk/PRINTOBJDIR # avoid infinite recursion |
236 | .endif | | 236 | .endif |
237 | | | 237 | |
238 | # | | 238 | # |
239 | # Determine if running in the NetBSD source tree by checking for the | | 239 | # Determine if running in the NetBSD source tree by checking for the |
240 | # existence of build.sh and tools/ in the current or a parent directory, | | 240 | # existence of build.sh and tools/ in the current or a parent directory, |
241 | # and setting _SRC_TOP_ to the result. | | 241 | # and setting _SRC_TOP_ to the result. |
242 | # | | 242 | # |
243 | .if !defined(_SRC_TOP_) # { | | 243 | .if !defined(_SRC_TOP_) # { |
244 | _SRC_TOP_!= cd "${.CURDIR}"; while :; do \ | | 244 | _SRC_TOP_!= cd "${.CURDIR}"; while :; do \ |
245 | here=$$(pwd); \ | | 245 | here=$$(pwd); \ |
246 | [ -f build.sh ] && [ -d tools ] && { echo $$here; break; }; \ | | 246 | [ -f build.sh ] && [ -d tools ] && { echo $$here; break; }; \ |
247 | case $$here in /) echo ""; break;; esac; \ | | 247 | case $$here in /) echo ""; break;; esac; \ |
248 | cd ..; done | | 248 | cd ..; done |
249 | | | 249 | |
250 | .MAKEOVERRIDES+= _SRC_TOP_ | | 250 | .MAKEOVERRIDES+= _SRC_TOP_ |
251 | | | 251 | |
252 | .endif # } | | 252 | .endif # } |
253 | | | 253 | |
254 | # | | 254 | # |
255 | # If _SRC_TOP_ != "", we're within the NetBSD source tree. | | 255 | # If _SRC_TOP_ != "", we're within the NetBSD source tree. |
256 | # * Set defaults for NETBSDSRCDIR and _SRC_TOP_OBJ_. | | 256 | # * Set defaults for NETBSDSRCDIR and _SRC_TOP_OBJ_. |
257 | # * Define _NETBSD_VERSION_DEPENDS. Targets that depend on the | | 257 | # * Define _NETBSD_VERSION_DEPENDS. Targets that depend on the |
258 | # NetBSD version, or on variables defined at build time, can | | 258 | # NetBSD version, or on variables defined at build time, can |
259 | # declare a dependency on ${_NETBSD_VERSION_DEPENDS}. | | 259 | # declare a dependency on ${_NETBSD_VERSION_DEPENDS}. |
260 | # | | 260 | # |
261 | .if (${_SRC_TOP_} != "") # { | | 261 | .if (${_SRC_TOP_} != "") # { |
262 | | | 262 | |
263 | NETBSDSRCDIR?= ${_SRC_TOP_} | | 263 | NETBSDSRCDIR?= ${_SRC_TOP_} |
264 | | | 264 | |
265 | .if !defined(_SRC_TOP_OBJ_) | | 265 | .if !defined(_SRC_TOP_OBJ_) |
266 | _SRC_TOP_OBJ_!= cd "${_SRC_TOP_}" && ${PRINTOBJDIR} | | 266 | _SRC_TOP_OBJ_!= cd "${_SRC_TOP_}" && ${PRINTOBJDIR} |
267 | .MAKEOVERRIDES+= _SRC_TOP_OBJ_ | | 267 | .MAKEOVERRIDES+= _SRC_TOP_OBJ_ |
268 | .endif | | 268 | .endif |
269 | | | 269 | |
270 | _NETBSD_VERSION_DEPENDS= ${_SRC_TOP_OBJ_}/params | | 270 | _NETBSD_VERSION_DEPENDS= ${_SRC_TOP_OBJ_}/params |
271 | _NETBSD_VERSION_DEPENDS+= ${NETBSDSRCDIR}/sys/sys/param.h | | 271 | _NETBSD_VERSION_DEPENDS+= ${NETBSDSRCDIR}/sys/sys/param.h |
272 | _NETBSD_VERSION_DEPENDS+= ${NETBSDSRCDIR}/sys/conf/newvers.sh | | 272 | _NETBSD_VERSION_DEPENDS+= ${NETBSDSRCDIR}/sys/conf/newvers.sh |
273 | _NETBSD_VERSION_DEPENDS+= ${NETBSDSRCDIR}/sys/conf/osrelease.sh | | 273 | _NETBSD_VERSION_DEPENDS+= ${NETBSDSRCDIR}/sys/conf/osrelease.sh |
274 | ${_SRC_TOP_OBJ_}/params: .NOTMAIN .OPTIONAL # created by top level "make build" | | 274 | ${_SRC_TOP_OBJ_}/params: .NOTMAIN .OPTIONAL # created by top level "make build" |
275 | | | 275 | |
276 | .endif # _SRC_TOP_ != "" # } | | 276 | .endif # _SRC_TOP_ != "" # } |
277 | | | 277 | |
278 | | | 278 | |
279 | .if (${_SRC_TOP_} != "") && \ | | 279 | .if (${_SRC_TOP_} != "") && \ |
280 | (${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN)) | | 280 | (${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN)) |
281 | USETOOLS?= yes | | 281 | USETOOLS?= yes |
282 | .endif | | 282 | .endif |
283 | USETOOLS?= no | | 283 | USETOOLS?= no |
284 | | | 284 | |
285 | | | 285 | |
286 | .if ${MACHINE_ARCH} == "mips" || ${MACHINE_ARCH} == "mips64" || \ | | 286 | .if ${MACHINE_ARCH} == "mips" || ${MACHINE_ARCH} == "mips64" || \ |
287 | ${MACHINE_ARCH} == "sh3" | | 287 | ${MACHINE_ARCH} == "sh3" |
288 | .BEGIN: | | 288 | .BEGIN: |
289 | @echo "Must set MACHINE_ARCH to one of ${MACHINE_ARCH}eb or ${MACHINE_ARCH}el" | | 289 | @echo "Must set MACHINE_ARCH to one of ${MACHINE_ARCH}eb or ${MACHINE_ARCH}el" |
290 | @false | | 290 | @false |
291 | .elif defined(REQUIRETOOLS) && \ | | 291 | .elif defined(REQUIRETOOLS) && \ |
292 | (${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN)) && \ | | 292 | (${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN)) && \ |
293 | ${USETOOLS} == "no" | | 293 | ${USETOOLS} == "no" |
294 | .BEGIN: | | 294 | .BEGIN: |
295 | @echo "USETOOLS=no, but this component requires a version-specific host toolchain" | | 295 | @echo "USETOOLS=no, but this component requires a version-specific host toolchain" |
296 | @false | | 296 | @false |
297 | .endif | | 297 | .endif |
298 | | | 298 | |
299 | # | | 299 | # |
300 | # Host platform information; may be overridden | | 300 | # Host platform information; may be overridden |
301 | # | | 301 | # |
302 | .include <bsd.host.mk> | | 302 | .include <bsd.host.mk> |
303 | | | 303 | |
304 | .if ${USETOOLS} == "yes" # { | | 304 | .if ${USETOOLS} == "yes" # { |
305 | | | 305 | |
306 | # | | 306 | # |
307 | # Provide a default for TOOLDIR. | | 307 | # Provide a default for TOOLDIR. |
308 | # | | 308 | # |
309 | .if !defined(TOOLDIR) | | 309 | .if !defined(TOOLDIR) |
310 | TOOLDIR:= ${_SRC_TOP_OBJ_}/tooldir.${HOST_OSTYPE} | | 310 | TOOLDIR:= ${_SRC_TOP_OBJ_}/tooldir.${HOST_OSTYPE} |
311 | .MAKEOVERRIDES+= TOOLDIR | | 311 | .MAKEOVERRIDES+= TOOLDIR |
312 | .endif | | 312 | .endif |
313 | | | 313 | |
314 | # | | 314 | # |
315 | # This is the prefix used for the NetBSD-sourced tools. | | 315 | # This is the prefix used for the NetBSD-sourced tools. |
316 | # | | 316 | # |
317 | _TOOL_PREFIX?= nb | | 317 | _TOOL_PREFIX?= nb |
318 | | | 318 | |
319 | # | | 319 | # |
320 | # If an external toolchain base is specified, use it. | | 320 | # If an external toolchain base is specified, use it. |
321 | # | | 321 | # |
322 | .if defined(EXTERNAL_TOOLCHAIN) # { | | 322 | .if defined(EXTERNAL_TOOLCHAIN) # { |
323 | AR= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ar | | 323 | AR= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ar |
324 | AS= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-as | | 324 | AS= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-as |
325 | LD= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ld | | 325 | LD= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ld |
326 | NM= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-nm | | 326 | NM= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-nm |
327 | OBJCOPY= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objcopy | | 327 | OBJCOPY= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objcopy |
328 | OBJDUMP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objdump | | 328 | OBJDUMP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objdump |
329 | RANLIB= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ranlib | | 329 | RANLIB= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ranlib |
330 | READELF= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-readelf | | 330 | READELF= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-readelf |
331 | SIZE= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-size | | 331 | SIZE= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-size |
332 | STRINGS= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-strings | | 332 | STRINGS= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-strings |
333 | STRIP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-strip | | 333 | STRIP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-strip |
334 | | | 334 | |
335 | TOOL_CC.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc | | 335 | TOOL_CC.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc |
336 | TOOL_CPP.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-cpp | | 336 | TOOL_CPP.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-cpp |
337 | TOOL_CXX.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-c++ | | 337 | TOOL_CXX.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-c++ |
338 | TOOL_FC.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gfortran | | 338 | TOOL_FC.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gfortran |
339 | TOOL_OBJC.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc | | 339 | TOOL_OBJC.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc |
340 | | | 340 | |
341 | TOOL_CC.clang= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang | | 341 | TOOL_CC.clang= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang |
342 | TOOL_CPP.clang= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang-cpp | | 342 | TOOL_CPP.clang= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang-cpp |
343 | TOOL_CXX.clang= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang++ | | 343 | TOOL_CXX.clang= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang++ |
344 | TOOL_OBJC.clang= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang | | 344 | TOOL_OBJC.clang= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang |
345 | .else # } { | | 345 | .else # } { |
346 | # Define default locations for common tools. | | 346 | # Define default locations for common tools. |
347 | .if ${USETOOLS_BINUTILS:Uyes} == "yes" # { | | 347 | .if ${USETOOLS_BINUTILS:Uyes} == "yes" # { |
348 | AR= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ar | | 348 | AR= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ar |
349 | AS= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-as | | 349 | AS= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-as |
350 | LD= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ld | | 350 | LD= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ld |
351 | NM= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-nm | | 351 | NM= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-nm |
352 | OBJCOPY= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-objcopy | | 352 | OBJCOPY= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-objcopy |
353 | OBJDUMP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-objdump | | 353 | OBJDUMP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-objdump |
354 | RANLIB= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ranlib | | 354 | RANLIB= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ranlib |
355 | READELF= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-readelf | | 355 | READELF= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-readelf |
356 | SIZE= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-size | | 356 | SIZE= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-size |
357 | STRINGS= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-strings | | 357 | STRINGS= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-strings |
358 | STRIP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-strip | | 358 | STRIP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-strip |
359 | | | 359 | |
360 | # GCC supports C, C++, Fortran and Objective C | | 360 | # GCC supports C, C++, Fortran and Objective C |
361 | TOOL_CC.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc | | 361 | TOOL_CC.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc |
362 | TOOL_CPP.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-cpp | | 362 | TOOL_CPP.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-cpp |
363 | TOOL_CXX.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-c++ | | 363 | TOOL_CXX.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-c++ |
364 | TOOL_FC.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gfortran | | 364 | TOOL_FC.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gfortran |
365 | TOOL_OBJC.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc | | 365 | TOOL_OBJC.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc |
366 | .endif # } | | 366 | .endif # } |
367 | | | 367 | |
368 | # Clang supports C, C++ and Objective C | | 368 | # Clang supports C, C++ and Objective C |
369 | TOOL_CC.clang= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang | | 369 | TOOL_CC.clang= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang |
370 | TOOL_CPP.clang= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang-cpp | | 370 | TOOL_CPP.clang= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang-cpp |
371 | TOOL_CXX.clang= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang++ | | 371 | TOOL_CXX.clang= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang++ |
372 | TOOL_OBJC.clang= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang | | 372 | TOOL_OBJC.clang= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang |
373 | | | 373 | |
374 | # PCC supports C and Fortran | | 374 | # PCC supports C and Fortran |
375 | TOOL_CC.pcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-pcc | | 375 | TOOL_CC.pcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-pcc |
376 | TOOL_CPP.pcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-pcpp | | 376 | TOOL_CPP.pcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-pcpp |
377 | TOOL_CXX.pcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-p++ | | 377 | TOOL_CXX.pcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-p++ |
378 | .endif # EXTERNAL_TOOLCHAIN # } | | 378 | .endif # EXTERNAL_TOOLCHAIN # } |
379 | | | 379 | |
380 | # | | 380 | # |
381 | # Make sure DESTDIR is set, so that builds with these tools always | | 381 | # Make sure DESTDIR is set, so that builds with these tools always |
382 | # get appropriate -nostdinc, -nostdlib, etc. handling. The default is | | 382 | # get appropriate -nostdinc, -nostdlib, etc. handling. The default is |
383 | # <empty string>, meaning start from /, the root directory. | | 383 | # <empty string>, meaning start from /, the root directory. |
384 | # | | 384 | # |
385 | DESTDIR?= | | 385 | DESTDIR?= |
386 | | | 386 | |
387 | # Don't append another copy of sysroot (coming from COMPATCPPFLAGS etc.) | | 387 | # Don't append another copy of sysroot (coming from COMPATCPPFLAGS etc.) |
388 | # because it confuses Coverity. Still we need to cov-configure specially | | 388 | # because it confuses Coverity. Still we need to cov-configure specially |
389 | # for each specific sysroot argument. | | 389 | # for each specific sysroot argument. |
390 | # Also don't add a sysroot at all if a rumpkernel build. | | 390 | # Also don't add a sysroot at all if a rumpkernel build. |
391 | .if !defined(HOSTPROG) && !defined(HOSTLIB) && !defined(RUMPRUN) | | 391 | .if !defined(HOSTPROG) && !defined(HOSTLIB) && !defined(RUMPRUN) |
392 | . if ${DESTDIR} != "" | | 392 | . if ${DESTDIR} != "" |
393 | . if empty(CPPFLAGS:M*--sysroot=*) | | 393 | . if empty(CPPFLAGS:M*--sysroot=*) |
394 | CPPFLAGS+= --sysroot=${DESTDIR} | | 394 | CPPFLAGS+= --sysroot=${DESTDIR} |
395 | . endif | | 395 | . endif |
396 | LDFLAGS+= --sysroot=${DESTDIR} | | 396 | LDFLAGS+= --sysroot=${DESTDIR} |
397 | . else | | 397 | . else |
398 | . if empty(CPPFLAGS:M*--sysroot=*) | | 398 | . if empty(CPPFLAGS:M*--sysroot=*) |
399 | CPPFLAGS+= --sysroot=/ | | 399 | CPPFLAGS+= --sysroot=/ |
400 | . endif | | 400 | . endif |
401 | LDFLAGS+= --sysroot=/ | | 401 | LDFLAGS+= --sysroot=/ |
402 | . endif | | 402 | . endif |
403 | .endif | | 403 | .endif |
404 | | | 404 | |
405 | DBSYM= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-dbsym | | 405 | DBSYM= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-dbsym |
406 | ARM_ELF2AOUT= ${TOOLDIR}/bin/${_TOOL_PREFIX}arm-elf2aout | | 406 | ARM_ELF2AOUT= ${TOOLDIR}/bin/${_TOOL_PREFIX}arm-elf2aout |
407 | M68K_ELF2AOUT= ${TOOLDIR}/bin/${_TOOL_PREFIX}m68k-elf2aout | | 407 | M68K_ELF2AOUT= ${TOOLDIR}/bin/${_TOOL_PREFIX}m68k-elf2aout |
408 | MIPS_ELF2ECOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}mips-elf2ecoff | | 408 | MIPS_ELF2ECOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}mips-elf2ecoff |
409 | INSTALL= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-install | | 409 | INSTALL= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-install |
410 | LEX= ${TOOLDIR}/bin/${_TOOL_PREFIX}lex | | 410 | LEX= ${TOOLDIR}/bin/${_TOOL_PREFIX}lex |
411 | LINT= CC=${CC:Q} ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-lint | | 411 | LINT= CC=${CC:Q} ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-lint |
412 | LORDER= NM=${NM:Q} MKTEMP=${TOOL_MKTEMP:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}lorder | | 412 | LORDER= NM=${NM:Q} MKTEMP=${TOOL_MKTEMP:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}lorder |
413 | MKDEP= CC=${CC:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}mkdep | | 413 | MKDEP= CC=${CC:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}mkdep |
414 | MKDEPCXX= CC=${CXX:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}mkdep | | 414 | MKDEPCXX= CC=${CXX:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}mkdep |
415 | PAXCTL= ${TOOLDIR}/bin/${_TOOL_PREFIX}paxctl | | 415 | PAXCTL= ${TOOLDIR}/bin/${_TOOL_PREFIX}paxctl |
416 | TSORT= ${TOOLDIR}/bin/${_TOOL_PREFIX}tsort -q | | 416 | TSORT= ${TOOLDIR}/bin/${_TOOL_PREFIX}tsort -q |
417 | YACC= ${TOOLDIR}/bin/${_TOOL_PREFIX}yacc | | 417 | YACC= ${TOOLDIR}/bin/${_TOOL_PREFIX}yacc |
418 | | | 418 | |
419 | TOOL_AMIGAAOUT2BB= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-aout2bb | | 419 | TOOL_AMIGAAOUT2BB= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-aout2bb |
420 | TOOL_AMIGAELF2BB= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-elf2bb | | 420 | TOOL_AMIGAELF2BB= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-elf2bb |
421 | TOOL_AMIGATXLT= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-txlt | | 421 | TOOL_AMIGATXLT= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-txlt |
422 | TOOL_ASN1_COMPILE= ${TOOLDIR}/bin/${_TOOL_PREFIX}asn1_compile | | 422 | TOOL_ASN1_COMPILE= ${TOOLDIR}/bin/${_TOOL_PREFIX}asn1_compile |
423 | TOOL_AWK= ${TOOLDIR}/bin/${_TOOL_PREFIX}awk | | 423 | TOOL_AWK= ${TOOLDIR}/bin/${_TOOL_PREFIX}awk |
424 | TOOL_CAP_MKDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}cap_mkdb | | 424 | TOOL_CAP_MKDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}cap_mkdb |
425 | TOOL_CAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}cat | | 425 | TOOL_CAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}cat |
426 | TOOL_CKSUM= ${TOOLDIR}/bin/${_TOOL_PREFIX}cksum | | 426 | TOOL_CKSUM= ${TOOLDIR}/bin/${_TOOL_PREFIX}cksum |
427 | TOOL_CLANG_TBLGEN= ${TOOLDIR}/bin/${_TOOL_PREFIX}clang-tblgen | | 427 | TOOL_CLANG_TBLGEN= ${TOOLDIR}/bin/${_TOOL_PREFIX}clang-tblgen |
428 | TOOL_COMPILE_ET= ${TOOLDIR}/bin/${_TOOL_PREFIX}compile_et | | 428 | TOOL_COMPILE_ET= ${TOOLDIR}/bin/${_TOOL_PREFIX}compile_et |
429 | TOOL_CONFIG= ${TOOLDIR}/bin/${_TOOL_PREFIX}config | | 429 | TOOL_CONFIG= ${TOOLDIR}/bin/${_TOOL_PREFIX}config |
430 | TOOL_CRUNCHGEN= MAKE=${.MAKE:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}crunchgen | | 430 | TOOL_CRUNCHGEN= MAKE=${.MAKE:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}crunchgen |
431 | TOOL_CTAGS= ${TOOLDIR}/bin/${_TOOL_PREFIX}ctags | | 431 | TOOL_CTAGS= ${TOOLDIR}/bin/${_TOOL_PREFIX}ctags |
432 | TOOL_CTFCONVERT= ${TOOLDIR}/bin/${_TOOL_PREFIX}ctfconvert | | 432 | TOOL_CTFCONVERT= ${TOOLDIR}/bin/${_TOOL_PREFIX}ctfconvert |
433 | TOOL_CTFMERGE= ${TOOLDIR}/bin/${_TOOL_PREFIX}ctfmerge | | 433 | TOOL_CTFMERGE= ${TOOLDIR}/bin/${_TOOL_PREFIX}ctfmerge |
434 | TOOL_CVSLATEST= ${TOOLDIR}/bin/${_TOOL_PREFIX}cvslatest | | 434 | TOOL_CVSLATEST= ${TOOLDIR}/bin/${_TOOL_PREFIX}cvslatest |
435 | TOOL_DATE= ${TOOLDIR}/bin/${_TOOL_PREFIX}date | | 435 | TOOL_DATE= ${TOOLDIR}/bin/${_TOOL_PREFIX}date |
436 | TOOL_DB= ${TOOLDIR}/bin/${_TOOL_PREFIX}db | | 436 | TOOL_DB= ${TOOLDIR}/bin/${_TOOL_PREFIX}db |
437 | TOOL_DISKLABEL= ${TOOLDIR}/bin/${_TOOL_PREFIX}disklabel | | 437 | TOOL_DISKLABEL= ${TOOLDIR}/bin/${_TOOL_PREFIX}disklabel |
438 | TOOL_DTC= ${TOOLDIR}/bin/${_TOOL_PREFIX}dtc | | 438 | TOOL_DTC= ${TOOLDIR}/bin/${_TOOL_PREFIX}dtc |
439 | TOOL_EQN= ${TOOLDIR}/bin/${_TOOL_PREFIX}eqn | | 439 | TOOL_EQN= ${TOOLDIR}/bin/${_TOOL_PREFIX}eqn |
440 | TOOL_FDISK= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-fdisk | | 440 | TOOL_FDISK= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-fdisk |
441 | TOOL_FGEN= ${TOOLDIR}/bin/${_TOOL_PREFIX}fgen | | 441 | TOOL_FGEN= ${TOOLDIR}/bin/${_TOOL_PREFIX}fgen |
442 | TOOL_GENASSYM= ${TOOLDIR}/bin/${_TOOL_PREFIX}genassym | | 442 | TOOL_GENASSYM= ${TOOLDIR}/bin/${_TOOL_PREFIX}genassym |
443 | TOOL_GENCAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}gencat | | 443 | TOOL_GENCAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}gencat |
444 | TOOL_GMAKE= ${TOOLDIR}/bin/${_TOOL_PREFIX}gmake | | 444 | TOOL_GMAKE= ${TOOLDIR}/bin/${_TOOL_PREFIX}gmake |
445 | TOOL_GPT= ${TOOLDIR}/bin/${_TOOL_PREFIX}gpt | | 445 | TOOL_GPT= ${TOOLDIR}/bin/${_TOOL_PREFIX}gpt |
446 | TOOL_GREP= ${TOOLDIR}/bin/${_TOOL_PREFIX}grep | | 446 | TOOL_GREP= ${TOOLDIR}/bin/${_TOOL_PREFIX}grep |
447 | GROFF_SHARE_PATH= ${TOOLDIR}/share/groff | | 447 | GROFF_SHARE_PATH= ${TOOLDIR}/share/groff |
448 | TOOL_GROFF_ENV= \ | | 448 | TOOL_GROFF_ENV= \ |
449 | GROFF_ENCODING= \ | | 449 | GROFF_ENCODING= \ |
450 | GROFF_BIN_PATH=${TOOLDIR}/lib/groff \ | | 450 | GROFF_BIN_PATH=${TOOLDIR}/lib/groff \ |
451 | GROFF_FONT_PATH=${GROFF_SHARE_PATH}/site-font:${GROFF_SHARE_PATH}/font \ | | 451 | GROFF_FONT_PATH=${GROFF_SHARE_PATH}/site-font:${GROFF_SHARE_PATH}/font \ |
452 | GROFF_TMAC_PATH=${GROFF_SHARE_PATH}/site-tmac:${GROFF_SHARE_PATH}/tmac | | 452 | GROFF_TMAC_PATH=${GROFF_SHARE_PATH}/site-tmac:${GROFF_SHARE_PATH}/tmac |
453 | TOOL_GROFF= ${TOOL_GROFF_ENV} ${TOOLDIR}/bin/${_TOOL_PREFIX}groff ${GROFF_FLAGS} | | 453 | TOOL_GROFF= ${TOOL_GROFF_ENV} ${TOOLDIR}/bin/${_TOOL_PREFIX}groff ${GROFF_FLAGS} |
454 | | | 454 | |
455 | TOOL_HEXDUMP= ${TOOLDIR}/bin/${_TOOL_PREFIX}hexdump | | 455 | TOOL_HEXDUMP= ${TOOLDIR}/bin/${_TOOL_PREFIX}hexdump |
456 | TOOL_HP300MKBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}hp300-mkboot | | 456 | TOOL_HP300MKBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}hp300-mkboot |
457 | TOOL_HPPAMKBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}hppa-mkboot | | 457 | TOOL_HPPAMKBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}hppa-mkboot |
458 | TOOL_INDXBIB= ${TOOLDIR}/bin/${_TOOL_PREFIX}indxbib | | 458 | TOOL_INDXBIB= ${TOOLDIR}/bin/${_TOOL_PREFIX}indxbib |
459 | TOOL_INSTALLBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}installboot | | 459 | TOOL_INSTALLBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}installboot |
460 | TOOL_INSTALL_INFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}install-info | | 460 | TOOL_INSTALL_INFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}install-info |
461 | TOOL_JOIN= ${TOOLDIR}/bin/${_TOOL_PREFIX}join | | 461 | TOOL_JOIN= ${TOOLDIR}/bin/${_TOOL_PREFIX}join |
462 | TOOL_LLVM_TBLGEN= ${TOOLDIR}/bin/${_TOOL_PREFIX}llvm-tblgen | | 462 | TOOL_LLVM_TBLGEN= ${TOOLDIR}/bin/${_TOOL_PREFIX}llvm-tblgen |
463 | TOOL_M4= ${TOOLDIR}/bin/${_TOOL_PREFIX}m4 | | 463 | TOOL_M4= ${TOOLDIR}/bin/${_TOOL_PREFIX}m4 |
464 | TOOL_MACPPCFIXCOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}macppc-fixcoff | | 464 | TOOL_MACPPCFIXCOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}macppc-fixcoff |
465 | TOOL_MAKEFS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makefs | | 465 | TOOL_MAKEFS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makefs |
466 | TOOL_MAKEINFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}makeinfo | | 466 | TOOL_MAKEINFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}makeinfo |
467 | TOOL_MAKEKEYS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makekeys | | 467 | TOOL_MAKEKEYS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makekeys |
468 | TOOL_MAKESTRS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makestrs | | 468 | TOOL_MAKESTRS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makestrs |
469 | TOOL_MAKEWHATIS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makewhatis | | 469 | TOOL_MAKEWHATIS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makewhatis |
470 | TOOL_MANDOC_ASCII= ${TOOLDIR}/bin/${_TOOL_PREFIX}mandoc -Tascii | | 470 | TOOL_MANDOC_ASCII= ${TOOLDIR}/bin/${_TOOL_PREFIX}mandoc -Tascii |
471 | TOOL_MANDOC_HTML= ${TOOLDIR}/bin/${_TOOL_PREFIX}mandoc -Thtml | | 471 | TOOL_MANDOC_HTML= ${TOOLDIR}/bin/${_TOOL_PREFIX}mandoc -Thtml |
472 | TOOL_MANDOC_LINT= ${TOOLDIR}/bin/${_TOOL_PREFIX}mandoc -Tlint | | 472 | TOOL_MANDOC_LINT= ${TOOLDIR}/bin/${_TOOL_PREFIX}mandoc -Tlint |
473 | TOOL_MDSETIMAGE= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-mdsetimage | | 473 | TOOL_MDSETIMAGE= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-mdsetimage |
474 | TOOL_MENUC= MENUDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}menuc | | 474 | TOOL_MENUC= MENUDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}menuc |
475 | TOOL_ARMELF2AOUT= ${TOOLDIR}/bin/${_TOOL_PREFIX}arm-elf2aout | | 475 | TOOL_ARMELF2AOUT= ${TOOLDIR}/bin/${_TOOL_PREFIX}arm-elf2aout |
476 | TOOL_M68KELF2AOUT= ${TOOLDIR}/bin/${_TOOL_PREFIX}m68k-elf2aout | | 476 | TOOL_M68KELF2AOUT= ${TOOLDIR}/bin/${_TOOL_PREFIX}m68k-elf2aout |
477 | TOOL_MIPSELF2ECOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}mips-elf2ecoff | | 477 | TOOL_MIPSELF2ECOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}mips-elf2ecoff |
478 | TOOL_MKCSMAPPER= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkcsmapper | | 478 | TOOL_MKCSMAPPER= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkcsmapper |
479 | TOOL_MKESDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkesdb | | 479 | TOOL_MKESDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkesdb |
480 | TOOL_MKLOCALE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mklocale | | 480 | TOOL_MKLOCALE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mklocale |
481 | TOOL_MKMAGIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}file | | 481 | TOOL_MKMAGIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}file |
482 | TOOL_MKNOD= ${TOOLDIR}/bin/${_TOOL_PREFIX}mknod | | 482 | TOOL_MKNOD= ${TOOLDIR}/bin/${_TOOL_PREFIX}mknod |
483 | TOOL_MKTEMP= ${TOOLDIR}/bin/${_TOOL_PREFIX}mktemp | | 483 | TOOL_MKTEMP= ${TOOLDIR}/bin/${_TOOL_PREFIX}mktemp |
484 | TOOL_MKUBOOTIMAGE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkubootimage | | 484 | TOOL_MKUBOOTIMAGE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkubootimage |
485 | TOOL_ELFTOSB= ${TOOLDIR}/bin/${_TOOL_PREFIX}elftosb | | 485 | TOOL_ELFTOSB= ${TOOLDIR}/bin/${_TOOL_PREFIX}elftosb |
486 | TOOL_MSGC= MSGDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}msgc | | 486 | TOOL_MSGC= MSGDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}msgc |
487 | TOOL_MTREE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mtree | | 487 | TOOL_MTREE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mtree |
488 | TOOL_MVME68KWRTVID= ${TOOLDIR}/bin/${_TOOL_PREFIX}mvme68k-wrtvid | | 488 | TOOL_MVME68KWRTVID= ${TOOLDIR}/bin/${_TOOL_PREFIX}mvme68k-wrtvid |
489 | TOOL_NBPERF= ${TOOLDIR}/bin/${_TOOL_PREFIX}perf | | 489 | TOOL_NBPERF= ${TOOLDIR}/bin/${_TOOL_PREFIX}perf |
490 | TOOL_NCDCS= ${TOOLDIR}/bin/${_TOOL_PREFIX}ibmnws-ncdcs | | 490 | TOOL_NCDCS= ${TOOLDIR}/bin/${_TOOL_PREFIX}ibmnws-ncdcs |
491 | TOOL_PAX= ${TOOLDIR}/bin/${_TOOL_PREFIX}pax | | 491 | TOOL_PAX= ${TOOLDIR}/bin/${_TOOL_PREFIX}pax |
492 | TOOL_PIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}pic | | 492 | TOOL_PIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}pic |
493 | TOOL_PIGZ= ${TOOLDIR}/bin/${_TOOL_PREFIX}pigz | | 493 | TOOL_PIGZ= ${TOOLDIR}/bin/${_TOOL_PREFIX}pigz |
494 | TOOL_XZ= ${TOOLDIR}/bin/${_TOOL_PREFIX}xz | | 494 | TOOL_XZ= ${TOOLDIR}/bin/${_TOOL_PREFIX}xz |
495 | TOOL_PKG_CREATE= ${TOOLDIR}/bin/${_TOOL_PREFIX}pkg_create | | 495 | TOOL_PKG_CREATE= ${TOOLDIR}/bin/${_TOOL_PREFIX}pkg_create |
496 | TOOL_POWERPCMKBOOTIMAGE=${TOOLDIR}/bin/${_TOOL_PREFIX}powerpc-mkbootimage | | 496 | TOOL_POWERPCMKBOOTIMAGE=${TOOLDIR}/bin/${_TOOL_PREFIX}powerpc-mkbootimage |
497 | TOOL_PWD_MKDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}pwd_mkdb | | 497 | TOOL_PWD_MKDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}pwd_mkdb |
498 | TOOL_REFER= ${TOOLDIR}/bin/${_TOOL_PREFIX}refer | | 498 | TOOL_REFER= ${TOOLDIR}/bin/${_TOOL_PREFIX}refer |
499 | TOOL_ROFF_ASCII= ${TOOL_GROFF_ENV} ${TOOLDIR}/bin/${_TOOL_PREFIX}nroff | | 499 | TOOL_ROFF_ASCII= ${TOOL_GROFF_ENV} ${TOOLDIR}/bin/${_TOOL_PREFIX}nroff |
500 | TOOL_ROFF_DOCASCII= ${TOOL_GROFF} -Tascii | | 500 | TOOL_ROFF_DOCASCII= ${TOOL_GROFF} -Tascii |
501 | TOOL_ROFF_DOCHTML= ${TOOL_GROFF} -Thtml | | 501 | TOOL_ROFF_DOCHTML= ${TOOL_GROFF} -Thtml |
502 | TOOL_ROFF_DVI= ${TOOL_GROFF} -Tdvi ${ROFF_PAGESIZE} | | 502 | TOOL_ROFF_DVI= ${TOOL_GROFF} -Tdvi ${ROFF_PAGESIZE} |
503 | TOOL_ROFF_HTML= ${TOOL_GROFF} -Tlatin1 -mdoc2html | | 503 | TOOL_ROFF_HTML= ${TOOL_GROFF} -Tlatin1 -mdoc2html |
504 | TOOL_ROFF_PS= ${TOOL_GROFF} -Tps ${ROFF_PAGESIZE} | | 504 | TOOL_ROFF_PS= ${TOOL_GROFF} -Tps ${ROFF_PAGESIZE} |
505 | TOOL_ROFF_RAW= ${TOOL_GROFF} -Z | | 505 | TOOL_ROFF_RAW= ${TOOL_GROFF} -Z |
506 | TOOL_RPCGEN= RPCGEN_CPP=${CPP:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}rpcgen | | 506 | TOOL_RPCGEN= RPCGEN_CPP=${CPP:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}rpcgen |
507 | TOOL_SED= ${TOOLDIR}/bin/${_TOOL_PREFIX}sed | | 507 | TOOL_SED= ${TOOLDIR}/bin/${_TOOL_PREFIX}sed |
508 | TOOL_SLC= ${TOOLDIR}/bin/${_TOOL_PREFIX}slc | | 508 | TOOL_SLC= ${TOOLDIR}/bin/${_TOOL_PREFIX}slc |
509 | TOOL_SOELIM= ${TOOLDIR}/bin/${_TOOL_PREFIX}soelim | | 509 | TOOL_SOELIM= ${TOOLDIR}/bin/${_TOOL_PREFIX}soelim |
510 | TOOL_SORTINFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}sortinfo | | 510 | TOOL_SORTINFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}sortinfo |
511 | TOOL_SPARKCRC= ${TOOLDIR}/bin/${_TOOL_PREFIX}sparkcrc | | 511 | TOOL_SPARKCRC= ${TOOLDIR}/bin/${_TOOL_PREFIX}sparkcrc |
512 | TOOL_STAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}stat | | 512 | TOOL_STAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}stat |
513 | TOOL_STRFILE= ${TOOLDIR}/bin/${_TOOL_PREFIX}strfile | | 513 | TOOL_STRFILE= ${TOOLDIR}/bin/${_TOOL_PREFIX}strfile |
514 | TOOL_SUNLABEL= ${TOOLDIR}/bin/${_TOOL_PREFIX}sunlabel | | 514 | TOOL_SUNLABEL= ${TOOLDIR}/bin/${_TOOL_PREFIX}sunlabel |
515 | TOOL_TBL= ${TOOLDIR}/bin/${_TOOL_PREFIX}tbl | | 515 | TOOL_TBL= ${TOOLDIR}/bin/${_TOOL_PREFIX}tbl |
516 | TOOL_TIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}tic | | 516 | TOOL_TIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}tic |
517 | TOOL_UUDECODE= ${TOOLDIR}/bin/${_TOOL_PREFIX}uudecode | | 517 | TOOL_UUDECODE= ${TOOLDIR}/bin/${_TOOL_PREFIX}uudecode |
518 | TOOL_VGRIND= ${TOOLDIR}/bin/${_TOOL_PREFIX}vgrind -f | | 518 | TOOL_VGRIND= ${TOOLDIR}/bin/${_TOOL_PREFIX}vgrind -f |
519 | TOOL_VFONTEDPR= ${TOOLDIR}/libexec/${_TOOL_PREFIX}vfontedpr | | 519 | TOOL_VFONTEDPR= ${TOOLDIR}/libexec/${_TOOL_PREFIX}vfontedpr |
520 | TOOL_ZIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}zic | | 520 | TOOL_ZIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}zic |
521 | | | 521 | |
522 | .else # USETOOLS != yes # } { | | 522 | .else # USETOOLS != yes # } { |
523 | | | 523 | |
524 | # Clang supports C, C++ and Objective C | | 524 | # Clang supports C, C++ and Objective C |
525 | TOOL_CC.clang= clang | | 525 | TOOL_CC.clang= clang |
526 | TOOL_CPP.clang= clang-cpp | | 526 | TOOL_CPP.clang= clang-cpp |
527 | TOOL_CXX.clang= clang++ | | 527 | TOOL_CXX.clang= clang++ |
528 | TOOL_OBJC.clang= clang | | 528 | TOOL_OBJC.clang= clang |
529 | | | 529 | |
530 | # GCC supports C, C++, Fortran and Objective C | | 530 | # GCC supports C, C++, Fortran and Objective C |
531 | TOOL_CC.gcc= gcc | | 531 | TOOL_CC.gcc= gcc |
532 | TOOL_CPP.gcc= cpp | | 532 | TOOL_CPP.gcc= cpp |
533 | TOOL_CXX.gcc= c++ | | 533 | TOOL_CXX.gcc= c++ |
534 | TOOL_FC.gcc= gfortran | | 534 | TOOL_FC.gcc= gfortran |
535 | TOOL_OBJC.gcc= gcc | | 535 | TOOL_OBJC.gcc= gcc |
536 | | | 536 | |
537 | # PCC supports C and Fortran | | 537 | # PCC supports C and Fortran |
538 | TOOL_CC.pcc= pcc | | 538 | TOOL_CC.pcc= pcc |
539 | TOOL_CPP.pcc= pcpp | | 539 | TOOL_CPP.pcc= pcpp |
540 | TOOL_CXX.pcc= p++ | | 540 | TOOL_CXX.pcc= p++ |
541 | | | 541 | |
542 | TOOL_AMIGAAOUT2BB= amiga-aout2bb | | 542 | TOOL_AMIGAAOUT2BB= amiga-aout2bb |
543 | TOOL_AMIGAELF2BB= amiga-elf2bb | | 543 | TOOL_AMIGAELF2BB= amiga-elf2bb |
544 | TOOL_AMIGATXLT= amiga-txlt | | 544 | TOOL_AMIGATXLT= amiga-txlt |
545 | TOOL_ASN1_COMPILE= asn1_compile | | 545 | TOOL_ASN1_COMPILE= asn1_compile |
546 | TOOL_AWK= awk | | 546 | TOOL_AWK= awk |
547 | TOOL_CAP_MKDB= cap_mkdb | | 547 | TOOL_CAP_MKDB= cap_mkdb |
548 | TOOL_CAT= cat | | 548 | TOOL_CAT= cat |
549 | TOOL_CKSUM= cksum | | 549 | TOOL_CKSUM= cksum |
550 | TOOL_CLANG_TBLGEN= clang-tblgen | | 550 | TOOL_CLANG_TBLGEN= clang-tblgen |
551 | TOOL_COMPILE_ET= compile_et | | 551 | TOOL_COMPILE_ET= compile_et |
552 | TOOL_CONFIG= config | | 552 | TOOL_CONFIG= config |
553 | TOOL_CRUNCHGEN= crunchgen | | 553 | TOOL_CRUNCHGEN= crunchgen |
554 | TOOL_CTAGS= ctags | | 554 | TOOL_CTAGS= ctags |
555 | TOOL_CTFCONVERT= ctfconvert | | 555 | TOOL_CTFCONVERT= ctfconvert |
556 | TOOL_CTFMERGE= ctfmerge | | 556 | TOOL_CTFMERGE= ctfmerge |
557 | TOOL_CVSLATEST= cvslatest | | 557 | TOOL_CVSLATEST= cvslatest |
558 | TOOL_DATE= date | | 558 | TOOL_DATE= date |
559 | TOOL_DB= db | | 559 | TOOL_DB= db |
560 | TOOL_DISKLABEL= disklabel | | 560 | TOOL_DISKLABEL= disklabel |
561 | TOOL_DTC= dtc | | 561 | TOOL_DTC= dtc |
562 | TOOL_EQN= eqn | | 562 | TOOL_EQN= eqn |
563 | TOOL_FDISK= fdisk | | 563 | TOOL_FDISK= fdisk |
564 | TOOL_FGEN= fgen | | 564 | TOOL_FGEN= fgen |
565 | TOOL_GENASSYM= genassym | | 565 | TOOL_GENASSYM= genassym |
566 | TOOL_GENCAT= gencat | | 566 | TOOL_GENCAT= gencat |
567 | TOOL_GMAKE= gmake | | 567 | TOOL_GMAKE= gmake |
568 | TOOL_GPT= gpt | | 568 | TOOL_GPT= gpt |
569 | TOOL_GREP= grep | | 569 | TOOL_GREP= grep |
570 | TOOL_GROFF= groff | | 570 | TOOL_GROFF= groff |
571 | TOOL_HEXDUMP= hexdump | | 571 | TOOL_HEXDUMP= hexdump |
572 | TOOL_HP300MKBOOT= hp300-mkboot | | 572 | TOOL_HP300MKBOOT= hp300-mkboot |
573 | TOOL_HPPAMKBOOT= hppa-mkboot | | 573 | TOOL_HPPAMKBOOT= hppa-mkboot |
574 | TOOL_INDXBIB= indxbib | | 574 | TOOL_INDXBIB= indxbib |
575 | TOOL_INSTALLBOOT= installboot | | 575 | TOOL_INSTALLBOOT= installboot |
576 | TOOL_INSTALL_INFO= install-info | | 576 | TOOL_INSTALL_INFO= install-info |
577 | TOOL_JOIN= join | | 577 | TOOL_JOIN= join |
578 | TOOL_LLVM_TBLGEN= llvm-tblgen | | 578 | TOOL_LLVM_TBLGEN= llvm-tblgen |
579 | TOOL_M4= m4 | | 579 | TOOL_M4= m4 |
580 | TOOL_MACPPCFIXCOFF= macppc-fixcoff | | 580 | TOOL_MACPPCFIXCOFF= macppc-fixcoff |
581 | TOOL_MAKEFS= makefs | | 581 | TOOL_MAKEFS= makefs |
582 | TOOL_MAKEINFO= makeinfo | | 582 | TOOL_MAKEINFO= makeinfo |
583 | TOOL_MAKEKEYS= makekeys | | 583 | TOOL_MAKEKEYS= makekeys |
584 | TOOL_MAKESTRS= makestrs | | 584 | TOOL_MAKESTRS= makestrs |
585 | TOOL_MAKEWHATIS= /usr/libexec/makewhatis | | 585 | TOOL_MAKEWHATIS= /usr/libexec/makewhatis |
586 | TOOL_MANDOC_ASCII= mandoc -Tascii | | 586 | TOOL_MANDOC_ASCII= mandoc -Tascii |
587 | TOOL_MANDOC_HTML= mandoc -Thtml | | 587 | TOOL_MANDOC_HTML= mandoc -Thtml |
588 | TOOL_MANDOC_LINT= mandoc -Tlint | | 588 | TOOL_MANDOC_LINT= mandoc -Tlint |
589 | TOOL_MDSETIMAGE= mdsetimage | | 589 | TOOL_MDSETIMAGE= mdsetimage |
590 | TOOL_MENUC= menuc | | 590 | TOOL_MENUC= menuc |
591 | TOOL_ARMELF2AOUT= arm-elf2aout | | 591 | TOOL_ARMELF2AOUT= arm-elf2aout |
592 | TOOL_M68KELF2AOUT= m68k-elf2aout | | 592 | TOOL_M68KELF2AOUT= m68k-elf2aout |
593 | TOOL_MIPSELF2ECOFF= mips-elf2ecoff | | 593 | TOOL_MIPSELF2ECOFF= mips-elf2ecoff |
594 | TOOL_MKCSMAPPER= mkcsmapper | | 594 | TOOL_MKCSMAPPER= mkcsmapper |
595 | TOOL_MKESDB= mkesdb | | 595 | TOOL_MKESDB= mkesdb |
596 | TOOL_MKLOCALE= mklocale | | 596 | TOOL_MKLOCALE= mklocale |
597 | TOOL_MKMAGIC= file | | 597 | TOOL_MKMAGIC= file |
598 | TOOL_MKNOD= mknod | | 598 | TOOL_MKNOD= mknod |
599 | TOOL_MKTEMP= mktemp | | 599 | TOOL_MKTEMP= mktemp |
600 | TOOL_MKUBOOTIMAGE= mkubootimage | | 600 | TOOL_MKUBOOTIMAGE= mkubootimage |
601 | TOOL_ELFTOSB= elftosb | | 601 | TOOL_ELFTOSB= elftosb |
602 | TOOL_MSGC= msgc | | 602 | TOOL_MSGC= msgc |
603 | TOOL_MTREE= mtree | | 603 | TOOL_MTREE= mtree |
604 | TOOL_MVME68KWRTVID= wrtvid | | 604 | TOOL_MVME68KWRTVID= wrtvid |
605 | TOOL_NBPERF= nbperf | | 605 | TOOL_NBPERF= nbperf |
606 | TOOL_NCDCS= ncdcs | | 606 | TOOL_NCDCS= ncdcs |
607 | TOOL_PAX= pax | | 607 | TOOL_PAX= pax |
608 | TOOL_PIC= pic | | 608 | TOOL_PIC= pic |
609 | TOOL_PIGZ= pigz | | 609 | TOOL_PIGZ= pigz |
610 | TOOL_XZ= xz | | 610 | TOOL_XZ= xz |
611 | TOOL_PKG_CREATE= pkg_create | | 611 | TOOL_PKG_CREATE= pkg_create |
612 | TOOL_POWERPCMKBOOTIMAGE= powerpc-mkbootimage | | 612 | TOOL_POWERPCMKBOOTIMAGE= powerpc-mkbootimage |
613 | TOOL_PWD_MKDB= pwd_mkdb | | 613 | TOOL_PWD_MKDB= pwd_mkdb |
614 | TOOL_REFER= refer | | 614 | TOOL_REFER= refer |
615 | TOOL_ROFF_ASCII= nroff | | 615 | TOOL_ROFF_ASCII= nroff |
616 | TOOL_ROFF_DOCASCII= ${TOOL_GROFF} -Tascii | | 616 | TOOL_ROFF_DOCASCII= ${TOOL_GROFF} -Tascii |
617 | TOOL_ROFF_DOCHTML= ${TOOL_GROFF} -Thtml | | 617 | TOOL_ROFF_DOCHTML= ${TOOL_GROFF} -Thtml |
618 | TOOL_ROFF_DVI= ${TOOL_GROFF} -Tdvi ${ROFF_PAGESIZE} | | 618 | TOOL_ROFF_DVI= ${TOOL_GROFF} -Tdvi ${ROFF_PAGESIZE} |
619 | TOOL_ROFF_HTML= ${TOOL_GROFF} -Tlatin1 -mdoc2html | | 619 | TOOL_ROFF_HTML= ${TOOL_GROFF} -Tlatin1 -mdoc2html |
620 | TOOL_ROFF_PS= ${TOOL_GROFF} -Tps ${ROFF_PAGESIZE} | | 620 | TOOL_ROFF_PS= ${TOOL_GROFF} -Tps ${ROFF_PAGESIZE} |
621 | TOOL_ROFF_RAW= ${TOOL_GROFF} -Z | | 621 | TOOL_ROFF_RAW= ${TOOL_GROFF} -Z |
622 | TOOL_RPCGEN= rpcgen | | 622 | TOOL_RPCGEN= rpcgen |
623 | TOOL_SED= sed | | 623 | TOOL_SED= sed |
624 | TOOL_SOELIM= soelim | | 624 | TOOL_SOELIM= soelim |
625 | TOOL_SORTINFO= sortinfo | | 625 | TOOL_SORTINFO= sortinfo |
626 | TOOL_SPARKCRC= sparkcrc | | 626 | TOOL_SPARKCRC= sparkcrc |
627 | TOOL_STAT= stat | | 627 | TOOL_STAT= stat |
628 | TOOL_STRFILE= strfile | | 628 | TOOL_STRFILE= strfile |
629 | TOOL_SUNLABEL= sunlabel | | 629 | TOOL_SUNLABEL= sunlabel |
630 | TOOL_TBL= tbl | | 630 | TOOL_TBL= tbl |
631 | TOOL_TIC= tic | | 631 | TOOL_TIC= tic |
632 | TOOL_UUDECODE= uudecode | | 632 | TOOL_UUDECODE= uudecode |
633 | TOOL_VGRIND= vgrind -f | | 633 | TOOL_VGRIND= vgrind -f |
634 | TOOL_VFONTEDPR= /usr/libexec/vfontedpr | | 634 | TOOL_VFONTEDPR= /usr/libexec/vfontedpr |
635 | TOOL_ZIC= zic | | 635 | TOOL_ZIC= zic |
636 | | | 636 | |
637 | .endif # USETOOLS != yes # } | | 637 | .endif # USETOOLS != yes # } |
638 | | | 638 | |
639 | # Standalone code should not be compiled with PIE or CTF | | 639 | # Standalone code should not be compiled with PIE or CTF |
640 | # Should create a better test | | 640 | # Should create a better test |
641 | .if defined(BINDIR) && ${BINDIR} == "/usr/mdec" | | 641 | .if defined(BINDIR) && ${BINDIR} == "/usr/mdec" |
642 | NOPIE= # defined | | 642 | NOPIE= # defined |
643 | NOCTF= # defined | | 643 | NOCTF= # defined |
644 | .elif ${MACHINE} == "sun2" | | 644 | .elif ${MACHINE} == "sun2" |
645 | NOPIE= # we don't have PIC, so no PIE | | 645 | NOPIE= # we don't have PIC, so no PIE |
646 | .endif | | 646 | .endif |
647 | | | 647 | |
648 | # Fallback to ensure that all variables are defined to something | | 648 | # Fallback to ensure that all variables are defined to something |
649 | TOOL_CC.false= false | | 649 | TOOL_CC.false= false |
650 | TOOL_CPP.false= false | | 650 | TOOL_CPP.false= false |
651 | TOOL_CXX.false= false | | 651 | TOOL_CXX.false= false |
652 | TOOL_FC.false= false | | 652 | TOOL_FC.false= false |
653 | TOOL_OBJC.false= false | | 653 | TOOL_OBJC.false= false |
654 | | | 654 | |
655 | AVAILABLE_COMPILER?= ${HAVE_PCC:Dpcc} ${HAVE_LLVM:Dclang} ${HAVE_GCC:Dgcc} false | | 655 | AVAILABLE_COMPILER?= ${HAVE_PCC:Dpcc} ${HAVE_LLVM:Dclang} ${HAVE_GCC:Dgcc} false |
656 | | | 656 | |
657 | .for _t in CC CPP CXX FC OBJC | | 657 | .for _t in CC CPP CXX FC OBJC |
658 | ACTIVE_${_t}= ${AVAILABLE_COMPILER:@.c.@ ${ !defined(UNSUPPORTED_COMPILER.${.c.}) && defined(TOOL_${_t}.${.c.}) :? ${.c.} : }@:[1]} | | 658 | ACTIVE_${_t}= ${AVAILABLE_COMPILER:@.c.@ ${ !defined(UNSUPPORTED_COMPILER.${.c.}) && defined(TOOL_${_t}.${.c.}) :? ${.c.} : }@:[1]} |
659 | SUPPORTED_${_t}=${AVAILABLE_COMPILER:Nfalse:@.c.@ ${ !defined(UNSUPPORTED_COMPILER.${.c.}) && defined(TOOL_${_t}.${.c.}) :? ${.c.} : }@} | | 659 | SUPPORTED_${_t}=${AVAILABLE_COMPILER:Nfalse:@.c.@ ${ !defined(UNSUPPORTED_COMPILER.${.c.}) && defined(TOOL_${_t}.${.c.}) :? ${.c.} : }@} |
660 | .endfor | | 660 | .endfor |
661 | # make bugs prevent moving this into the .for loop | | 661 | # make bugs prevent moving this into the .for loop |
662 | CC= ${TOOL_CC.${ACTIVE_CC}} | | 662 | CC= ${TOOL_CC.${ACTIVE_CC}} |
663 | CPP= ${TOOL_CPP.${ACTIVE_CPP}} | | 663 | CPP= ${TOOL_CPP.${ACTIVE_CPP}} |
664 | CXX= ${TOOL_CXX.${ACTIVE_CXX}} | | 664 | CXX= ${TOOL_CXX.${ACTIVE_CXX}} |
665 | FC= ${TOOL_FC.${ACTIVE_FC}} | | 665 | FC= ${TOOL_FC.${ACTIVE_FC}} |
666 | OBJC= ${TOOL_OBJC.${ACTIVE_OBJC}} | | 666 | OBJC= ${TOOL_OBJC.${ACTIVE_OBJC}} |
667 | | | 667 | |
668 | # For each ${MACHINE_CPU}, list the ports that use it. | | 668 | # For each ${MACHINE_CPU}, list the ports that use it. |
669 | MACHINES.aarch64= evbarm | | 669 | MACHINES.aarch64= evbarm |
670 | MACHINES.alpha= alpha | | 670 | MACHINES.alpha= alpha |
671 | MACHINES.arm= acorn32 cats epoc32 evbarm hpcarm \ | | 671 | MACHINES.arm= acorn32 cats epoc32 evbarm hpcarm \ |
672 | iyonix netwinder shark zaurus | | 672 | iyonix netwinder shark zaurus |
673 | MACHINES.coldfire= evbcf | | 673 | MACHINES.coldfire= evbcf |
674 | MACHINES.i386= i386 | | 674 | MACHINES.i386= i386 |
675 | MACHINES.ia64= ia64 | | 675 | MACHINES.ia64= ia64 |
676 | MACHINES.hppa= hppa | | 676 | MACHINES.hppa= hppa |
677 | MACHINES.m68000= sun2 | | 677 | MACHINES.m68000= sun2 |
678 | MACHINES.m68k= amiga atari cesfic hp300 luna68k mac68k \ | | 678 | MACHINES.m68k= amiga atari cesfic hp300 luna68k mac68k \ |
679 | news68k next68k sun3 x68k | | 679 | news68k next68k sun3 x68k |
680 | MACHINES.mips= algor arc cobalt emips evbmips ews4800mips \ | | 680 | MACHINES.mips= algor arc cobalt emips evbmips ews4800mips \ |
681 | hpcmips mipsco newsmips pmax sbmips sgimips | | 681 | hpcmips mipsco newsmips pmax sbmips sgimips |
682 | MACHINES.or1k= or1k | | 682 | MACHINES.or1k= or1k |
683 | MACHINES.powerpc= amigappc bebox evbppc ibmnws macppc mvmeppc \ | | 683 | MACHINES.powerpc= amigappc bebox evbppc ibmnws macppc mvmeppc \ |
684 | ofppc prep rs6000 sandpoint | | 684 | ofppc prep rs6000 sandpoint |
685 | MACHINES.riscv= riscv | | 685 | MACHINES.riscv= riscv |
686 | MACHINES.sh3= dreamcast evbsh3 hpcsh landisk mmeye | | 686 | MACHINES.sh3= dreamcast evbsh3 hpcsh landisk mmeye |
687 | MACHINES.sparc= sparc sparc64 | | 687 | MACHINES.sparc= sparc sparc64 |
688 | MACHINES.sparc64= sparc64 | | 688 | MACHINES.sparc64= sparc64 |
689 | MACHINES.vax= vax | | 689 | MACHINES.vax= vax |
690 | MACHINES.x86_64= amd64 | | 690 | MACHINES.x86_64= amd64 |
691 | | | 691 | |
692 | # OBJCOPY flags to create a.out binaries for old firmware | | 692 | # OBJCOPY flags to create a.out binaries for old firmware |
693 | # shared among src/distrib and ${MACHINE}/conf/Makefile.${MACHINE}.inc | | 693 | # shared among src/distrib and ${MACHINE}/conf/Makefile.${MACHINE}.inc |
694 | .if ${MACHINE_CPU} == "arm" | | 694 | .if ${MACHINE_CPU} == "arm" |
695 | OBJCOPY_ELF2AOUT_FLAGS?= \ | | 695 | OBJCOPY_ELF2AOUT_FLAGS?= \ |
696 | -O a.out-arm-netbsd \ | | 696 | -O a.out-arm-netbsd \ |
697 | -R .ident \ | | 697 | -R .ident \ |
698 | -R .ARM.attributes \ | | 698 | -R .ARM.attributes \ |
699 | -R .ARM.exidx \ | | 699 | -R .ARM.exidx \ |
700 | -R .ARM.extab \ | | 700 | -R .ARM.extab \ |
701 | -R .SUNW_ctf \ | | 701 | -R .SUNW_ctf \ |
702 | -R .arm.atpcs \ | | 702 | -R .arm.atpcs \ |
703 | -R .comment \ | | 703 | -R .comment \ |
704 | -R .debug_abbrev \ | | 704 | -R .debug_abbrev \ |
705 | -R .debug_aranges \ | | 705 | -R .debug_aranges \ |
706 | -R .debug_info \ | | 706 | -R .debug_info \ |
707 | -R .debug_line \ | | 707 | -R .debug_line \ |
708 | -R .debug_frame \ | | 708 | -R .debug_frame \ |
709 | -R .debug_loc \ | | 709 | -R .debug_loc \ |
710 | -R .debug_pubnames \ | | 710 | -R .debug_pubnames \ |
711 | -R .debug_pubtypes \ | | 711 | -R .debug_pubtypes \ |
712 | -R .debug_ranges \ | | 712 | -R .debug_ranges \ |
713 | -R .debug_str \ | | 713 | -R .debug_str \ |
714 | -R .debug_macinfo \ | | 714 | -R .debug_macinfo \ |
715 | -R .eh_frame \ | | 715 | -R .eh_frame \ |
716 | -R .note.netbsd.ident | | 716 | -R .note.netbsd.ident |
717 | .endif | | 717 | .endif |
718 | | | 718 | |
719 | # | | 719 | # |
720 | # Targets to check if DESTDIR or RELEASEDIR is provided | | 720 | # Targets to check if DESTDIR or RELEASEDIR is provided |
721 | # | | 721 | # |
722 | .if !target(check_DESTDIR) | | 722 | .if !target(check_DESTDIR) |
723 | check_DESTDIR: .PHONY .NOTMAIN | | 723 | check_DESTDIR: .PHONY .NOTMAIN |
724 | .if !defined(DESTDIR) | | 724 | .if !defined(DESTDIR) |
725 | @echo "setenv DESTDIR before doing that!" | | 725 | @echo "setenv DESTDIR before doing that!" |
726 | @false | | 726 | @false |
727 | .else | | 727 | .else |
728 | @true | | 728 | @true |
729 | .endif | | 729 | .endif |
730 | .endif | | 730 | .endif |
731 | | | 731 | |
732 | .if !target(check_RELEASEDIR) | | 732 | .if !target(check_RELEASEDIR) |
733 | check_RELEASEDIR: .PHONY .NOTMAIN | | 733 | check_RELEASEDIR: .PHONY .NOTMAIN |
734 | .if !defined(RELEASEDIR) | | 734 | .if !defined(RELEASEDIR) |
735 | @echo "setenv RELEASEDIR before doing that!" | | 735 | @echo "setenv RELEASEDIR before doing that!" |
736 | @false | | 736 | @false |
737 | .else | | 737 | .else |
738 | @true | | 738 | @true |
739 | .endif | | 739 | .endif |
740 | .endif | | 740 | .endif |
741 | | | 741 | |
742 | # | | 742 | # |
743 | # Where the system object and source trees are kept; can be configurable | | 743 | # Where the system object and source trees are kept; can be configurable |
744 | # by the user in case they want them in ~/foosrc and ~/fooobj (for example). | | 744 | # by the user in case they want them in ~/foosrc and ~/fooobj (for example). |
745 | # | | 745 | # |
746 | BSDSRCDIR?= /usr/src | | 746 | BSDSRCDIR?= /usr/src |
747 | BSDOBJDIR?= /usr/obj | | 747 | BSDOBJDIR?= /usr/obj |
748 | NETBSDSRCDIR?= ${BSDSRCDIR} | | 748 | NETBSDSRCDIR?= ${BSDSRCDIR} |
749 | | | 749 | |
750 | BINGRP?= wheel | | 750 | BINGRP?= wheel |
751 | BINOWN?= root | | 751 | BINOWN?= root |
752 | BINMODE?= 555 | | 752 | BINMODE?= 555 |
753 | NONBINMODE?= 444 | | 753 | NONBINMODE?= 444 |
754 | | | 754 | |
755 | # These are here mainly because we don't want suid root in case | | 755 | # These are here mainly because we don't want suid root in case |
756 | # a Makefile defines BINMODE. | | 756 | # a Makefile defines BINMODE. |
757 | RUMPBINGRP?= wheel | | 757 | RUMPBINGRP?= wheel |
758 | RUMPBINOWN?= root | | 758 | RUMPBINOWN?= root |
759 | RUMPBINMODE?= 555 | | 759 | RUMPBINMODE?= 555 |
760 | RUMPNONBINMODE?=444 | | 760 | RUMPNONBINMODE?=444 |
761 | | | 761 | |
762 | MANDIR?= /usr/share/man | | 762 | MANDIR?= /usr/share/man |
763 | MANGRP?= wheel | | 763 | MANGRP?= wheel |
764 | MANOWN?= root | | 764 | MANOWN?= root |
765 | MANMODE?= ${NONBINMODE} | | 765 | MANMODE?= ${NONBINMODE} |
766 | MANINSTALL?= ${_MANINSTALL} | | 766 | MANINSTALL?= ${_MANINSTALL} |
767 | | | 767 | |
768 | INFODIR?= /usr/share/info | | 768 | INFODIR?= /usr/share/info |
769 | INFOGRP?= wheel | | 769 | INFOGRP?= wheel |
770 | INFOOWN?= root | | 770 | INFOOWN?= root |
771 | INFOMODE?= ${NONBINMODE} | | 771 | INFOMODE?= ${NONBINMODE} |
772 | | | 772 | |
773 | LIBDIR?= /usr/lib | | 773 | LIBDIR?= /usr/lib |
774 | | | 774 | |
775 | LINTLIBDIR?= /usr/libdata/lint | | 775 | LINTLIBDIR?= /usr/libdata/lint |
776 | LIBGRP?= ${BINGRP} | | 776 | LIBGRP?= ${BINGRP} |
777 | LIBOWN?= ${BINOWN} | | 777 | LIBOWN?= ${BINOWN} |
778 | LIBMODE?= ${NONBINMODE} | | 778 | LIBMODE?= ${NONBINMODE} |
779 | | | 779 | |
780 | DOCDIR?= /usr/share/doc | | 780 | DOCDIR?= /usr/share/doc |
781 | DOCGRP?= wheel | | 781 | DOCGRP?= wheel |
782 | DOCOWN?= root | | 782 | DOCOWN?= root |
783 | DOCMODE?= ${NONBINMODE} | | 783 | DOCMODE?= ${NONBINMODE} |
784 | | | 784 | |
785 | NLSDIR?= /usr/share/nls | | 785 | NLSDIR?= /usr/share/nls |
786 | NLSGRP?= wheel | | 786 | NLSGRP?= wheel |
787 | NLSOWN?= root | | 787 | NLSOWN?= root |
788 | NLSMODE?= ${NONBINMODE} | | 788 | NLSMODE?= ${NONBINMODE} |
789 | | | 789 | |
790 | KMODULEGRP?= wheel | | 790 | KMODULEGRP?= wheel |
791 | KMODULEOWN?= root | | 791 | KMODULEOWN?= root |
792 | KMODULEMODE?= ${NONBINMODE} | | 792 | KMODULEMODE?= ${NONBINMODE} |
793 | | | 793 | |
794 | LOCALEDIR?= /usr/share/locale | | 794 | LOCALEDIR?= /usr/share/locale |
795 | LOCALEGRP?= wheel | | 795 | LOCALEGRP?= wheel |
796 | LOCALEOWN?= root | | 796 | LOCALEOWN?= root |
797 | LOCALEMODE?= ${NONBINMODE} | | 797 | LOCALEMODE?= ${NONBINMODE} |
798 | | | 798 | |
799 | FIRMWAREDIR?= /libdata/firmware | | 799 | FIRMWAREDIR?= /libdata/firmware |
800 | FIRMWAREGRP?= wheel | | 800 | FIRMWAREGRP?= wheel |
801 | FIRMWAREOWN?= root | | 801 | FIRMWAREOWN?= root |
802 | FIRMWAREMODE?= ${NONBINMODE} | | 802 | FIRMWAREMODE?= ${NONBINMODE} |
803 | | | 803 | |
804 | DEBUGDIR?= /usr/libdata/debug | | 804 | DEBUGDIR?= /usr/libdata/debug |
805 | DEBUGGRP?= wheel | | 805 | DEBUGGRP?= wheel |
806 | DEBUGOWN?= root | | 806 | DEBUGOWN?= root |
807 | DEBUGMODE?= ${NONBINMODE} | | 807 | DEBUGMODE?= ${NONBINMODE} |
808 | | | 808 | |
809 | DTBDIR?= /boot/dtb | | 809 | DTBDIR?= /boot/dtb |
810 | DTBGRP?= wheel | | 810 | DTBGRP?= wheel |
811 | DTBOWN?= root | | 811 | DTBOWN?= root |
812 | DTBMODE?= ${NONBINMODE} | | 812 | DTBMODE?= ${NONBINMODE} |
813 | | | 813 | |
814 | MKDIRMODE?= 0755 | | 814 | MKDIRMODE?= 0755 |
815 | MKDIRPERM?= -m ${MKDIRMODE} | | 815 | MKDIRPERM?= -m ${MKDIRMODE} |
816 | | | 816 | |
817 | # | | 817 | # |
818 | # Data-driven table using make variables to control how | | 818 | # Data-driven table using make variables to control how |
819 | # toolchain-dependent targets and shared libraries are built | | 819 | # toolchain-dependent targets and shared libraries are built |
820 | # for different platforms and object formats. | | 820 | # for different platforms and object formats. |
821 | # | | 821 | # |
822 | # OBJECT_FMT: currently either "ELF" or "a.out". | | 822 | # OBJECT_FMT: currently either "ELF" or "a.out". |
823 | # | | 823 | # |
824 | # All platforms are ELF. | | 824 | # All platforms are ELF. |
825 | # | | 825 | # |
826 | OBJECT_FMT= ELF | | 826 | OBJECT_FMT= ELF |
827 | | | 827 | |
828 | # | | 828 | # |
829 | # If this platform's toolchain is missing, we obviously cannot build it. | | 829 | # If this platform's toolchain is missing, we obviously cannot build it. |
830 | # | | 830 | # |
831 | .if ${TOOLCHAIN_MISSING} != "no" | | 831 | .if ${TOOLCHAIN_MISSING} != "no" |
832 | MKBINUTILS:= no | | 832 | MKBINUTILS:= no |
833 | MKGDB:= no | | 833 | MKGDB:= no |
834 | MKGCC:= no | | 834 | MKGCC:= no |
835 | .endif | | 835 | .endif |
836 | | | 836 | |
837 | # | | 837 | # |
838 | # If we are using an external toolchain, we can still build the target's | | 838 | # If we are using an external toolchain, we can still build the target's |
839 | # binutils, but we cannot build GCC's support libraries, since those are | | 839 | # binutils, but we cannot build GCC's support libraries, since those are |
840 | # tightly-coupled to the version of GCC being used. | | 840 | # tightly-coupled to the version of GCC being used. |
841 | # | | 841 | # |
842 | .if defined(EXTERNAL_TOOLCHAIN) | | 842 | .if defined(EXTERNAL_TOOLCHAIN) |
843 | MKGCC:= no | | 843 | MKGCC:= no |
844 | .endif | | 844 | .endif |
845 | | | 845 | |
846 | MKGDB.or1k= no | | 846 | MKGDB.or1k= no |
847 | MKGDB.riscv32= no | | 847 | MKGDB.riscv32= no |
848 | MKGDB.riscv64= no | | 848 | MKGDB.riscv64= no |
849 | | | 849 | |
850 | # No kernel modules for or1k or riscv (yet) | | 850 | # No kernel modules for or1k or riscv (yet) |
851 | MKKMOD.or1k= no | | 851 | MKKMOD.or1k= no |
852 | MKKMOD.riscv32= no | | 852 | MKKMOD.riscv32= no |
853 | MKKMOD.riscv64= no | | 853 | MKKMOD.riscv64= no |
854 | | | 854 | |
855 | # No profiling for or1k (yet) | | 855 | # No profiling for or1k (yet) |
856 | MKPROFILE.or1k= no | | 856 | MKPROFILE.or1k= no |
857 | MKPROFILE.riscv32=no | | 857 | MKPROFILE.riscv32=no |
858 | MKPROFILE.riscv64=no | | 858 | MKPROFILE.riscv64=no |
859 | | | 859 | |
860 | # | | 860 | # |
861 | # The m68000 port is incomplete. | | 861 | # The m68000 port is incomplete. |
862 | # | | 862 | # |
863 | .if ${MACHINE_ARCH} == "m68000" | | 863 | .if ${MACHINE_ARCH} == "m68000" |
864 | NOPIC= # defined | | 864 | NOPIC= # defined |
865 | MKISCSI= no | | 865 | MKISCSI= no |
866 | # XXX GCC 4 outputs mcount() calling sequences that try to load values | | 866 | # XXX GCC 4 outputs mcount() calling sequences that try to load values |
867 | # from over 64KB away and this fails to assemble. | | 867 | # from over 64KB away and this fails to assemble. |
868 | .if defined(HAVE_GCC) | | 868 | .if defined(HAVE_GCC) |
869 | NOPROFILE= # defined | | 869 | NOPROFILE= # defined |
870 | .endif | | 870 | .endif |
871 | .endif | | 871 | .endif |
872 | | | 872 | |
873 | # | | 873 | # |
874 | # GCC warnings with simple disables. Use these with eg | | 874 | # GCC warnings with simple disables. Use these with eg |
875 | # COPTS.foo.c+= ${GCC_NO_STRINGOP_TRUNCATION}. | | 875 | # COPTS.foo.c+= ${GCC_NO_STRINGOP_TRUNCATION}. |
876 | # | | 876 | # |
877 | GCC_NO_FORMAT_TRUNCATION= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-format-truncation :} | | 877 | GCC_NO_FORMAT_TRUNCATION= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-format-truncation :} |
878 | GCC_NO_FORMAT_OVERFLOW= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-format-overflow :} | | 878 | GCC_NO_FORMAT_OVERFLOW= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-format-overflow :} |
879 | GCC_NO_STRINGOP_OVERFLOW= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-stringop-overflow :} | | 879 | GCC_NO_STRINGOP_OVERFLOW= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-stringop-overflow :} |
880 | GCC_NO_IMPLICIT_FALLTHRU= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-implicit-fallthrough :} | | 880 | GCC_NO_IMPLICIT_FALLTHRU= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-implicit-fallthrough :} |
881 | GCC_NO_STRINGOP_TRUNCATION= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -Wno-stringop-truncation :} | | 881 | GCC_NO_STRINGOP_TRUNCATION= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -Wno-stringop-truncation :} |
882 | GCC_NO_CAST_FUNCTION_TYPE= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -Wno-cast-function-type :} | | 882 | GCC_NO_CAST_FUNCTION_TYPE= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -Wno-cast-function-type :} |
883 | GCC_NO_ADDR_OF_PACKED_MEMBER= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 9:? -Wno-address-of-packed-member :} | | 883 | GCC_NO_ADDR_OF_PACKED_MEMBER= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 9:? -Wno-address-of-packed-member :} |
884 | GCC_NO_MAYBE_UNINITIALIZED= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-maybe-uninitialized :} | | 884 | GCC_NO_MAYBE_UNINITIALIZED= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-maybe-uninitialized :} |
885 | GCC_NO_RETURN_LOCAL_ADDR= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-return-local-addr :} | | 885 | GCC_NO_RETURN_LOCAL_ADDR= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-return-local-addr :} |
886 | | | 886 | |
887 | # | | 887 | # |
888 | # Clang warnings | | 888 | # Clang warnings |
889 | # | | 889 | # |
890 | CLANG_NO_ADDR_OF_PACKED_MEMBER= ${${ACTIVE_CC} == "clang" :? -Wno-error=address-of-packed-member :} | | 890 | CLANG_NO_ADDR_OF_PACKED_MEMBER= ${${ACTIVE_CC} == "clang" :? -Wno-error=address-of-packed-member :} |
891 | | | 891 | |
892 | NO_ADDR_OF_PACKED_MEMBER= ${CLANG_NO_ADDR_OF_PACKED_MEMBER} ${GCC_NO_ADDR_OF_PACKED_MEMBER} | | 892 | NO_ADDR_OF_PACKED_MEMBER= ${CLANG_NO_ADDR_OF_PACKED_MEMBER} ${GCC_NO_ADDR_OF_PACKED_MEMBER} |
893 | | | 893 | |
894 | # | | 894 | # |
895 | # The ia64 port is incomplete. | | 895 | # The ia64 port is incomplete. |
896 | # | | 896 | # |
897 | MKGDB.ia64= no | | 897 | MKGDB.ia64= no |
898 | | | 898 | |
899 | # | | 899 | # |
900 | # On VAX using ELF, all objects are PIC, not just shared libraries, | | 900 | # On VAX using ELF, all objects are PIC, not just shared libraries, |
901 | # so don't build the _pic version. VAX has no native TLS support either, | | 901 | # so don't build the _pic version. VAX has no native TLS support either, |
902 | # so differences between TLS models are not relevant. | | 902 | # so differences between TLS models are not relevant. |
903 | # | | 903 | # |
904 | MKPICLIB.vax= no | | 904 | MKPICLIB.vax= no |
905 | | | 905 | |
906 | # | | 906 | # |
907 | # Location of the file that contains the major and minor numbers of the | | 907 | # Location of the file that contains the major and minor numbers of the |
908 | # version of a shared library. If this file exists a shared library | | 908 | # version of a shared library. If this file exists a shared library |
909 | # will be built by <bsd.lib.mk>. | | 909 | # will be built by <bsd.lib.mk>. |
910 | # | | 910 | # |
911 | SHLIB_VERSION_FILE?= ${.CURDIR}/shlib_version | | 911 | SHLIB_VERSION_FILE?= ${.CURDIR}/shlib_version |
912 | | | 912 | |
913 | # | | 913 | # |
914 | # GNU sources and packages sometimes see architecture names differently. | | 914 | # GNU sources and packages sometimes see architecture names differently. |
915 | # | | 915 | # |
916 | GNU_ARCH.aarch64eb=aarch64_be | | 916 | GNU_ARCH.aarch64eb=aarch64_be |
917 | GNU_ARCH.coldfire=m5407 | | 917 | GNU_ARCH.coldfire=m5407 |
918 | GNU_ARCH.earm=arm | | 918 | GNU_ARCH.earm=arm |
919 | GNU_ARCH.earmhf=arm | | 919 | GNU_ARCH.earmhf=arm |
920 | GNU_ARCH.earmeb=armeb | | 920 | GNU_ARCH.earmeb=armeb |
921 | GNU_ARCH.earmhfeb=armeb | | 921 | GNU_ARCH.earmhfeb=armeb |
922 | GNU_ARCH.earmv4=armv4 | | 922 | GNU_ARCH.earmv4=armv4 |
923 | GNU_ARCH.earmv4eb=armv4eb | | 923 | GNU_ARCH.earmv4eb=armv4eb |
924 | GNU_ARCH.earmv5=arm | | 924 | GNU_ARCH.earmv5=arm |
925 | GNU_ARCH.earmv5hf=arm | | 925 | GNU_ARCH.earmv5hf=arm |
926 | GNU_ARCH.earmv5eb=armeb | | 926 | GNU_ARCH.earmv5eb=armeb |
927 | GNU_ARCH.earmv5hfeb=armeb | | 927 | GNU_ARCH.earmv5hfeb=armeb |
928 | GNU_ARCH.earmv6=armv6 | | 928 | GNU_ARCH.earmv6=armv6 |
929 | GNU_ARCH.earmv6hf=armv6 | | 929 | GNU_ARCH.earmv6hf=armv6 |
930 | GNU_ARCH.earmv6eb=armv6eb | | 930 | GNU_ARCH.earmv6eb=armv6eb |
931 | GNU_ARCH.earmv6hfeb=armv6eb | | 931 | GNU_ARCH.earmv6hfeb=armv6eb |
932 | GNU_ARCH.earmv7=armv7 | | 932 | GNU_ARCH.earmv7=armv7 |
933 | GNU_ARCH.earmv7hf=armv7 | | 933 | GNU_ARCH.earmv7hf=armv7 |
934 | GNU_ARCH.earmv7eb=armv7eb | | 934 | GNU_ARCH.earmv7eb=armv7eb |
935 | GNU_ARCH.earmv7hfeb=armv7eb | | 935 | GNU_ARCH.earmv7hfeb=armv7eb |
936 | GNU_ARCH.i386=i486 | | 936 | GNU_ARCH.i386=i486 |
937 | GCC_CONFIG_ARCH.i386=i486 | | 937 | GCC_CONFIG_ARCH.i386=i486 |
938 | GCC_CONFIG_TUNE.i386=nocona | | 938 | GCC_CONFIG_TUNE.i386=nocona |
939 | GCC_CONFIG_TUNE.x86_64=nocona | | 939 | GCC_CONFIG_TUNE.x86_64=nocona |
940 | GNU_ARCH.m68000=m68010 | | 940 | GNU_ARCH.m68000=m68010 |
941 | GNU_ARCH.sh3eb=sh | | 941 | GNU_ARCH.sh3eb=sh |
942 | GNU_ARCH.sh3el=shle | | 942 | GNU_ARCH.sh3el=shle |
943 | GNU_ARCH.mips64eb=mips64 | | 943 | GNU_ARCH.mips64eb=mips64 |
944 | MACHINE_GNU_ARCH=${GNU_ARCH.${MACHINE_ARCH}:U${MACHINE_ARCH}} | | 944 | MACHINE_GNU_ARCH=${GNU_ARCH.${MACHINE_ARCH}:U${MACHINE_ARCH}} |
945 | | | 945 | |
946 | # | | 946 | # |
947 | # In order to identify NetBSD to GNU packages, we sometimes need | | 947 | # In order to identify NetBSD to GNU packages, we sometimes need |
948 | # an "elf" tag for historically a.out platforms. | | 948 | # an "elf" tag for historically a.out platforms. |
949 | # | | 949 | # |
950 | .if (${MACHINE_ARCH:Mearm*}) | | 950 | .if (${MACHINE_ARCH:Mearm*}) |
951 | MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsdelf-${MACHINE_ARCH:C/eb//:C/v[4-7]//:S/earm/eabi/} | | 951 | MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsdelf-${MACHINE_ARCH:C/eb//:C/v[4-7]//:S/earm/eabi/} |
952 | .elif (${MACHINE_GNU_ARCH} == "arm" || \ | | 952 | .elif (${MACHINE_GNU_ARCH} == "arm" || \ |
953 | ${MACHINE_GNU_ARCH} == "armeb" || \ | | 953 | ${MACHINE_GNU_ARCH} == "armeb" || \ |
954 | ${MACHINE_ARCH} == "i386" || \ | | 954 | ${MACHINE_ARCH} == "i386" || \ |
955 | ${MACHINE_CPU} == "m68k" || \ | | 955 | ${MACHINE_CPU} == "m68k" || \ |
956 | ${MACHINE_GNU_ARCH} == "sh" || \ | | 956 | ${MACHINE_GNU_ARCH} == "sh" || \ |
957 | ${MACHINE_GNU_ARCH} == "shle" || \ | | 957 | ${MACHINE_GNU_ARCH} == "shle" || \ |
958 | ${MACHINE_ARCH} == "sparc" || \ | | 958 | ${MACHINE_ARCH} == "sparc" || \ |
959 | ${MACHINE_ARCH} == "vax") | | 959 | ${MACHINE_ARCH} == "vax") |
960 | MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsdelf | | 960 | MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsdelf |
961 | .else | | 961 | .else |
962 | MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsd | | 962 | MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsd |
963 | .endif | | 963 | .endif |
964 | | | 964 | |
965 | .if ${MACHINE_ARCH:M*arm*} | | 965 | .if ${MACHINE_ARCH:M*arm*} |
966 | # Flags to pass to CC for using the old APCS ABI on ARM for compat or stand. | | 966 | # Flags to pass to CC for using the old APCS ABI on ARM for compat or stand. |
967 | ARM_APCS_FLAGS= -mabi=apcs-gnu -mfloat-abi=soft -marm | | 967 | ARM_APCS_FLAGS= -mabi=apcs-gnu -mfloat-abi=soft -marm |
968 | ARM_APCS_FLAGS+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -mno-thumb-interwork :} | | 968 | ARM_APCS_FLAGS+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -mno-thumb-interwork :} |
969 | ARM_APCS_FLAGS+=${${ACTIVE_CC} == "clang":? -target ${MACHINE_GNU_ARCH}--netbsdelf -B ${TOOLDIR}/${MACHINE_GNU_PLATFORM}/bin :} | | 969 | ARM_APCS_FLAGS+=${${ACTIVE_CC} == "clang":? -target ${MACHINE_GNU_ARCH}--netbsdelf -B ${TOOLDIR}/${MACHINE_GNU_PLATFORM}/bin :} |
970 | .endif | | 970 | .endif |
971 | | | 971 | |
972 | GENASSYM_CPPFLAGS+= ${${ACTIVE_CC} == "clang":? -no-integrated-as :} | | 972 | GENASSYM_CPPFLAGS+= ${${ACTIVE_CC} == "clang":? -no-integrated-as :} |
973 | | | 973 | |
974 | TARGETS+= all clean cleandir depend dependall includes \ | | 974 | TARGETS+= all clean cleandir depend dependall includes \ |
975 | install lint obj regress tags html analyze describe \ | | 975 | install lint obj regress tags html analyze describe \ |
976 | rumpdescribe | | 976 | rumpdescribe |
977 | PHONY_NOTMAIN = all clean cleandir depend dependall distclean includes \ | | 977 | PHONY_NOTMAIN = all clean cleandir depend dependall distclean includes \ |
978 | install lint obj regress beforedepend afterdepend \ | | 978 | install lint obj regress beforedepend afterdepend \ |
979 | beforeinstall afterinstall realinstall realdepend realall \ | | 979 | beforeinstall afterinstall realinstall realdepend realall \ |
980 | html subdir-all subdir-install subdir-depend analyze describe \ | | 980 | html subdir-all subdir-install subdir-depend analyze describe \ |
981 | rumpdescribe | | 981 | rumpdescribe |
982 | .PHONY: ${PHONY_NOTMAIN} | | 982 | .PHONY: ${PHONY_NOTMAIN} |
983 | .NOTMAIN: ${PHONY_NOTMAIN} | | 983 | .NOTMAIN: ${PHONY_NOTMAIN} |
984 | | | 984 | |
985 | .if ${NEED_OWN_INSTALL_TARGET} != "no" | | 985 | .if ${NEED_OWN_INSTALL_TARGET} != "no" |
986 | .if !target(install) | | 986 | .if !target(install) |
987 | install: beforeinstall .WAIT subdir-install realinstall .WAIT afterinstall | | 987 | install: beforeinstall .WAIT subdir-install realinstall .WAIT afterinstall |
988 | beforeinstall: | | 988 | beforeinstall: |
989 | subdir-install: | | 989 | subdir-install: |
990 | realinstall: | | 990 | realinstall: |
991 | afterinstall: | | 991 | afterinstall: |
992 | .endif | | 992 | .endif |
993 | all: realall subdir-all | | 993 | all: realall subdir-all |
994 | subdir-all: | | 994 | subdir-all: |
995 | realall: | | 995 | realall: |
996 | depend: realdepend subdir-depend | | 996 | depend: realdepend subdir-depend |
997 | subdir-depend: | | 997 | subdir-depend: |
998 | realdepend: | | 998 | realdepend: |
999 | distclean: cleandir | | 999 | distclean: cleandir |
1000 | cleandir: clean | | 1000 | cleandir: clean |
1001 | | | 1001 | |
1002 | dependall: .NOTMAIN realdepend .MAKE | | 1002 | dependall: .NOTMAIN realdepend .MAKE |
1003 | @cd "${.CURDIR}"; ${MAKE} realall | | 1003 | @cd "${.CURDIR}"; ${MAKE} realall |
1004 | .endif | | 1004 | .endif |
1005 | | | 1005 | |
1006 | # | | 1006 | # |
1007 | # Define MKxxx variables (which are either yes or no) for users | | 1007 | # Define MKxxx variables (which are either yes or no) for users |
1008 | # to set in /etc/mk.conf and override in the make environment. | | 1008 | # to set in /etc/mk.conf and override in the make environment. |
1009 | # These should be tested with `== "no"' or `!= "no"'. | | 1009 | # These should be tested with `== "no"' or `!= "no"'. |
1010 | # The NOxxx variables should only be set by Makefiles. | | 1010 | # The NOxxx variables should only be set by Makefiles. |
1011 | # | | 1011 | # |
1012 | # Please keep etc/Makefile and share/man/man5/mk.conf.5 in sync | | 1012 | # Please keep etc/Makefile and share/man/man5/mk.conf.5 in sync |
1013 | # with changes to the MK* variables here. | | 1013 | # with changes to the MK* variables here. |
1014 | # | | 1014 | # |
1015 | | | 1015 | |
1016 | # | | 1016 | # |
1017 | # Supported NO* options (if defined, MK* will be forced to "no", | | 1017 | # Supported NO* options (if defined, MK* will be forced to "no", |
1018 | # regardless of user's mk.conf setting). | | 1018 | # regardless of user's mk.conf setting). |
1019 | # | | 1019 | # |
1020 | # Source makefiles should set NO*, and not MK*, and must do so before | | 1020 | # Source makefiles should set NO*, and not MK*, and must do so before |
1021 | # including bsd.own.mk. | | 1021 | # including bsd.own.mk. |
1022 | # | | 1022 | # |
1023 | .for var in \ | | 1023 | .for var in \ |
1024 | NOCOMPAT NOCRYPTO NODOC NOHTML NOINFO NOLIBCSANITIZER NOLINKLIB \ | | 1024 | NOCOMPAT NOCRYPTO NODOC NOHTML NOINFO NOLIBCSANITIZER NOLINKLIB \ |
1025 | NOLINT NOMAN NONLS NOOBJ NOPIC NOPICINSTALL NOPROFILE NOSHARE \ | | 1025 | NOLINT NOMAN NONLS NOOBJ NOPIC NOPICINSTALL NOPROFILE NOSHARE \ |
1026 | NOSTATICLIB NODEBUGLIB NOSANITIZER NORELRO | | 1026 | NOSTATICLIB NODEBUGLIB NOSANITIZER NORELRO |
1027 | .if defined(${var}) | | 1027 | .if defined(${var}) |
1028 | MK${var:S/^NO//}:= no | | 1028 | MK${var:S/^NO//}:= no |
1029 | .endif | | 1029 | .endif |
1030 | .endfor | | 1030 | .endfor |
1031 | | | 1031 | |
1032 | # | | 1032 | # |
1033 | # Older-style variables that enabled behaviour when set. | | 1033 | # Older-style variables that enabled behaviour when set. |
1034 | # | | 1034 | # |
1035 | .for var in MANZ UNPRIVED UPDATE | | 1035 | .for var in MANZ UNPRIVED UPDATE |
1036 | .if defined(${var}) | | 1036 | .if defined(${var}) |
1037 | MK${var}:= yes | | 1037 | MK${var}:= yes |
1038 | .endif | | 1038 | .endif |
1039 | .endfor | | 1039 | .endfor |
1040 | | | 1040 | |
1041 | # | | 1041 | # |
1042 | # MK* options which have variable defaults. | | 1042 | # MK* options which have variable defaults. |
1043 | # | | 1043 | # |
1044 | | | 1044 | |
1045 | # | | 1045 | # |
1046 | # aarch64eb is not yet supported for MKCOMPAT. | | 1046 | # aarch64eb is not yet supported for MKCOMPAT. |
1047 | # | | 1047 | # |
1048 | .if ${MACHINE_ARCH} == "x86_64" || \ | | 1048 | .if ${MACHINE_ARCH} == "x86_64" || \ |
1049 | ${MACHINE_ARCH} == "sparc64" || \ | | 1049 | ${MACHINE_ARCH} == "sparc64" || \ |
1050 | ${MACHINE_MIPS64} || \ | | 1050 | ${MACHINE_MIPS64} || \ |
1051 | ${MACHINE_ARCH} == "powerpc64" || \ | | 1051 | ${MACHINE_ARCH} == "powerpc64" || \ |
1052 | (${MACHINE_ARCH} == "aarch64" && ${HAVE_GCC:U0} == 0) || \ | | 1052 | (${MACHINE_ARCH} == "aarch64" && ${HAVE_GCC:U0} == 0) || \ |
1053 | ${MACHINE_ARCH} == "riscv64" || \ | | 1053 | ${MACHINE_ARCH} == "riscv64" || \ |
1054 | ${MACHINE_ARCH:Mearm*} | | 1054 | ${MACHINE_ARCH:Mearm*} |
1055 | MKCOMPAT?= yes | | 1055 | MKCOMPAT?= yes |
1056 | .else | | 1056 | .else |
1057 | # Don't let this build where it really isn't supported. | | 1057 | # Don't let this build where it really isn't supported. |
1058 | MKCOMPAT:= no | | 1058 | MKCOMPAT:= no |
1059 | .endif | | 1059 | .endif |
1060 | | | 1060 | |
1061 | .if ${MKCOMPAT} == "no" | | 1061 | .if ${MKCOMPAT} == "no" |
1062 | MKCOMPATTESTS:= no | | 1062 | MKCOMPATTESTS:= no |
1063 | MKCOMPATX11:= no | | 1063 | MKCOMPATX11:= no |
1064 | .endif | | 1064 | .endif |
1065 | | | 1065 | |
1066 | .if ${MACHINE_MIPS64} \ | | 1066 | .if ${MACHINE_MIPS64} \ |
1067 | || (${MACHINE} == "evbppc" && ${MACHINE_ARCH} == "powerpc") | | 1067 | || (${MACHINE} == "evbppc" && ${MACHINE_ARCH} == "powerpc") |
1068 | MKCOMPATMODULES?= yes | | 1068 | MKCOMPATMODULES?= yes |
1069 | .else | | 1069 | .else |
1070 | MKCOMPATMODULES:= no | | 1070 | MKCOMPATMODULES:= no |
1071 | .endif | | 1071 | .endif |
1072 | | | 1072 | |
1073 | # | | 1073 | # |
1074 | # These platforms use softfloat by default. | | 1074 | # These platforms use softfloat by default. |
1075 | # | | 1075 | # |
1076 | .if ${MACHINE_MIPS64} | | 1076 | .if ${MACHINE_MIPS64} |
1077 | MKSOFTFLOAT?= yes | | 1077 | MKSOFTFLOAT?= yes |
1078 | .endif | | 1078 | .endif |
1079 | | | 1079 | |
1080 | # | | 1080 | # |
1081 | # These platforms always use softfloat. | | 1081 | # These platforms always use softfloat. |
1082 | # | | 1082 | # |
1083 | .if (${MACHINE_CPU} == "arm" && ${MACHINE_ARCH:M*hf*} == "") || \ | | 1083 | .if (${MACHINE_CPU} == "arm" && ${MACHINE_ARCH:M*hf*} == "") || \ |
1084 | ${MACHINE_ARCH} == "coldfire" || ${MACHINE_CPU} == "or1k" || \ | | 1084 | ${MACHINE_ARCH} == "coldfire" || ${MACHINE_CPU} == "or1k" || \ |
1085 | ${MACHINE} == "emips" || ${MACHINE_CPU} == "sh3" | | 1085 | ${MACHINE} == "emips" || ${MACHINE_CPU} == "sh3" |
1086 | MKSOFTFLOAT= yes | | 1086 | MKSOFTFLOAT= yes |
1087 | .endif | | 1087 | .endif |
1088 | | | 1088 | |
1089 | .if ${MACHINE} == "emips" | | 1089 | .if ${MACHINE} == "emips" |
1090 | SOFTFLOAT_BITS= 32 | | 1090 | SOFTFLOAT_BITS= 32 |
1091 | .endif | | 1091 | .endif |
1092 | | | 1092 | |
1093 | # | | 1093 | # |
1094 | # We want to build zfs only for amd64, aarch64 and sparc64 by default for now. | | 1094 | # We want to build zfs only for amd64, aarch64 and sparc64 by default for now. |
1095 | # | | 1095 | # |
1096 | .if ${MACHINE} == "amd64" || \ | | 1096 | .if ${MACHINE} == "amd64" || \ |
1097 | ${MACHINE} == "sparc64" || \ | | 1097 | ${MACHINE} == "sparc64" || \ |
1098 | ${MACHINE_ARCH:Maarch64*} | | 1098 | ${MACHINE_ARCH:Maarch64*} |
1099 | MKZFS?= yes | | 1099 | MKZFS?= yes |
1100 | .endif | | 1100 | .endif |
1101 | | | 1101 | |
1102 | # | | 1102 | # |
1103 | # DTrace works on amd64, i386, aarch64, and earm* | | 1103 | # DTrace works on amd64, i386, aarch64, and earm* |
1104 | # | | 1104 | # |
1105 | .if ${MACHINE} == "i386" || \ | | 1105 | .if ${MACHINE} == "i386" || \ |
1106 | ${MACHINE} == "amd64" || \ | | 1106 | ${MACHINE} == "amd64" || \ |
1107 | ${MACHINE_ARCH} == "aarch64" || \ | | 1107 | ${MACHINE_ARCH} == "aarch64" || \ |
1108 | ${MACHINE_ARCH:Mearm*} | | 1108 | ${MACHINE_ARCH:Mearm*} |
1109 | MKDTRACE?= yes | | 1109 | MKDTRACE?= yes |
1110 | MKCTF?= yes | | 1110 | MKCTF?= yes |
1111 | .endif | | 1111 | .endif |
1112 | | | 1112 | |
1113 | # | | 1113 | # |
1114 | # PIE is enabled on many platforms by default. | | 1114 | # PIE is enabled on many platforms by default. |
1115 | # | | 1115 | # |
1116 | # Coverity does not like PIE | | 1116 | # Coverity does not like PIE |
1117 | .if !defined(COVERITY_TOP_CONFIG) && \ | | 1117 | .if !defined(COVERITY_TOP_CONFIG) && \ |
1118 | (${MACHINE_ARCH} == "i386" || \ | | 1118 | (${MACHINE_ARCH} == "i386" || \ |
1119 | ${MACHINE_ARCH} == "x86_64" || \ | | 1119 | ${MACHINE_ARCH} == "x86_64" || \ |
1120 | ${MACHINE_ARCH:Maarch64*} || \ | | 1120 | ${MACHINE_ARCH:Maarch64*} || \ |
1121 | ${MACHINE_CPU} == "arm" || \ | | 1121 | ${MACHINE_CPU} == "arm" || \ |
1122 | ${MACHINE_CPU} == "m68k" || \ | | 1122 | ${MACHINE_CPU} == "m68k" || \ |
1123 | ${MACHINE_CPU} == "mips" || \ | | 1123 | ${MACHINE_CPU} == "mips" || \ |
1124 | ${MACHINE_CPU} == "sh3" || \ | | 1124 | ${MACHINE_CPU} == "sh3" || \ |
1125 | ${MACHINE} == "sparc64") | | 1125 | ${MACHINE} == "sparc64") |
1126 | MKPIE?= yes | | 1126 | MKPIE?= yes |
1127 | .else | | 1127 | .else |
1128 | MKPIE?= no | | 1128 | MKPIE?= no |
1129 | .endif | | 1129 | .endif |
1130 | | | 1130 | |
1131 | # | | 1131 | # |
1132 | # RELRO is enabled on i386, amd64, and aarch64 by default | | 1132 | # RELRO is enabled on i386, amd64, and aarch64 by default |
1133 | # | | 1133 | # |
1134 | .if ${MACHINE} == "i386" || \ | | 1134 | .if ${MACHINE} == "i386" || \ |