Tue Apr 18 20:11:34 2023 UTC ()
switch everyone to openssl.old


(christos)
diff -r1.1309 -r1.1310 src/share/mk/bsd.own.mk

cvs diff -r1.1309 -r1.1310 src/share/mk/bsd.own.mk (switch to unified diff)

--- src/share/mk/bsd.own.mk 2023/04/02 15:06:06 1.1309
+++ src/share/mk/bsd.own.mk 2023/04/18 20:11:34 1.1310
@@ -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
11MAKECONF?= /etc/mk.conf 11MAKECONF?= /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#
17MACHINE_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/} 17MACHINE_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")
23MACHINE_MIPS64= 1 23MACHINE_MIPS64= 1
24.else 24.else
25MACHINE_MIPS64= 0 25MACHINE_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}
33RELEASEMACHINEDIR?= ${MACHINE}-${MACHINE_ARCH} 33RELEASEMACHINEDIR?= ${MACHINE}-${MACHINE_ARCH}
34.else 34.else
35RELEASEMACHINEDIR?= ${MACHINE} 35RELEASEMACHINEDIR?= ${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#
45RELEASEMACHINE?= ${MACHINE} 45RELEASEMACHINE?= ${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#
52NEED_OWN_INSTALL_TARGET?= yes 52NEED_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
65TOOLCHAIN_MISSING?= no 65TOOLCHAIN_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#
75HAVE_GCC?= 10 75HAVE_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"
80MKGCCCMDS?= no 80MKGCCCMDS?= 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
88EXTERNAL_GCC_SUBDIR?= gcc.old 88EXTERNAL_GCC_SUBDIR?= gcc.old
89.elif ${HAVE_GCC} == 11 89.elif ${HAVE_GCC} == 11
90EXTERNAL_GCC_SUBDIR?= gcc 90EXTERNAL_GCC_SUBDIR?= gcc
91.else 91.else
92EXTERNAL_GCC_SUBDIR?= /does/not/exist 92EXTERNAL_GCC_SUBDIR?= /does/not/exist
93.endif 93.endif
94.else 94.else
95MKGCCCMDS?= no 95MKGCCCMDS?= 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"
102HAVE_BINUTILS?= 239 102HAVE_BINUTILS?= 239
103.else 103.else
104HAVE_BINUTILS?= 234 104HAVE_BINUTILS?= 234
105.endif 105.endif
106 106
107.if ${HAVE_BINUTILS} == 239 107.if ${HAVE_BINUTILS} == 239
108EXTERNAL_BINUTILS_SUBDIR= binutils 108EXTERNAL_BINUTILS_SUBDIR= binutils
109.elif ${HAVE_BINUTILS} == 234 109.elif ${HAVE_BINUTILS} == 234
110EXTERNAL_BINUTILS_SUBDIR= binutils.old 110EXTERNAL_BINUTILS_SUBDIR= binutils.old
111.else 111.else
112EXTERNAL_BINUTILS_SUBDIR= /does/not/exist 112EXTERNAL_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#
118HAVE_GDB?= 1100 118HAVE_GDB?= 1100
119 119
120.if ${HAVE_GDB} == 1310 120.if ${HAVE_GDB} == 1310
121EXTERNAL_GDB_SUBDIR= gdb 121EXTERNAL_GDB_SUBDIR= gdb
122.elif ${HAVE_GDB} == 1100 122.elif ${HAVE_GDB} == 1100
123EXTERNAL_GDB_SUBDIR= gdb.old 123EXTERNAL_GDB_SUBDIR= gdb.old
124.else 124.else
125EXTERNAL_GDB_SUBDIR= /does/not/exist 125EXTERNAL_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#
131HAVE_OPENSSL?= 11 131HAVE_OPENSSL?= 11
132 132
133.if ${HAVE_OPENSSL} == 11 133.if ${HAVE_OPENSSL} == 30
134EXTERNAL_OPENSSL_SUBDIR=openssl 134EXTERNAL_OPENSSL_SUBDIR=openssl
135.elif ${HAVE_OPENSSL} == 10 135.elif ${HAVE_OPENSSL} == 11
136EXTERNAL_OPENSSL_SUBDIR=openssl.old 136EXTERNAL_OPENSSL_SUBDIR=openssl.old
137.else 137.else
138EXTERNAL_OPENSSL_SUBDIR=/does/not/exist 138EXTERNAL_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*}
148HAVE_ACPI= yes 148HAVE_ACPI= yes
149.else 149.else
150HAVE_ACPI= no 150HAVE_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"
162HAVE_UEFI= yes 162HAVE_UEFI= yes
163.else 163.else
164HAVE_UEFI= no 164HAVE_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"
171HAVE_NVMM= yes 171HAVE_NVMM= yes
172.else 172.else
173HAVE_NVMM= no 173HAVE_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"
191HAVE_LIBGCC?= no 191HAVE_LIBGCC?= no
192.else 192.else
193HAVE_LIBGCC?= yes 193HAVE_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*}
199HAVE_LIBGCC_EH?= no 199HAVE_LIBGCC_EH?= no
200.else 200.else
201HAVE_LIBGCC_EH?= yes 201HAVE_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"
210HAVE_SSP?= no 210HAVE_SSP?= no
211.else 211.else
212HAVE_SSP?= yes 212HAVE_SSP?= yes
213.if !defined(NOFORT) && ${USE_FORT:Uno} != "no" 213.if !defined(NOFORT) && ${USE_FORT:Uno} != "no"
214USE_SSP?= yes 214USE_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"
223HAVE_JEMALLOC?= 100 223HAVE_JEMALLOC?= 100
224.else 224.else
225HAVE_JEMALLOC?= 510 225HAVE_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)
230PRINTOBJDIR= ${MAKE} -r -V .OBJDIR -f /dev/null xxx 230PRINTOBJDIR= ${MAKE} -r -V .OBJDIR -f /dev/null xxx
231.else 231.else
232PRINTOBJDIR= ${MAKE} -V .OBJDIR 232PRINTOBJDIR= ${MAKE} -V .OBJDIR
233.endif 233.endif
234.else 234.else
235PRINTOBJDIR= echo /error/bsd.own.mk/PRINTOBJDIR # avoid infinite recursion 235PRINTOBJDIR= 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
263NETBSDSRCDIR?= ${_SRC_TOP_} 263NETBSDSRCDIR?= ${_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))
281USETOOLS?= yes 281USETOOLS?= yes
282.endif 282.endif
283USETOOLS?= no 283USETOOLS?= 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)
310TOOLDIR:= ${_SRC_TOP_OBJ_}/tooldir.${HOST_OSTYPE} 310TOOLDIR:= ${_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) # {
323AR= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ar 323AR= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ar
324AS= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-as 324AS= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-as
325LD= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ld 325LD= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ld
326NM= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-nm 326NM= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-nm
327OBJCOPY= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objcopy 327OBJCOPY= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objcopy
328OBJDUMP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objdump 328OBJDUMP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objdump
329RANLIB= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ranlib 329RANLIB= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ranlib
330READELF= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-readelf 330READELF= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-readelf
331SIZE= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-size 331SIZE= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-size
332STRINGS= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-strings 332STRINGS= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-strings
333STRIP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-strip 333STRIP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-strip
334 334
335TOOL_CC.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc 335TOOL_CC.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc
336TOOL_CPP.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-cpp 336TOOL_CPP.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-cpp
337TOOL_CXX.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-c++ 337TOOL_CXX.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-c++
338TOOL_FC.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gfortran 338TOOL_FC.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gfortran
339TOOL_OBJC.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc 339TOOL_OBJC.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc
340 340
341TOOL_CC.clang= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang 341TOOL_CC.clang= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang
342TOOL_CPP.clang= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang-cpp 342TOOL_CPP.clang= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang-cpp
343TOOL_CXX.clang= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang++ 343TOOL_CXX.clang= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang++
344TOOL_OBJC.clang= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang 344TOOL_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" # {
348AR= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ar 348AR= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ar
349AS= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-as 349AS= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-as
350LD= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ld 350LD= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ld
351NM= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-nm 351NM= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-nm
352OBJCOPY= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-objcopy 352OBJCOPY= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-objcopy
353OBJDUMP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-objdump 353OBJDUMP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-objdump
354RANLIB= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ranlib 354RANLIB= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ranlib
355READELF= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-readelf 355READELF= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-readelf
356SIZE= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-size 356SIZE= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-size
357STRINGS= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-strings 357STRINGS= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-strings
358STRIP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-strip 358STRIP= ${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
361TOOL_CC.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc 361TOOL_CC.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc
362TOOL_CPP.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-cpp 362TOOL_CPP.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-cpp
363TOOL_CXX.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-c++ 363TOOL_CXX.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-c++
364TOOL_FC.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gfortran 364TOOL_FC.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gfortran
365TOOL_OBJC.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc 365TOOL_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
369TOOL_CC.clang= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang 369TOOL_CC.clang= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang
370TOOL_CPP.clang= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang-cpp 370TOOL_CPP.clang= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang-cpp
371TOOL_CXX.clang= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang++ 371TOOL_CXX.clang= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang++
372TOOL_OBJC.clang= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang 372TOOL_OBJC.clang= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang
373 373
374# PCC supports C and Fortran 374# PCC supports C and Fortran
375TOOL_CC.pcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-pcc 375TOOL_CC.pcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-pcc
376TOOL_CPP.pcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-pcpp 376TOOL_CPP.pcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-pcpp
377TOOL_CXX.pcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-p++ 377TOOL_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#
385DESTDIR?= 385DESTDIR?=
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=*)
394CPPFLAGS+= --sysroot=${DESTDIR} 394CPPFLAGS+= --sysroot=${DESTDIR}
395. endif 395. endif
396LDFLAGS+= --sysroot=${DESTDIR} 396LDFLAGS+= --sysroot=${DESTDIR}
397. else 397. else
398. if empty(CPPFLAGS:M*--sysroot=*) 398. if empty(CPPFLAGS:M*--sysroot=*)
399CPPFLAGS+= --sysroot=/ 399CPPFLAGS+= --sysroot=/
400. endif 400. endif
401LDFLAGS+= --sysroot=/ 401LDFLAGS+= --sysroot=/
402. endif 402. endif
403.endif 403.endif
404 404
405DBSYM= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-dbsym 405DBSYM= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-dbsym
406ARM_ELF2AOUT= ${TOOLDIR}/bin/${_TOOL_PREFIX}arm-elf2aout 406ARM_ELF2AOUT= ${TOOLDIR}/bin/${_TOOL_PREFIX}arm-elf2aout
407M68K_ELF2AOUT= ${TOOLDIR}/bin/${_TOOL_PREFIX}m68k-elf2aout 407M68K_ELF2AOUT= ${TOOLDIR}/bin/${_TOOL_PREFIX}m68k-elf2aout
408MIPS_ELF2ECOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}mips-elf2ecoff 408MIPS_ELF2ECOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}mips-elf2ecoff
409INSTALL= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-install 409INSTALL= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-install
410LEX= ${TOOLDIR}/bin/${_TOOL_PREFIX}lex 410LEX= ${TOOLDIR}/bin/${_TOOL_PREFIX}lex
411LINT= CC=${CC:Q} ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-lint 411LINT= CC=${CC:Q} ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-lint
412LORDER= NM=${NM:Q} MKTEMP=${TOOL_MKTEMP:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}lorder 412LORDER= NM=${NM:Q} MKTEMP=${TOOL_MKTEMP:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}lorder
413MKDEP= CC=${CC:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}mkdep 413MKDEP= CC=${CC:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}mkdep
414MKDEPCXX= CC=${CXX:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}mkdep 414MKDEPCXX= CC=${CXX:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}mkdep
415PAXCTL= ${TOOLDIR}/bin/${_TOOL_PREFIX}paxctl 415PAXCTL= ${TOOLDIR}/bin/${_TOOL_PREFIX}paxctl
416TSORT= ${TOOLDIR}/bin/${_TOOL_PREFIX}tsort -q 416TSORT= ${TOOLDIR}/bin/${_TOOL_PREFIX}tsort -q
417YACC= ${TOOLDIR}/bin/${_TOOL_PREFIX}yacc 417YACC= ${TOOLDIR}/bin/${_TOOL_PREFIX}yacc
418 418
419TOOL_AMIGAAOUT2BB= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-aout2bb 419TOOL_AMIGAAOUT2BB= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-aout2bb
420TOOL_AMIGAELF2BB= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-elf2bb 420TOOL_AMIGAELF2BB= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-elf2bb
421TOOL_AMIGATXLT= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-txlt 421TOOL_AMIGATXLT= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-txlt
422TOOL_ASN1_COMPILE= ${TOOLDIR}/bin/${_TOOL_PREFIX}asn1_compile 422TOOL_ASN1_COMPILE= ${TOOLDIR}/bin/${_TOOL_PREFIX}asn1_compile
423TOOL_AWK= ${TOOLDIR}/bin/${_TOOL_PREFIX}awk 423TOOL_AWK= ${TOOLDIR}/bin/${_TOOL_PREFIX}awk
424TOOL_CAP_MKDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}cap_mkdb 424TOOL_CAP_MKDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}cap_mkdb
425TOOL_CAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}cat 425TOOL_CAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}cat
426TOOL_CKSUM= ${TOOLDIR}/bin/${_TOOL_PREFIX}cksum 426TOOL_CKSUM= ${TOOLDIR}/bin/${_TOOL_PREFIX}cksum
427TOOL_CLANG_TBLGEN= ${TOOLDIR}/bin/${_TOOL_PREFIX}clang-tblgen 427TOOL_CLANG_TBLGEN= ${TOOLDIR}/bin/${_TOOL_PREFIX}clang-tblgen
428TOOL_COMPILE_ET= ${TOOLDIR}/bin/${_TOOL_PREFIX}compile_et 428TOOL_COMPILE_ET= ${TOOLDIR}/bin/${_TOOL_PREFIX}compile_et
429TOOL_CONFIG= ${TOOLDIR}/bin/${_TOOL_PREFIX}config 429TOOL_CONFIG= ${TOOLDIR}/bin/${_TOOL_PREFIX}config
430TOOL_CRUNCHGEN= MAKE=${.MAKE:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}crunchgen 430TOOL_CRUNCHGEN= MAKE=${.MAKE:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}crunchgen
431TOOL_CTAGS= ${TOOLDIR}/bin/${_TOOL_PREFIX}ctags 431TOOL_CTAGS= ${TOOLDIR}/bin/${_TOOL_PREFIX}ctags
432TOOL_CTFCONVERT= ${TOOLDIR}/bin/${_TOOL_PREFIX}ctfconvert 432TOOL_CTFCONVERT= ${TOOLDIR}/bin/${_TOOL_PREFIX}ctfconvert
433TOOL_CTFMERGE= ${TOOLDIR}/bin/${_TOOL_PREFIX}ctfmerge 433TOOL_CTFMERGE= ${TOOLDIR}/bin/${_TOOL_PREFIX}ctfmerge
434TOOL_CVSLATEST= ${TOOLDIR}/bin/${_TOOL_PREFIX}cvslatest 434TOOL_CVSLATEST= ${TOOLDIR}/bin/${_TOOL_PREFIX}cvslatest
435TOOL_DATE= ${TOOLDIR}/bin/${_TOOL_PREFIX}date 435TOOL_DATE= ${TOOLDIR}/bin/${_TOOL_PREFIX}date
436TOOL_DB= ${TOOLDIR}/bin/${_TOOL_PREFIX}db 436TOOL_DB= ${TOOLDIR}/bin/${_TOOL_PREFIX}db
437TOOL_DISKLABEL= ${TOOLDIR}/bin/${_TOOL_PREFIX}disklabel 437TOOL_DISKLABEL= ${TOOLDIR}/bin/${_TOOL_PREFIX}disklabel
438TOOL_DTC= ${TOOLDIR}/bin/${_TOOL_PREFIX}dtc 438TOOL_DTC= ${TOOLDIR}/bin/${_TOOL_PREFIX}dtc
439TOOL_EQN= ${TOOLDIR}/bin/${_TOOL_PREFIX}eqn 439TOOL_EQN= ${TOOLDIR}/bin/${_TOOL_PREFIX}eqn
440TOOL_FDISK= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-fdisk 440TOOL_FDISK= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-fdisk
441TOOL_FGEN= ${TOOLDIR}/bin/${_TOOL_PREFIX}fgen 441TOOL_FGEN= ${TOOLDIR}/bin/${_TOOL_PREFIX}fgen
442TOOL_GENASSYM= ${TOOLDIR}/bin/${_TOOL_PREFIX}genassym 442TOOL_GENASSYM= ${TOOLDIR}/bin/${_TOOL_PREFIX}genassym
443TOOL_GENCAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}gencat 443TOOL_GENCAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}gencat
444TOOL_GMAKE= ${TOOLDIR}/bin/${_TOOL_PREFIX}gmake 444TOOL_GMAKE= ${TOOLDIR}/bin/${_TOOL_PREFIX}gmake
445TOOL_GPT= ${TOOLDIR}/bin/${_TOOL_PREFIX}gpt 445TOOL_GPT= ${TOOLDIR}/bin/${_TOOL_PREFIX}gpt
446TOOL_GREP= ${TOOLDIR}/bin/${_TOOL_PREFIX}grep 446TOOL_GREP= ${TOOLDIR}/bin/${_TOOL_PREFIX}grep
447GROFF_SHARE_PATH= ${TOOLDIR}/share/groff 447GROFF_SHARE_PATH= ${TOOLDIR}/share/groff
448TOOL_GROFF_ENV= \ 448TOOL_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
453TOOL_GROFF= ${TOOL_GROFF_ENV} ${TOOLDIR}/bin/${_TOOL_PREFIX}groff ${GROFF_FLAGS} 453TOOL_GROFF= ${TOOL_GROFF_ENV} ${TOOLDIR}/bin/${_TOOL_PREFIX}groff ${GROFF_FLAGS}
454 454
455TOOL_HEXDUMP= ${TOOLDIR}/bin/${_TOOL_PREFIX}hexdump 455TOOL_HEXDUMP= ${TOOLDIR}/bin/${_TOOL_PREFIX}hexdump
456TOOL_HP300MKBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}hp300-mkboot 456TOOL_HP300MKBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}hp300-mkboot
457TOOL_HPPAMKBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}hppa-mkboot 457TOOL_HPPAMKBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}hppa-mkboot
458TOOL_INDXBIB= ${TOOLDIR}/bin/${_TOOL_PREFIX}indxbib 458TOOL_INDXBIB= ${TOOLDIR}/bin/${_TOOL_PREFIX}indxbib
459TOOL_INSTALLBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}installboot 459TOOL_INSTALLBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}installboot
460TOOL_INSTALL_INFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}install-info 460TOOL_INSTALL_INFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}install-info
461TOOL_JOIN= ${TOOLDIR}/bin/${_TOOL_PREFIX}join 461TOOL_JOIN= ${TOOLDIR}/bin/${_TOOL_PREFIX}join
462TOOL_LLVM_TBLGEN= ${TOOLDIR}/bin/${_TOOL_PREFIX}llvm-tblgen 462TOOL_LLVM_TBLGEN= ${TOOLDIR}/bin/${_TOOL_PREFIX}llvm-tblgen
463TOOL_M4= ${TOOLDIR}/bin/${_TOOL_PREFIX}m4 463TOOL_M4= ${TOOLDIR}/bin/${_TOOL_PREFIX}m4
464TOOL_MACPPCFIXCOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}macppc-fixcoff 464TOOL_MACPPCFIXCOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}macppc-fixcoff
465TOOL_MAKEFS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makefs 465TOOL_MAKEFS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makefs
466TOOL_MAKEINFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}makeinfo 466TOOL_MAKEINFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}makeinfo
467TOOL_MAKEKEYS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makekeys 467TOOL_MAKEKEYS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makekeys
468TOOL_MAKESTRS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makestrs 468TOOL_MAKESTRS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makestrs
469TOOL_MAKEWHATIS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makewhatis 469TOOL_MAKEWHATIS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makewhatis
470TOOL_MANDOC_ASCII= ${TOOLDIR}/bin/${_TOOL_PREFIX}mandoc -Tascii 470TOOL_MANDOC_ASCII= ${TOOLDIR}/bin/${_TOOL_PREFIX}mandoc -Tascii
471TOOL_MANDOC_HTML= ${TOOLDIR}/bin/${_TOOL_PREFIX}mandoc -Thtml 471TOOL_MANDOC_HTML= ${TOOLDIR}/bin/${_TOOL_PREFIX}mandoc -Thtml
472TOOL_MANDOC_LINT= ${TOOLDIR}/bin/${_TOOL_PREFIX}mandoc -Tlint 472TOOL_MANDOC_LINT= ${TOOLDIR}/bin/${_TOOL_PREFIX}mandoc -Tlint
473TOOL_MDSETIMAGE= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-mdsetimage 473TOOL_MDSETIMAGE= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-mdsetimage
474TOOL_MENUC= MENUDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}menuc 474TOOL_MENUC= MENUDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}menuc
475TOOL_ARMELF2AOUT= ${TOOLDIR}/bin/${_TOOL_PREFIX}arm-elf2aout 475TOOL_ARMELF2AOUT= ${TOOLDIR}/bin/${_TOOL_PREFIX}arm-elf2aout
476TOOL_M68KELF2AOUT= ${TOOLDIR}/bin/${_TOOL_PREFIX}m68k-elf2aout 476TOOL_M68KELF2AOUT= ${TOOLDIR}/bin/${_TOOL_PREFIX}m68k-elf2aout
477TOOL_MIPSELF2ECOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}mips-elf2ecoff 477TOOL_MIPSELF2ECOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}mips-elf2ecoff
478TOOL_MKCSMAPPER= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkcsmapper 478TOOL_MKCSMAPPER= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkcsmapper
479TOOL_MKESDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkesdb 479TOOL_MKESDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkesdb
480TOOL_MKLOCALE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mklocale 480TOOL_MKLOCALE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mklocale
481TOOL_MKMAGIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}file 481TOOL_MKMAGIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}file
482TOOL_MKNOD= ${TOOLDIR}/bin/${_TOOL_PREFIX}mknod 482TOOL_MKNOD= ${TOOLDIR}/bin/${_TOOL_PREFIX}mknod
483TOOL_MKTEMP= ${TOOLDIR}/bin/${_TOOL_PREFIX}mktemp 483TOOL_MKTEMP= ${TOOLDIR}/bin/${_TOOL_PREFIX}mktemp
484TOOL_MKUBOOTIMAGE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkubootimage 484TOOL_MKUBOOTIMAGE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkubootimage
485TOOL_ELFTOSB= ${TOOLDIR}/bin/${_TOOL_PREFIX}elftosb 485TOOL_ELFTOSB= ${TOOLDIR}/bin/${_TOOL_PREFIX}elftosb
486TOOL_MSGC= MSGDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}msgc 486TOOL_MSGC= MSGDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}msgc
487TOOL_MTREE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mtree 487TOOL_MTREE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mtree
488TOOL_MVME68KWRTVID= ${TOOLDIR}/bin/${_TOOL_PREFIX}mvme68k-wrtvid 488TOOL_MVME68KWRTVID= ${TOOLDIR}/bin/${_TOOL_PREFIX}mvme68k-wrtvid
489TOOL_NBPERF= ${TOOLDIR}/bin/${_TOOL_PREFIX}perf 489TOOL_NBPERF= ${TOOLDIR}/bin/${_TOOL_PREFIX}perf
490TOOL_NCDCS= ${TOOLDIR}/bin/${_TOOL_PREFIX}ibmnws-ncdcs 490TOOL_NCDCS= ${TOOLDIR}/bin/${_TOOL_PREFIX}ibmnws-ncdcs
491TOOL_PAX= ${TOOLDIR}/bin/${_TOOL_PREFIX}pax 491TOOL_PAX= ${TOOLDIR}/bin/${_TOOL_PREFIX}pax
492TOOL_PIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}pic 492TOOL_PIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}pic
493TOOL_PIGZ= ${TOOLDIR}/bin/${_TOOL_PREFIX}pigz 493TOOL_PIGZ= ${TOOLDIR}/bin/${_TOOL_PREFIX}pigz
494TOOL_XZ= ${TOOLDIR}/bin/${_TOOL_PREFIX}xz 494TOOL_XZ= ${TOOLDIR}/bin/${_TOOL_PREFIX}xz
495TOOL_PKG_CREATE= ${TOOLDIR}/bin/${_TOOL_PREFIX}pkg_create 495TOOL_PKG_CREATE= ${TOOLDIR}/bin/${_TOOL_PREFIX}pkg_create
496TOOL_POWERPCMKBOOTIMAGE=${TOOLDIR}/bin/${_TOOL_PREFIX}powerpc-mkbootimage 496TOOL_POWERPCMKBOOTIMAGE=${TOOLDIR}/bin/${_TOOL_PREFIX}powerpc-mkbootimage
497TOOL_PWD_MKDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}pwd_mkdb 497TOOL_PWD_MKDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}pwd_mkdb
498TOOL_REFER= ${TOOLDIR}/bin/${_TOOL_PREFIX}refer 498TOOL_REFER= ${TOOLDIR}/bin/${_TOOL_PREFIX}refer
499TOOL_ROFF_ASCII= ${TOOL_GROFF_ENV} ${TOOLDIR}/bin/${_TOOL_PREFIX}nroff 499TOOL_ROFF_ASCII= ${TOOL_GROFF_ENV} ${TOOLDIR}/bin/${_TOOL_PREFIX}nroff
500TOOL_ROFF_DOCASCII= ${TOOL_GROFF} -Tascii 500TOOL_ROFF_DOCASCII= ${TOOL_GROFF} -Tascii
501TOOL_ROFF_DOCHTML= ${TOOL_GROFF} -Thtml 501TOOL_ROFF_DOCHTML= ${TOOL_GROFF} -Thtml
502TOOL_ROFF_DVI= ${TOOL_GROFF} -Tdvi ${ROFF_PAGESIZE} 502TOOL_ROFF_DVI= ${TOOL_GROFF} -Tdvi ${ROFF_PAGESIZE}
503TOOL_ROFF_HTML= ${TOOL_GROFF} -Tlatin1 -mdoc2html 503TOOL_ROFF_HTML= ${TOOL_GROFF} -Tlatin1 -mdoc2html
504TOOL_ROFF_PS= ${TOOL_GROFF} -Tps ${ROFF_PAGESIZE} 504TOOL_ROFF_PS= ${TOOL_GROFF} -Tps ${ROFF_PAGESIZE}
505TOOL_ROFF_RAW= ${TOOL_GROFF} -Z 505TOOL_ROFF_RAW= ${TOOL_GROFF} -Z
506TOOL_RPCGEN= RPCGEN_CPP=${CPP:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}rpcgen 506TOOL_RPCGEN= RPCGEN_CPP=${CPP:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}rpcgen
507TOOL_SED= ${TOOLDIR}/bin/${_TOOL_PREFIX}sed 507TOOL_SED= ${TOOLDIR}/bin/${_TOOL_PREFIX}sed
508TOOL_SLC= ${TOOLDIR}/bin/${_TOOL_PREFIX}slc 508TOOL_SLC= ${TOOLDIR}/bin/${_TOOL_PREFIX}slc
509TOOL_SOELIM= ${TOOLDIR}/bin/${_TOOL_PREFIX}soelim 509TOOL_SOELIM= ${TOOLDIR}/bin/${_TOOL_PREFIX}soelim
510TOOL_SORTINFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}sortinfo 510TOOL_SORTINFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}sortinfo
511TOOL_SPARKCRC= ${TOOLDIR}/bin/${_TOOL_PREFIX}sparkcrc 511TOOL_SPARKCRC= ${TOOLDIR}/bin/${_TOOL_PREFIX}sparkcrc
512TOOL_STAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}stat 512TOOL_STAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}stat
513TOOL_STRFILE= ${TOOLDIR}/bin/${_TOOL_PREFIX}strfile 513TOOL_STRFILE= ${TOOLDIR}/bin/${_TOOL_PREFIX}strfile
514TOOL_SUNLABEL= ${TOOLDIR}/bin/${_TOOL_PREFIX}sunlabel 514TOOL_SUNLABEL= ${TOOLDIR}/bin/${_TOOL_PREFIX}sunlabel
515TOOL_TBL= ${TOOLDIR}/bin/${_TOOL_PREFIX}tbl 515TOOL_TBL= ${TOOLDIR}/bin/${_TOOL_PREFIX}tbl
516TOOL_TIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}tic 516TOOL_TIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}tic
517TOOL_UUDECODE= ${TOOLDIR}/bin/${_TOOL_PREFIX}uudecode 517TOOL_UUDECODE= ${TOOLDIR}/bin/${_TOOL_PREFIX}uudecode
518TOOL_VGRIND= ${TOOLDIR}/bin/${_TOOL_PREFIX}vgrind -f 518TOOL_VGRIND= ${TOOLDIR}/bin/${_TOOL_PREFIX}vgrind -f
519TOOL_VFONTEDPR= ${TOOLDIR}/libexec/${_TOOL_PREFIX}vfontedpr 519TOOL_VFONTEDPR= ${TOOLDIR}/libexec/${_TOOL_PREFIX}vfontedpr
520TOOL_ZIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}zic 520TOOL_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
525TOOL_CC.clang= clang 525TOOL_CC.clang= clang
526TOOL_CPP.clang= clang-cpp 526TOOL_CPP.clang= clang-cpp
527TOOL_CXX.clang= clang++ 527TOOL_CXX.clang= clang++
528TOOL_OBJC.clang= clang 528TOOL_OBJC.clang= clang
529 529
530# GCC supports C, C++, Fortran and Objective C 530# GCC supports C, C++, Fortran and Objective C
531TOOL_CC.gcc= gcc 531TOOL_CC.gcc= gcc
532TOOL_CPP.gcc= cpp 532TOOL_CPP.gcc= cpp
533TOOL_CXX.gcc= c++ 533TOOL_CXX.gcc= c++
534TOOL_FC.gcc= gfortran 534TOOL_FC.gcc= gfortran
535TOOL_OBJC.gcc= gcc 535TOOL_OBJC.gcc= gcc
536 536
537# PCC supports C and Fortran 537# PCC supports C and Fortran
538TOOL_CC.pcc= pcc 538TOOL_CC.pcc= pcc
539TOOL_CPP.pcc= pcpp 539TOOL_CPP.pcc= pcpp
540TOOL_CXX.pcc= p++ 540TOOL_CXX.pcc= p++
541 541
542TOOL_AMIGAAOUT2BB= amiga-aout2bb 542TOOL_AMIGAAOUT2BB= amiga-aout2bb
543TOOL_AMIGAELF2BB= amiga-elf2bb 543TOOL_AMIGAELF2BB= amiga-elf2bb
544TOOL_AMIGATXLT= amiga-txlt 544TOOL_AMIGATXLT= amiga-txlt
545TOOL_ASN1_COMPILE= asn1_compile 545TOOL_ASN1_COMPILE= asn1_compile
546TOOL_AWK= awk 546TOOL_AWK= awk
547TOOL_CAP_MKDB= cap_mkdb 547TOOL_CAP_MKDB= cap_mkdb
548TOOL_CAT= cat 548TOOL_CAT= cat
549TOOL_CKSUM= cksum 549TOOL_CKSUM= cksum
550TOOL_CLANG_TBLGEN= clang-tblgen 550TOOL_CLANG_TBLGEN= clang-tblgen
551TOOL_COMPILE_ET= compile_et 551TOOL_COMPILE_ET= compile_et
552TOOL_CONFIG= config 552TOOL_CONFIG= config
553TOOL_CRUNCHGEN= crunchgen 553TOOL_CRUNCHGEN= crunchgen
554TOOL_CTAGS= ctags 554TOOL_CTAGS= ctags
555TOOL_CTFCONVERT= ctfconvert 555TOOL_CTFCONVERT= ctfconvert
556TOOL_CTFMERGE= ctfmerge 556TOOL_CTFMERGE= ctfmerge
557TOOL_CVSLATEST= cvslatest 557TOOL_CVSLATEST= cvslatest
558TOOL_DATE= date 558TOOL_DATE= date
559TOOL_DB= db 559TOOL_DB= db
560TOOL_DISKLABEL= disklabel 560TOOL_DISKLABEL= disklabel
561TOOL_DTC= dtc 561TOOL_DTC= dtc
562TOOL_EQN= eqn 562TOOL_EQN= eqn
563TOOL_FDISK= fdisk 563TOOL_FDISK= fdisk
564TOOL_FGEN= fgen 564TOOL_FGEN= fgen
565TOOL_GENASSYM= genassym 565TOOL_GENASSYM= genassym
566TOOL_GENCAT= gencat 566TOOL_GENCAT= gencat
567TOOL_GMAKE= gmake 567TOOL_GMAKE= gmake
568TOOL_GPT= gpt 568TOOL_GPT= gpt
569TOOL_GREP= grep 569TOOL_GREP= grep
570TOOL_GROFF= groff 570TOOL_GROFF= groff
571TOOL_HEXDUMP= hexdump 571TOOL_HEXDUMP= hexdump
572TOOL_HP300MKBOOT= hp300-mkboot 572TOOL_HP300MKBOOT= hp300-mkboot
573TOOL_HPPAMKBOOT= hppa-mkboot 573TOOL_HPPAMKBOOT= hppa-mkboot
574TOOL_INDXBIB= indxbib 574TOOL_INDXBIB= indxbib
575TOOL_INSTALLBOOT= installboot 575TOOL_INSTALLBOOT= installboot
576TOOL_INSTALL_INFO= install-info 576TOOL_INSTALL_INFO= install-info
577TOOL_JOIN= join 577TOOL_JOIN= join
578TOOL_LLVM_TBLGEN= llvm-tblgen 578TOOL_LLVM_TBLGEN= llvm-tblgen
579TOOL_M4= m4 579TOOL_M4= m4
580TOOL_MACPPCFIXCOFF= macppc-fixcoff 580TOOL_MACPPCFIXCOFF= macppc-fixcoff
581TOOL_MAKEFS= makefs 581TOOL_MAKEFS= makefs
582TOOL_MAKEINFO= makeinfo 582TOOL_MAKEINFO= makeinfo
583TOOL_MAKEKEYS= makekeys 583TOOL_MAKEKEYS= makekeys
584TOOL_MAKESTRS= makestrs 584TOOL_MAKESTRS= makestrs
585TOOL_MAKEWHATIS= /usr/libexec/makewhatis 585TOOL_MAKEWHATIS= /usr/libexec/makewhatis
586TOOL_MANDOC_ASCII= mandoc -Tascii 586TOOL_MANDOC_ASCII= mandoc -Tascii
587TOOL_MANDOC_HTML= mandoc -Thtml 587TOOL_MANDOC_HTML= mandoc -Thtml
588TOOL_MANDOC_LINT= mandoc -Tlint 588TOOL_MANDOC_LINT= mandoc -Tlint
589TOOL_MDSETIMAGE= mdsetimage 589TOOL_MDSETIMAGE= mdsetimage
590TOOL_MENUC= menuc 590TOOL_MENUC= menuc
591TOOL_ARMELF2AOUT= arm-elf2aout 591TOOL_ARMELF2AOUT= arm-elf2aout
592TOOL_M68KELF2AOUT= m68k-elf2aout 592TOOL_M68KELF2AOUT= m68k-elf2aout
593TOOL_MIPSELF2ECOFF= mips-elf2ecoff 593TOOL_MIPSELF2ECOFF= mips-elf2ecoff
594TOOL_MKCSMAPPER= mkcsmapper 594TOOL_MKCSMAPPER= mkcsmapper
595TOOL_MKESDB= mkesdb 595TOOL_MKESDB= mkesdb
596TOOL_MKLOCALE= mklocale 596TOOL_MKLOCALE= mklocale
597TOOL_MKMAGIC= file 597TOOL_MKMAGIC= file
598TOOL_MKNOD= mknod 598TOOL_MKNOD= mknod
599TOOL_MKTEMP= mktemp 599TOOL_MKTEMP= mktemp
600TOOL_MKUBOOTIMAGE= mkubootimage 600TOOL_MKUBOOTIMAGE= mkubootimage
601TOOL_ELFTOSB= elftosb 601TOOL_ELFTOSB= elftosb
602TOOL_MSGC= msgc 602TOOL_MSGC= msgc
603TOOL_MTREE= mtree 603TOOL_MTREE= mtree
604TOOL_MVME68KWRTVID= wrtvid 604TOOL_MVME68KWRTVID= wrtvid
605TOOL_NBPERF= nbperf 605TOOL_NBPERF= nbperf
606TOOL_NCDCS= ncdcs 606TOOL_NCDCS= ncdcs
607TOOL_PAX= pax 607TOOL_PAX= pax
608TOOL_PIC= pic 608TOOL_PIC= pic
609TOOL_PIGZ= pigz 609TOOL_PIGZ= pigz
610TOOL_XZ= xz 610TOOL_XZ= xz
611TOOL_PKG_CREATE= pkg_create 611TOOL_PKG_CREATE= pkg_create
612TOOL_POWERPCMKBOOTIMAGE= powerpc-mkbootimage 612TOOL_POWERPCMKBOOTIMAGE= powerpc-mkbootimage
613TOOL_PWD_MKDB= pwd_mkdb 613TOOL_PWD_MKDB= pwd_mkdb
614TOOL_REFER= refer 614TOOL_REFER= refer
615TOOL_ROFF_ASCII= nroff 615TOOL_ROFF_ASCII= nroff
616TOOL_ROFF_DOCASCII= ${TOOL_GROFF} -Tascii 616TOOL_ROFF_DOCASCII= ${TOOL_GROFF} -Tascii
617TOOL_ROFF_DOCHTML= ${TOOL_GROFF} -Thtml 617TOOL_ROFF_DOCHTML= ${TOOL_GROFF} -Thtml
618TOOL_ROFF_DVI= ${TOOL_GROFF} -Tdvi ${ROFF_PAGESIZE} 618TOOL_ROFF_DVI= ${TOOL_GROFF} -Tdvi ${ROFF_PAGESIZE}
619TOOL_ROFF_HTML= ${TOOL_GROFF} -Tlatin1 -mdoc2html 619TOOL_ROFF_HTML= ${TOOL_GROFF} -Tlatin1 -mdoc2html
620TOOL_ROFF_PS= ${TOOL_GROFF} -Tps ${ROFF_PAGESIZE} 620TOOL_ROFF_PS= ${TOOL_GROFF} -Tps ${ROFF_PAGESIZE}
621TOOL_ROFF_RAW= ${TOOL_GROFF} -Z 621TOOL_ROFF_RAW= ${TOOL_GROFF} -Z
622TOOL_RPCGEN= rpcgen 622TOOL_RPCGEN= rpcgen
623TOOL_SED= sed 623TOOL_SED= sed
624TOOL_SOELIM= soelim 624TOOL_SOELIM= soelim
625TOOL_SORTINFO= sortinfo 625TOOL_SORTINFO= sortinfo
626TOOL_SPARKCRC= sparkcrc 626TOOL_SPARKCRC= sparkcrc
627TOOL_STAT= stat 627TOOL_STAT= stat
628TOOL_STRFILE= strfile 628TOOL_STRFILE= strfile
629TOOL_SUNLABEL= sunlabel 629TOOL_SUNLABEL= sunlabel
630TOOL_TBL= tbl 630TOOL_TBL= tbl
631TOOL_TIC= tic 631TOOL_TIC= tic
632TOOL_UUDECODE= uudecode 632TOOL_UUDECODE= uudecode
633TOOL_VGRIND= vgrind -f 633TOOL_VGRIND= vgrind -f
634TOOL_VFONTEDPR= /usr/libexec/vfontedpr 634TOOL_VFONTEDPR= /usr/libexec/vfontedpr
635TOOL_ZIC= zic 635TOOL_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"
642NOPIE= # defined 642NOPIE= # defined
643NOCTF= # defined 643NOCTF= # defined
644.elif ${MACHINE} == "sun2" 644.elif ${MACHINE} == "sun2"
645NOPIE= # we don't have PIC, so no PIE 645NOPIE= # 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
649TOOL_CC.false= false 649TOOL_CC.false= false
650TOOL_CPP.false= false 650TOOL_CPP.false= false
651TOOL_CXX.false= false 651TOOL_CXX.false= false
652TOOL_FC.false= false 652TOOL_FC.false= false
653TOOL_OBJC.false= false 653TOOL_OBJC.false= false
654 654
655AVAILABLE_COMPILER?= ${HAVE_PCC:Dpcc} ${HAVE_LLVM:Dclang} ${HAVE_GCC:Dgcc} false 655AVAILABLE_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
658ACTIVE_${_t}= ${AVAILABLE_COMPILER:@.c.@ ${ !defined(UNSUPPORTED_COMPILER.${.c.}) && defined(TOOL_${_t}.${.c.}) :? ${.c.} : }@:[1]} 658ACTIVE_${_t}= ${AVAILABLE_COMPILER:@.c.@ ${ !defined(UNSUPPORTED_COMPILER.${.c.}) && defined(TOOL_${_t}.${.c.}) :? ${.c.} : }@:[1]}
659SUPPORTED_${_t}=${AVAILABLE_COMPILER:Nfalse:@.c.@ ${ !defined(UNSUPPORTED_COMPILER.${.c.}) && defined(TOOL_${_t}.${.c.}) :? ${.c.} : }@} 659SUPPORTED_${_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
662CC= ${TOOL_CC.${ACTIVE_CC}} 662CC= ${TOOL_CC.${ACTIVE_CC}}
663CPP= ${TOOL_CPP.${ACTIVE_CPP}} 663CPP= ${TOOL_CPP.${ACTIVE_CPP}}
664CXX= ${TOOL_CXX.${ACTIVE_CXX}} 664CXX= ${TOOL_CXX.${ACTIVE_CXX}}
665FC= ${TOOL_FC.${ACTIVE_FC}} 665FC= ${TOOL_FC.${ACTIVE_FC}}
666OBJC= ${TOOL_OBJC.${ACTIVE_OBJC}} 666OBJC= ${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.
669MACHINES.aarch64= evbarm 669MACHINES.aarch64= evbarm
670MACHINES.alpha= alpha 670MACHINES.alpha= alpha
671MACHINES.arm= acorn32 cats epoc32 evbarm hpcarm \ 671MACHINES.arm= acorn32 cats epoc32 evbarm hpcarm \
672 iyonix netwinder shark zaurus 672 iyonix netwinder shark zaurus
673MACHINES.coldfire= evbcf 673MACHINES.coldfire= evbcf
674MACHINES.i386= i386 674MACHINES.i386= i386
675MACHINES.ia64= ia64 675MACHINES.ia64= ia64
676MACHINES.hppa= hppa 676MACHINES.hppa= hppa
677MACHINES.m68000= sun2 677MACHINES.m68000= sun2
678MACHINES.m68k= amiga atari cesfic hp300 luna68k mac68k \ 678MACHINES.m68k= amiga atari cesfic hp300 luna68k mac68k \
679 news68k next68k sun3 x68k 679 news68k next68k sun3 x68k
680MACHINES.mips= algor arc cobalt emips evbmips ews4800mips \ 680MACHINES.mips= algor arc cobalt emips evbmips ews4800mips \
681 hpcmips mipsco newsmips pmax sbmips sgimips 681 hpcmips mipsco newsmips pmax sbmips sgimips
682MACHINES.or1k= or1k 682MACHINES.or1k= or1k
683MACHINES.powerpc= amigappc bebox evbppc ibmnws macppc mvmeppc \ 683MACHINES.powerpc= amigappc bebox evbppc ibmnws macppc mvmeppc \
684 ofppc prep rs6000 sandpoint 684 ofppc prep rs6000 sandpoint
685MACHINES.riscv= riscv 685MACHINES.riscv= riscv
686MACHINES.sh3= dreamcast evbsh3 hpcsh landisk mmeye 686MACHINES.sh3= dreamcast evbsh3 hpcsh landisk mmeye
687MACHINES.sparc= sparc sparc64 687MACHINES.sparc= sparc sparc64
688MACHINES.sparc64= sparc64 688MACHINES.sparc64= sparc64
689MACHINES.vax= vax 689MACHINES.vax= vax
690MACHINES.x86_64= amd64 690MACHINES.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"
695OBJCOPY_ELF2AOUT_FLAGS?= \ 695OBJCOPY_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)
723check_DESTDIR: .PHONY .NOTMAIN 723check_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)
733check_RELEASEDIR: .PHONY .NOTMAIN 733check_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#
746BSDSRCDIR?= /usr/src 746BSDSRCDIR?= /usr/src
747BSDOBJDIR?= /usr/obj 747BSDOBJDIR?= /usr/obj
748NETBSDSRCDIR?= ${BSDSRCDIR} 748NETBSDSRCDIR?= ${BSDSRCDIR}
749 749
750BINGRP?= wheel 750BINGRP?= wheel
751BINOWN?= root 751BINOWN?= root
752BINMODE?= 555 752BINMODE?= 555
753NONBINMODE?= 444 753NONBINMODE?= 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.
757RUMPBINGRP?= wheel 757RUMPBINGRP?= wheel
758RUMPBINOWN?= root 758RUMPBINOWN?= root
759RUMPBINMODE?= 555 759RUMPBINMODE?= 555
760RUMPNONBINMODE?=444 760RUMPNONBINMODE?=444
761 761
762MANDIR?= /usr/share/man 762MANDIR?= /usr/share/man
763MANGRP?= wheel 763MANGRP?= wheel
764MANOWN?= root 764MANOWN?= root
765MANMODE?= ${NONBINMODE} 765MANMODE?= ${NONBINMODE}
766MANINSTALL?= ${_MANINSTALL} 766MANINSTALL?= ${_MANINSTALL}
767 767
768INFODIR?= /usr/share/info 768INFODIR?= /usr/share/info
769INFOGRP?= wheel 769INFOGRP?= wheel
770INFOOWN?= root 770INFOOWN?= root
771INFOMODE?= ${NONBINMODE} 771INFOMODE?= ${NONBINMODE}
772 772
773LIBDIR?= /usr/lib 773LIBDIR?= /usr/lib
774 774
775LINTLIBDIR?= /usr/libdata/lint 775LINTLIBDIR?= /usr/libdata/lint
776LIBGRP?= ${BINGRP} 776LIBGRP?= ${BINGRP}
777LIBOWN?= ${BINOWN} 777LIBOWN?= ${BINOWN}
778LIBMODE?= ${NONBINMODE} 778LIBMODE?= ${NONBINMODE}
779 779
780DOCDIR?= /usr/share/doc 780DOCDIR?= /usr/share/doc
781DOCGRP?= wheel 781DOCGRP?= wheel
782DOCOWN?= root 782DOCOWN?= root
783DOCMODE?= ${NONBINMODE} 783DOCMODE?= ${NONBINMODE}
784 784
785NLSDIR?= /usr/share/nls 785NLSDIR?= /usr/share/nls
786NLSGRP?= wheel 786NLSGRP?= wheel
787NLSOWN?= root 787NLSOWN?= root
788NLSMODE?= ${NONBINMODE} 788NLSMODE?= ${NONBINMODE}
789 789
790KMODULEGRP?= wheel 790KMODULEGRP?= wheel
791KMODULEOWN?= root 791KMODULEOWN?= root
792KMODULEMODE?= ${NONBINMODE} 792KMODULEMODE?= ${NONBINMODE}
793 793
794LOCALEDIR?= /usr/share/locale 794LOCALEDIR?= /usr/share/locale
795LOCALEGRP?= wheel 795LOCALEGRP?= wheel
796LOCALEOWN?= root 796LOCALEOWN?= root
797LOCALEMODE?= ${NONBINMODE} 797LOCALEMODE?= ${NONBINMODE}
798 798
799FIRMWAREDIR?= /libdata/firmware 799FIRMWAREDIR?= /libdata/firmware
800FIRMWAREGRP?= wheel 800FIRMWAREGRP?= wheel
801FIRMWAREOWN?= root 801FIRMWAREOWN?= root
802FIRMWAREMODE?= ${NONBINMODE} 802FIRMWAREMODE?= ${NONBINMODE}
803 803
804DEBUGDIR?= /usr/libdata/debug 804DEBUGDIR?= /usr/libdata/debug
805DEBUGGRP?= wheel 805DEBUGGRP?= wheel
806DEBUGOWN?= root 806DEBUGOWN?= root
807DEBUGMODE?= ${NONBINMODE} 807DEBUGMODE?= ${NONBINMODE}
808 808
809DTBDIR?= /boot/dtb 809DTBDIR?= /boot/dtb
810DTBGRP?= wheel 810DTBGRP?= wheel
811DTBOWN?= root 811DTBOWN?= root
812DTBMODE?= ${NONBINMODE} 812DTBMODE?= ${NONBINMODE}
813 813
814MKDIRMODE?= 0755 814MKDIRMODE?= 0755
815MKDIRPERM?= -m ${MKDIRMODE} 815MKDIRPERM?= -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#
826OBJECT_FMT= ELF 826OBJECT_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"
832MKBINUTILS:= no 832MKBINUTILS:= no
833MKGDB:= no 833MKGDB:= no
834MKGCC:= no 834MKGCC:= 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)
843MKGCC:= no 843MKGCC:= no
844.endif 844.endif
845 845
846MKGDB.or1k= no 846MKGDB.or1k= no
847MKGDB.riscv32= no 847MKGDB.riscv32= no
848MKGDB.riscv64= no 848MKGDB.riscv64= no
849 849
850# No kernel modules for or1k or riscv (yet) 850# No kernel modules for or1k or riscv (yet)
851MKKMOD.or1k= no 851MKKMOD.or1k= no
852MKKMOD.riscv32= no 852MKKMOD.riscv32= no
853MKKMOD.riscv64= no 853MKKMOD.riscv64= no
854 854
855# No profiling for or1k (yet) 855# No profiling for or1k (yet)
856MKPROFILE.or1k= no 856MKPROFILE.or1k= no
857MKPROFILE.riscv32=no 857MKPROFILE.riscv32=no
858MKPROFILE.riscv64=no 858MKPROFILE.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"
864NOPIC= # defined 864NOPIC= # defined
865MKISCSI= no 865MKISCSI= 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)
869NOPROFILE= # defined 869NOPROFILE= # 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#
877GCC_NO_FORMAT_TRUNCATION= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-format-truncation :} 877GCC_NO_FORMAT_TRUNCATION= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-format-truncation :}
878GCC_NO_FORMAT_OVERFLOW= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-format-overflow :} 878GCC_NO_FORMAT_OVERFLOW= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-format-overflow :}
879GCC_NO_STRINGOP_OVERFLOW= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-stringop-overflow :} 879GCC_NO_STRINGOP_OVERFLOW= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-stringop-overflow :}
880GCC_NO_IMPLICIT_FALLTHRU= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-implicit-fallthrough :} 880GCC_NO_IMPLICIT_FALLTHRU= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-implicit-fallthrough :}
881GCC_NO_STRINGOP_TRUNCATION= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -Wno-stringop-truncation :} 881GCC_NO_STRINGOP_TRUNCATION= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -Wno-stringop-truncation :}
882GCC_NO_CAST_FUNCTION_TYPE= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -Wno-cast-function-type :} 882GCC_NO_CAST_FUNCTION_TYPE= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -Wno-cast-function-type :}
883GCC_NO_ADDR_OF_PACKED_MEMBER= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 9:? -Wno-address-of-packed-member :} 883GCC_NO_ADDR_OF_PACKED_MEMBER= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 9:? -Wno-address-of-packed-member :}
884GCC_NO_MAYBE_UNINITIALIZED= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-maybe-uninitialized :} 884GCC_NO_MAYBE_UNINITIALIZED= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-maybe-uninitialized :}
885GCC_NO_RETURN_LOCAL_ADDR= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-return-local-addr :} 885GCC_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#
890CLANG_NO_ADDR_OF_PACKED_MEMBER= ${${ACTIVE_CC} == "clang" :? -Wno-error=address-of-packed-member :} 890CLANG_NO_ADDR_OF_PACKED_MEMBER= ${${ACTIVE_CC} == "clang" :? -Wno-error=address-of-packed-member :}
891 891
892NO_ADDR_OF_PACKED_MEMBER= ${CLANG_NO_ADDR_OF_PACKED_MEMBER} ${GCC_NO_ADDR_OF_PACKED_MEMBER} 892NO_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#
897MKGDB.ia64= no 897MKGDB.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#
904MKPICLIB.vax= no 904MKPICLIB.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#
911SHLIB_VERSION_FILE?= ${.CURDIR}/shlib_version 911SHLIB_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#
916GNU_ARCH.aarch64eb=aarch64_be 916GNU_ARCH.aarch64eb=aarch64_be
917GNU_ARCH.coldfire=m5407 917GNU_ARCH.coldfire=m5407
918GNU_ARCH.earm=arm 918GNU_ARCH.earm=arm
919GNU_ARCH.earmhf=arm 919GNU_ARCH.earmhf=arm
920GNU_ARCH.earmeb=armeb 920GNU_ARCH.earmeb=armeb
921GNU_ARCH.earmhfeb=armeb 921GNU_ARCH.earmhfeb=armeb
922GNU_ARCH.earmv4=armv4 922GNU_ARCH.earmv4=armv4
923GNU_ARCH.earmv4eb=armv4eb 923GNU_ARCH.earmv4eb=armv4eb
924GNU_ARCH.earmv5=arm 924GNU_ARCH.earmv5=arm
925GNU_ARCH.earmv5hf=arm 925GNU_ARCH.earmv5hf=arm
926GNU_ARCH.earmv5eb=armeb 926GNU_ARCH.earmv5eb=armeb
927GNU_ARCH.earmv5hfeb=armeb 927GNU_ARCH.earmv5hfeb=armeb
928GNU_ARCH.earmv6=armv6 928GNU_ARCH.earmv6=armv6
929GNU_ARCH.earmv6hf=armv6 929GNU_ARCH.earmv6hf=armv6
930GNU_ARCH.earmv6eb=armv6eb 930GNU_ARCH.earmv6eb=armv6eb
931GNU_ARCH.earmv6hfeb=armv6eb 931GNU_ARCH.earmv6hfeb=armv6eb
932GNU_ARCH.earmv7=armv7 932GNU_ARCH.earmv7=armv7
933GNU_ARCH.earmv7hf=armv7 933GNU_ARCH.earmv7hf=armv7
934GNU_ARCH.earmv7eb=armv7eb 934GNU_ARCH.earmv7eb=armv7eb
935GNU_ARCH.earmv7hfeb=armv7eb 935GNU_ARCH.earmv7hfeb=armv7eb
936GNU_ARCH.i386=i486 936GNU_ARCH.i386=i486
937GCC_CONFIG_ARCH.i386=i486 937GCC_CONFIG_ARCH.i386=i486
938GCC_CONFIG_TUNE.i386=nocona 938GCC_CONFIG_TUNE.i386=nocona
939GCC_CONFIG_TUNE.x86_64=nocona 939GCC_CONFIG_TUNE.x86_64=nocona
940GNU_ARCH.m68000=m68010 940GNU_ARCH.m68000=m68010
941GNU_ARCH.sh3eb=sh 941GNU_ARCH.sh3eb=sh
942GNU_ARCH.sh3el=shle 942GNU_ARCH.sh3el=shle
943GNU_ARCH.mips64eb=mips64 943GNU_ARCH.mips64eb=mips64
944MACHINE_GNU_ARCH=${GNU_ARCH.${MACHINE_ARCH}:U${MACHINE_ARCH}} 944MACHINE_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*})
951MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsdelf-${MACHINE_ARCH:C/eb//:C/v[4-7]//:S/earm/eabi/} 951MACHINE_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")
960MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsdelf 960MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsdelf
961.else 961.else
962MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsd 962MACHINE_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.
967ARM_APCS_FLAGS= -mabi=apcs-gnu -mfloat-abi=soft -marm 967ARM_APCS_FLAGS= -mabi=apcs-gnu -mfloat-abi=soft -marm
968ARM_APCS_FLAGS+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -mno-thumb-interwork :} 968ARM_APCS_FLAGS+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -mno-thumb-interwork :}
969ARM_APCS_FLAGS+=${${ACTIVE_CC} == "clang":? -target ${MACHINE_GNU_ARCH}--netbsdelf -B ${TOOLDIR}/${MACHINE_GNU_PLATFORM}/bin :} 969ARM_APCS_FLAGS+=${${ACTIVE_CC} == "clang":? -target ${MACHINE_GNU_ARCH}--netbsdelf -B ${TOOLDIR}/${MACHINE_GNU_PLATFORM}/bin :}
970.endif 970.endif
971 971
972GENASSYM_CPPFLAGS+= ${${ACTIVE_CC} == "clang":? -no-integrated-as :} 972GENASSYM_CPPFLAGS+= ${${ACTIVE_CC} == "clang":? -no-integrated-as :}
973 973
974TARGETS+= all clean cleandir depend dependall includes \ 974TARGETS+= 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
977PHONY_NOTMAIN = all clean cleandir depend dependall distclean includes \ 977PHONY_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)
987install: beforeinstall .WAIT subdir-install realinstall .WAIT afterinstall 987install: beforeinstall .WAIT subdir-install realinstall .WAIT afterinstall
988beforeinstall: 988beforeinstall:
989subdir-install: 989subdir-install:
990realinstall: 990realinstall:
991afterinstall: 991afterinstall:
992.endif 992.endif
993all: realall subdir-all 993all: realall subdir-all
994subdir-all: 994subdir-all:
995realall: 995realall:
996depend: realdepend subdir-depend 996depend: realdepend subdir-depend
997subdir-depend: 997subdir-depend:
998realdepend: 998realdepend:
999distclean: cleandir 999distclean: cleandir
1000cleandir: clean 1000cleandir: clean
1001 1001
1002dependall: .NOTMAIN realdepend .MAKE 1002dependall: .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})
1028MK${var:S/^NO//}:= no 1028MK${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})
1037MK${var}:= yes 1037MK${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*}
1055MKCOMPAT?= yes 1055MKCOMPAT?= 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.
1058MKCOMPAT:= no 1058MKCOMPAT:= no
1059.endif 1059.endif
1060 1060
1061.if ${MKCOMPAT} == "no" 1061.if ${MKCOMPAT} == "no"
1062MKCOMPATTESTS:= no 1062MKCOMPATTESTS:= no
1063MKCOMPATX11:= no 1063MKCOMPATX11:= 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")
1068MKCOMPATMODULES?= yes 1068MKCOMPATMODULES?= yes
1069.else 1069.else
1070MKCOMPATMODULES:= no 1070MKCOMPATMODULES:= 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}
1077MKSOFTFLOAT?= yes 1077MKSOFTFLOAT?= 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"
1086MKSOFTFLOAT= yes 1086MKSOFTFLOAT= yes
1087.endif 1087.endif
1088 1088
1089.if ${MACHINE} == "emips" 1089.if ${MACHINE} == "emips"
1090SOFTFLOAT_BITS= 32 1090SOFTFLOAT_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*}
1099MKZFS?= yes 1099MKZFS?= 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*}
1109MKDTRACE?= yes 1109MKDTRACE?= yes
1110MKCTF?= yes 1110MKCTF?= 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")
1126MKPIE?= yes 1126MKPIE?= yes
1127.else 1127.else
1128MKPIE?= no 1128MKPIE?= 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" || \