Thu May 27 11:24:58 2021 UTC ()
remove dup line (thanks rillig)


(christos)
diff -r1.1249 -r1.1250 src/share/mk/bsd.own.mk

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

--- src/share/mk/bsd.own.mk 2021/05/27 06:58:27 1.1249
+++ src/share/mk/bsd.own.mk 2021/05/27 11:24:58 1.1250
@@ -1,1427 +1,1426 @@ @@ -1,1427 +1,1426 @@
1# $NetBSD: bsd.own.mk,v 1.1249 2021/05/27 06:58:27 mrg Exp $ 1# $NetBSD: bsd.own.mk,v 1.1250 2021/05/27 11:24:58 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 !empty(MACHINE:Mevbarm) || !empty(MACHINE:Mevbmips) \ 31.if !empty(MACHINE:Mevbarm) || !empty(MACHINE:Mevbmips) \
32 || !empty(MACHINE:Mevbsh3) 32 || !empty(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#
75.if ${MACHINE} == "alpha" || \ 75.if ${MACHINE} == "alpha" || \
76 ${MACHINE} == "hppa" || \ 76 ${MACHINE} == "hppa" || \
77 ${MACHINE} == "i386" || \ 77 ${MACHINE} == "i386" || \
78 ${MACHINE} == "ia64" || \ 78 ${MACHINE} == "ia64" || \
79 ${MACHINE} == "sparc" || \ 79 ${MACHINE} == "sparc" || \
80 ${MACHINE} == "sparc64" || \ 80 ${MACHINE} == "sparc64" || \
81 ${MACHINE} == "vax" || \ 81 ${MACHINE} == "vax" || \
82 ${MACHINE_ARCH} == "x86_64" || \ 82 ${MACHINE_ARCH} == "x86_64" || \
83 ${MACHINE_CPU} == "aarch64" || \ 83 ${MACHINE_CPU} == "aarch64" || \
84 ${MACHINE_CPU} == "mips" || \ 84 ${MACHINE_CPU} == "mips" || \
85 ${MACHINE_CPU} == "powerpc" || \ 85 ${MACHINE_CPU} == "powerpc" || \
86 ${MACHINE_CPU} == "riscv" 86 ${MACHINE_CPU} == "riscv"
87HAVE_GCC?= 10 87HAVE_GCC?= 10
88.else 88.else
89HAVE_GCC?= 9 89HAVE_GCC?= 9
90.endif 90.endif
91 91
92# 92#
93# Platforms that can't run a modern GCC natively 93# Platforms that can't run a modern GCC natively
94.if ${MACHINE_ARCH} == "m68000" 94.if ${MACHINE_ARCH} == "m68000"
95MKGCCCMDS?= no 95MKGCCCMDS?= no
96.endif 96.endif
97 97
98# 98#
99# We import the old gcc as "gcc.old" when upgrading. EXTERNAL_GCC_SUBDIR is 99# We import the old gcc as "gcc.old" when upgrading. EXTERNAL_GCC_SUBDIR is
100# set to the relevant subdirectory in src/external/gpl3 for his HAVE_GCC. 100# set to the relevant subdirectory in src/external/gpl3 for his HAVE_GCC.
101# 101#
102.if ${HAVE_GCC} == 9 102.if ${HAVE_GCC} == 9
103EXTERNAL_GCC_SUBDIR?= gcc.old 103EXTERNAL_GCC_SUBDIR?= gcc.old
104.elif ${HAVE_GCC} == 10 104.elif ${HAVE_GCC} == 10
105EXTERNAL_GCC_SUBDIR?= gcc 105EXTERNAL_GCC_SUBDIR?= gcc
106.else 106.else
107EXTERNAL_GCC_SUBDIR?= /does/not/exist 107EXTERNAL_GCC_SUBDIR?= /does/not/exist
108.endif 108.endif
109.else 109.else
110MKGCCCMDS?= no 110MKGCCCMDS?= no
111.endif 111.endif
112 112
113# 113#
114# What binutils is used? 114# What binutils is used?
115# 115#
116HAVE_BINUTILS?= 234 116HAVE_BINUTILS?= 234
117 117
118.if ${HAVE_BINUTILS} == 234 118.if ${HAVE_BINUTILS} == 234
119EXTERNAL_BINUTILS_SUBDIR= binutils 119EXTERNAL_BINUTILS_SUBDIR= binutils
120.elif ${HAVE_BINUTILS} == 231 120.elif ${HAVE_BINUTILS} == 231
121EXTERNAL_BINUTILS_SUBDIR= binutils.old 121EXTERNAL_BINUTILS_SUBDIR= binutils.old
122.else 122.else
123EXTERNAL_BINUTILS_SUBDIR= /does/not/exist 123EXTERNAL_BINUTILS_SUBDIR= /does/not/exist
124.endif 124.endif
125 125
126# 126#
127# What GDB is used? 127# What GDB is used?
128# 128#
129HAVE_GDB?= 1100 129HAVE_GDB?= 1100
130 130
131.if ${HAVE_GDB} == 1100 131.if ${HAVE_GDB} == 1100
132EXTERNAL_GDB_SUBDIR= gdb 132EXTERNAL_GDB_SUBDIR= gdb
133.elif ${HAVE_GDB} == 830 133.elif ${HAVE_GDB} == 830
134EXTERNAL_GDB_SUBDIR= gdb.old 134EXTERNAL_GDB_SUBDIR= gdb.old
135.else 135.else
136EXTERNAL_GDB_SUBDIR= /does/not/exist 136EXTERNAL_GDB_SUBDIR= /does/not/exist
137.endif 137.endif
138 138
139# 139#
140# What OpenSSL is used? 140# What OpenSSL is used?
141#  141#
142HAVE_OPENSSL?= 11 142HAVE_OPENSSL?= 11
143 143
144.if ${HAVE_OPENSSL} == 11 144.if ${HAVE_OPENSSL} == 11
145EXTERNAL_OPENSSL_SUBDIR=openssl 145EXTERNAL_OPENSSL_SUBDIR=openssl
146.elif ${HAVE_OPENSSL} == 10 146.elif ${HAVE_OPENSSL} == 10
147EXTERNAL_OPENSSL_SUBDIR=openssl.old 147EXTERNAL_OPENSSL_SUBDIR=openssl.old
148.else 148.else
149EXTERNAL_OPENSSL_SUBDIR=/does/not/exist 149EXTERNAL_OPENSSL_SUBDIR=/does/not/exist
150.endif 150.endif
151 151
152# 152#
153# Does the platform support ACPI? 153# Does the platform support ACPI?
154# 154#
155.if ${MACHINE_ARCH} == "i386" || \ 155.if ${MACHINE_ARCH} == "i386" || \
156 ${MACHINE_ARCH} == "x86_64" || \ 156 ${MACHINE_ARCH} == "x86_64" || \
157 ${MACHINE_ARCH} == "ia64" || \ 157 ${MACHINE_ARCH} == "ia64" || \
158 !empty(MACHINE_ARCH:Maarch64*) 158 !empty(MACHINE_ARCH:Maarch64*)
159HAVE_ACPI= yes 159HAVE_ACPI= yes
160.else 160.else
161HAVE_ACPI= no 161HAVE_ACPI= no
162.endif 162.endif
163 163
164# 164#
165# Does the platform support UEFI? 165# Does the platform support UEFI?
166# 166#
167.if ${MACHINE_ARCH} == "i386" || \ 167.if ${MACHINE_ARCH} == "i386" || \
168 ${MACHINE_ARCH} == "x86_64" || \ 168 ${MACHINE_ARCH} == "x86_64" || \
169 ${MACHINE_ARCH} == "ia64" || \ 169 ${MACHINE_ARCH} == "ia64" || \
170 !empty(MACHINE_ARCH:Mearmv7*) || \ 170 !empty(MACHINE_ARCH:Mearmv7*) || \
171 !empty(MACHINE_ARCH:Maarch64*) 171 !empty(MACHINE_ARCH:Maarch64*)
172HAVE_UEFI= yes 172HAVE_UEFI= yes
173.else 173.else
174HAVE_UEFI= no 174HAVE_UEFI= no
175.endif 175.endif
176 176
177# 177#
178# Does the platform support NVMM? 178# Does the platform support NVMM?
179# 179#
180.if ${MACHINE_ARCH} == "x86_64" 180.if ${MACHINE_ARCH} == "x86_64"
181HAVE_NVMM= yes 181HAVE_NVMM= yes
182.else 182.else
183HAVE_NVMM= no 183HAVE_NVMM= no
184.endif 184.endif
185 185
186 186
187.if !empty(MACHINE_ARCH:Mearm*) 187.if !empty(MACHINE_ARCH:Mearm*)
188_LIBC_COMPILER_RT.${MACHINE_ARCH}= yes 188_LIBC_COMPILER_RT.${MACHINE_ARCH}= yes
189.endif 189.endif
190 190
191_LIBC_COMPILER_RT.aarch64= yes 191_LIBC_COMPILER_RT.aarch64= yes
192_LIBC_COMPILER_RT.aarch64eb= yes 192_LIBC_COMPILER_RT.aarch64eb= yes
193_LIBC_COMPILER_RT.i386= yes 193_LIBC_COMPILER_RT.i386= yes
194_LIBC_COMPILER_RT.powerpc= yes 194_LIBC_COMPILER_RT.powerpc= yes
195_LIBC_COMPILER_RT.powerpc64= yes 195_LIBC_COMPILER_RT.powerpc64= yes
196_LIBC_COMPILER_RT.sparc= yes 196_LIBC_COMPILER_RT.sparc= yes
197_LIBC_COMPILER_RT.sparc64= yes 197_LIBC_COMPILER_RT.sparc64= yes
198_LIBC_COMPILER_RT.x86_64= yes 198_LIBC_COMPILER_RT.x86_64= yes
199 199
200.if ${HAVE_LLVM:Uno} == "yes" && ${_LIBC_COMPILER_RT.${MACHINE_ARCH}:Uno} == "yes" 200.if ${HAVE_LLVM:Uno} == "yes" && ${_LIBC_COMPILER_RT.${MACHINE_ARCH}:Uno} == "yes"
201HAVE_LIBGCC?= no 201HAVE_LIBGCC?= no
202.else 202.else
203HAVE_LIBGCC?= yes 203HAVE_LIBGCC?= yes
204.endif 204.endif
205 205
206 206
207# Should libgcc have unwinding code? 207# Should libgcc have unwinding code?
208.if ${HAVE_LLVM:Uno} == "yes" || !empty(MACHINE_ARCH:Mearm*) 208.if ${HAVE_LLVM:Uno} == "yes" || !empty(MACHINE_ARCH:Mearm*)
209HAVE_LIBGCC_EH?= no 209HAVE_LIBGCC_EH?= no
210.else 210.else
211HAVE_LIBGCC_EH?= yes 211HAVE_LIBGCC_EH?= yes
212.endif 212.endif
213 213
214# Coverity does not like SSP 214# Coverity does not like SSP
215.if defined(COVERITY_TOP_CONFIG) || \ 215.if defined(COVERITY_TOP_CONFIG) || \
216 ${MACHINE} == "alpha" || \ 216 ${MACHINE} == "alpha" || \
217 ${MACHINE} == "hppa" || \ 217 ${MACHINE} == "hppa" || \
218 ${MACHINE} == "ia64" || \ 218 ${MACHINE} == "ia64" || \
219 ${MACHINE_CPU} == "mips" 219 ${MACHINE_CPU} == "mips"
220HAVE_SSP?= no 220HAVE_SSP?= no
221.else 221.else
222HAVE_SSP?= yes 222HAVE_SSP?= yes
223.if !defined(NOFORT) && ${USE_FORT:Uno} != "no" 223.if !defined(NOFORT) && ${USE_FORT:Uno} != "no"
224USE_SSP?= yes 224USE_SSP?= yes
225.endif 225.endif
226.endif 226.endif
227 227
228# 228#
229# What version of jemalloc we use (100 is the one 229# What version of jemalloc we use (100 is the one
230# built-in to libc from 2005 (pre version 3). 230# built-in to libc from 2005 (pre version 3).
231# 231#
232.if ${MACHINE_ARCH} == "vax" || ${MACHINE} == "sun2" 232.if ${MACHINE_ARCH} == "vax" || ${MACHINE} == "sun2"
233HAVE_JEMALLOC?= 100 233HAVE_JEMALLOC?= 100
234.else 234.else
235HAVE_JEMALLOC?= 510 235HAVE_JEMALLOC?= 510
236.endif 236.endif
237 237
238.if empty(.MAKEFLAGS:tW:M*-V .OBJDIR*) 238.if empty(.MAKEFLAGS:tW:M*-V .OBJDIR*)
239.if defined(MAKEOBJDIRPREFIX) || defined(MAKEOBJDIR) 239.if defined(MAKEOBJDIRPREFIX) || defined(MAKEOBJDIR)
240PRINTOBJDIR= ${MAKE} -r -V .OBJDIR -f /dev/null xxx 240PRINTOBJDIR= ${MAKE} -r -V .OBJDIR -f /dev/null xxx
241.else 241.else
242PRINTOBJDIR= ${MAKE} -V .OBJDIR 242PRINTOBJDIR= ${MAKE} -V .OBJDIR
243.endif 243.endif
244.else 244.else
245PRINTOBJDIR= echo /error/bsd.own.mk/PRINTOBJDIR # avoid infinite recursion 245PRINTOBJDIR= echo /error/bsd.own.mk/PRINTOBJDIR # avoid infinite recursion
246.endif 246.endif
247 247
248# 248#
249# Determine if running in the NetBSD source tree by checking for the 249# Determine if running in the NetBSD source tree by checking for the
250# existence of build.sh and tools/ in the current or a parent directory, 250# existence of build.sh and tools/ in the current or a parent directory,
251# and setting _SRC_TOP_ to the result. 251# and setting _SRC_TOP_ to the result.
252# 252#
253.if !defined(_SRC_TOP_) # { 253.if !defined(_SRC_TOP_) # {
254_SRC_TOP_!= cd "${.CURDIR}"; while :; do \ 254_SRC_TOP_!= cd "${.CURDIR}"; while :; do \
255 here=`pwd`; \ 255 here=`pwd`; \
256 [ -f build.sh ] && [ -d tools ] && { echo $$here; break; }; \ 256 [ -f build.sh ] && [ -d tools ] && { echo $$here; break; }; \
257 case $$here in /) echo ""; break;; esac; \ 257 case $$here in /) echo ""; break;; esac; \
258 cd ..; done 258 cd ..; done
259 259
260.MAKEOVERRIDES+= _SRC_TOP_ 260.MAKEOVERRIDES+= _SRC_TOP_
261 261
262.endif # } 262.endif # }
263 263
264# 264#
265# If _SRC_TOP_ != "", we're within the NetBSD source tree. 265# If _SRC_TOP_ != "", we're within the NetBSD source tree.
266# * Set defaults for NETBSDSRCDIR and _SRC_TOP_OBJ_. 266# * Set defaults for NETBSDSRCDIR and _SRC_TOP_OBJ_.
267# * Define _NETBSD_VERSION_DEPENDS. Targets that depend on the 267# * Define _NETBSD_VERSION_DEPENDS. Targets that depend on the
268# NetBSD version, or on variables defined at build time, can 268# NetBSD version, or on variables defined at build time, can
269# declare a dependency on ${_NETBSD_VERSION_DEPENDS}. 269# declare a dependency on ${_NETBSD_VERSION_DEPENDS}.
270# 270#
271.if (${_SRC_TOP_} != "") # { 271.if (${_SRC_TOP_} != "") # {
272 272
273NETBSDSRCDIR?= ${_SRC_TOP_} 273NETBSDSRCDIR?= ${_SRC_TOP_}
274 274
275.if !defined(_SRC_TOP_OBJ_) 275.if !defined(_SRC_TOP_OBJ_)
276_SRC_TOP_OBJ_!= cd "${_SRC_TOP_}" && ${PRINTOBJDIR} 276_SRC_TOP_OBJ_!= cd "${_SRC_TOP_}" && ${PRINTOBJDIR}
277.MAKEOVERRIDES+= _SRC_TOP_OBJ_ 277.MAKEOVERRIDES+= _SRC_TOP_OBJ_
278.endif 278.endif
279 279
280_NETBSD_VERSION_DEPENDS= ${_SRC_TOP_OBJ_}/params 280_NETBSD_VERSION_DEPENDS= ${_SRC_TOP_OBJ_}/params
281_NETBSD_VERSION_DEPENDS+= ${NETBSDSRCDIR}/sys/sys/param.h 281_NETBSD_VERSION_DEPENDS+= ${NETBSDSRCDIR}/sys/sys/param.h
282_NETBSD_VERSION_DEPENDS+= ${NETBSDSRCDIR}/sys/conf/newvers.sh 282_NETBSD_VERSION_DEPENDS+= ${NETBSDSRCDIR}/sys/conf/newvers.sh
283_NETBSD_VERSION_DEPENDS+= ${NETBSDSRCDIR}/sys/conf/osrelease.sh 283_NETBSD_VERSION_DEPENDS+= ${NETBSDSRCDIR}/sys/conf/osrelease.sh
284${_SRC_TOP_OBJ_}/params: .NOTMAIN .OPTIONAL # created by top level "make build" 284${_SRC_TOP_OBJ_}/params: .NOTMAIN .OPTIONAL # created by top level "make build"
285 285
286.endif # _SRC_TOP_ != "" # } 286.endif # _SRC_TOP_ != "" # }
287 287
288 288
289.if (${_SRC_TOP_} != "") && \ 289.if (${_SRC_TOP_} != "") && \
290 (${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN)) 290 (${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN))
291USETOOLS?= yes 291USETOOLS?= yes
292.endif 292.endif
293USETOOLS?= no 293USETOOLS?= no
294 294
295 295
296.if ${MACHINE_ARCH} == "mips" || ${MACHINE_ARCH} == "mips64" || \ 296.if ${MACHINE_ARCH} == "mips" || ${MACHINE_ARCH} == "mips64" || \
297 ${MACHINE_ARCH} == "sh3" 297 ${MACHINE_ARCH} == "sh3"
298.BEGIN: 298.BEGIN:
299 @echo "Must set MACHINE_ARCH to one of ${MACHINE_ARCH}eb or ${MACHINE_ARCH}el" 299 @echo "Must set MACHINE_ARCH to one of ${MACHINE_ARCH}eb or ${MACHINE_ARCH}el"
300 @false 300 @false
301.elif defined(REQUIRETOOLS) && \ 301.elif defined(REQUIRETOOLS) && \
302 (${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN)) && \ 302 (${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN)) && \
303 ${USETOOLS} == "no" 303 ${USETOOLS} == "no"
304.BEGIN: 304.BEGIN:
305 @echo "USETOOLS=no, but this component requires a version-specific host toolchain" 305 @echo "USETOOLS=no, but this component requires a version-specific host toolchain"
306 @false 306 @false
307.endif 307.endif
308 308
309# 309#
310# Host platform information; may be overridden 310# Host platform information; may be overridden
311# 311#
312.include <bsd.host.mk> 312.include <bsd.host.mk>
313 313
314.if ${USETOOLS} == "yes" # { 314.if ${USETOOLS} == "yes" # {
315 315
316# 316#
317# Provide a default for TOOLDIR. 317# Provide a default for TOOLDIR.
318# 318#
319.if !defined(TOOLDIR) 319.if !defined(TOOLDIR)
320TOOLDIR:= ${_SRC_TOP_OBJ_}/tooldir.${HOST_OSTYPE} 320TOOLDIR:= ${_SRC_TOP_OBJ_}/tooldir.${HOST_OSTYPE}
321.MAKEOVERRIDES+= TOOLDIR 321.MAKEOVERRIDES+= TOOLDIR
322.endif 322.endif
323 323
324# 324#
325# This is the prefix used for the NetBSD-sourced tools. 325# This is the prefix used for the NetBSD-sourced tools.
326# 326#
327_TOOL_PREFIX?= nb 327_TOOL_PREFIX?= nb
328 328
329# 329#
330# If an external toolchain base is specified, use it. 330# If an external toolchain base is specified, use it.
331# 331#
332.if defined(EXTERNAL_TOOLCHAIN) # { 332.if defined(EXTERNAL_TOOLCHAIN) # {
333AR= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ar 333AR= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ar
334AS= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-as 334AS= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-as
335LD= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ld 335LD= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ld
336NM= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-nm 336NM= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-nm
337OBJCOPY= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objcopy 337OBJCOPY= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objcopy
338OBJDUMP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objdump 338OBJDUMP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objdump
339RANLIB= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ranlib 339RANLIB= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ranlib
340READELF= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-readelf 340READELF= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-readelf
341SIZE= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-size 341SIZE= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-size
342STRINGS= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-strings 342STRINGS= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-strings
343STRIP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-strip 343STRIP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-strip
344 344
345TOOL_CC.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc 345TOOL_CC.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc
346TOOL_CPP.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-cpp 346TOOL_CPP.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-cpp
347TOOL_CXX.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-c++ 347TOOL_CXX.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-c++
348TOOL_FC.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gfortran 348TOOL_FC.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gfortran
349TOOL_OBJC.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc 349TOOL_OBJC.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc
350 350
351TOOL_CC.clang= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang 351TOOL_CC.clang= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang
352TOOL_CPP.clang= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang-cpp 352TOOL_CPP.clang= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang-cpp
353TOOL_CXX.clang= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang++ 353TOOL_CXX.clang= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang++
354TOOL_OBJC.clang= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang 354TOOL_OBJC.clang= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang
355.else # } { 355.else # } {
356# Define default locations for common tools. 356# Define default locations for common tools.
357.if ${USETOOLS_BINUTILS:Uyes} == "yes" # { 357.if ${USETOOLS_BINUTILS:Uyes} == "yes" # {
358AR= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ar 358AR= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ar
359AS= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-as 359AS= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-as
360LD= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ld 360LD= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ld
361NM= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-nm 361NM= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-nm
362OBJCOPY= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-objcopy 362OBJCOPY= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-objcopy
363OBJDUMP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-objdump 363OBJDUMP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-objdump
364RANLIB= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ranlib 364RANLIB= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ranlib
365READELF= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-readelf 365READELF= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-readelf
366SIZE= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-size 366SIZE= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-size
367STRINGS= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-strings 367STRINGS= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-strings
368STRIP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-strip 368STRIP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-strip
369 369
370# GCC supports C, C++, Fortran and Objective C 370# GCC supports C, C++, Fortran and Objective C
371TOOL_CC.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc 371TOOL_CC.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc
372TOOL_CPP.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-cpp 372TOOL_CPP.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-cpp
373TOOL_CXX.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-c++ 373TOOL_CXX.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-c++
374TOOL_FC.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gfortran 374TOOL_FC.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gfortran
375TOOL_OBJC.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc 375TOOL_OBJC.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc
376.endif # } 376.endif # }
377 377
378# Clang supports C, C++ and Objective C 378# Clang supports C, C++ and Objective C
379TOOL_CC.clang= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang 379TOOL_CC.clang= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang
380TOOL_CPP.clang= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang-cpp 380TOOL_CPP.clang= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang-cpp
381TOOL_CXX.clang= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang++ 381TOOL_CXX.clang= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang++
382TOOL_OBJC.clang= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang 382TOOL_OBJC.clang= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang
383 383
384# PCC supports C and Fortran 384# PCC supports C and Fortran
385TOOL_CC.pcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-pcc 385TOOL_CC.pcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-pcc
386TOOL_CPP.pcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-pcpp 386TOOL_CPP.pcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-pcpp
387TOOL_CXX.pcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-p++ 387TOOL_CXX.pcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-p++
388.endif # EXTERNAL_TOOLCHAIN # } 388.endif # EXTERNAL_TOOLCHAIN # }
389 389
390# 390#
391# Make sure DESTDIR is set, so that builds with these tools always 391# Make sure DESTDIR is set, so that builds with these tools always
392# get appropriate -nostdinc, -nostdlib, etc. handling. The default is 392# get appropriate -nostdinc, -nostdlib, etc. handling. The default is
393# <empty string>, meaning start from /, the root directory. 393# <empty string>, meaning start from /, the root directory.
394# 394#
395DESTDIR?= 395DESTDIR?=
396 396
397# Don't append another copy of sysroot (coming from COMPATCPPFLAGS etc.) 397# Don't append another copy of sysroot (coming from COMPATCPPFLAGS etc.)
398# because it confuses Coverity. Still we need to cov-configure specially 398# because it confuses Coverity. Still we need to cov-configure specially
399# for each specific sysroot argument. 399# for each specific sysroot argument.
400# Also don't add a sysroot at all if a rumpkernel build. 400# Also don't add a sysroot at all if a rumpkernel build.
401.if !defined(HOSTPROG) && !defined(HOSTLIB) && !defined(RUMPRUN) 401.if !defined(HOSTPROG) && !defined(HOSTLIB) && !defined(RUMPRUN)
402. if ${DESTDIR} != "" 402. if ${DESTDIR} != ""
403. if empty(CPPFLAGS:M*--sysroot=*) 403. if empty(CPPFLAGS:M*--sysroot=*)
404CPPFLAGS+= --sysroot=${DESTDIR} 404CPPFLAGS+= --sysroot=${DESTDIR}
405. endif 405. endif
406LDFLAGS+= --sysroot=${DESTDIR} 406LDFLAGS+= --sysroot=${DESTDIR}
407. else 407. else
408. if empty(CPPFLAGS:M*--sysroot=*) 408. if empty(CPPFLAGS:M*--sysroot=*)
409CPPFLAGS+= --sysroot=/ 409CPPFLAGS+= --sysroot=/
410. endif 410. endif
411LDFLAGS+= --sysroot=/ 411LDFLAGS+= --sysroot=/
412. endif 412. endif
413.endif 413.endif
414 414
415DBSYM= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-dbsym 415DBSYM= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-dbsym
416ARM_ELF2AOUT= ${TOOLDIR}/bin/${_TOOL_PREFIX}arm-elf2aout 416ARM_ELF2AOUT= ${TOOLDIR}/bin/${_TOOL_PREFIX}arm-elf2aout
417M68K_ELF2AOUT= ${TOOLDIR}/bin/${_TOOL_PREFIX}m68k-elf2aout 417M68K_ELF2AOUT= ${TOOLDIR}/bin/${_TOOL_PREFIX}m68k-elf2aout
418MIPS_ELF2ECOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}mips-elf2ecoff 418MIPS_ELF2ECOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}mips-elf2ecoff
419INSTALL= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-install 419INSTALL= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-install
420LEX= ${TOOLDIR}/bin/${_TOOL_PREFIX}lex 420LEX= ${TOOLDIR}/bin/${_TOOL_PREFIX}lex
421LINT= CC=${CC:Q} ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-lint 421LINT= CC=${CC:Q} ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-lint
422LORDER= NM=${NM:Q} MKTEMP=${TOOL_MKTEMP:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}lorder 422LORDER= NM=${NM:Q} MKTEMP=${TOOL_MKTEMP:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}lorder
423MKDEP= CC=${CC:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}mkdep 423MKDEP= CC=${CC:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}mkdep
424MKDEPCXX= CC=${CXX:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}mkdep 424MKDEPCXX= CC=${CXX:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}mkdep
425PAXCTL= ${TOOLDIR}/bin/${_TOOL_PREFIX}paxctl 425PAXCTL= ${TOOLDIR}/bin/${_TOOL_PREFIX}paxctl
426TSORT= ${TOOLDIR}/bin/${_TOOL_PREFIX}tsort -q 426TSORT= ${TOOLDIR}/bin/${_TOOL_PREFIX}tsort -q
427YACC= ${TOOLDIR}/bin/${_TOOL_PREFIX}yacc 427YACC= ${TOOLDIR}/bin/${_TOOL_PREFIX}yacc
428YACC= ${TOOLDIR}/bin/${_TOOL_PREFIX}yacc 
429 428
430TOOL_AMIGAAOUT2BB= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-aout2bb 429TOOL_AMIGAAOUT2BB= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-aout2bb
431TOOL_AMIGAELF2BB= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-elf2bb 430TOOL_AMIGAELF2BB= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-elf2bb
432TOOL_AMIGATXLT= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-txlt 431TOOL_AMIGATXLT= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-txlt
433TOOL_ASN1_COMPILE= ${TOOLDIR}/bin/${_TOOL_PREFIX}asn1_compile 432TOOL_ASN1_COMPILE= ${TOOLDIR}/bin/${_TOOL_PREFIX}asn1_compile
434TOOL_AWK= ${TOOLDIR}/bin/${_TOOL_PREFIX}awk 433TOOL_AWK= ${TOOLDIR}/bin/${_TOOL_PREFIX}awk
435TOOL_CAP_MKDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}cap_mkdb 434TOOL_CAP_MKDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}cap_mkdb
436TOOL_CAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}cat 435TOOL_CAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}cat
437TOOL_CKSUM= ${TOOLDIR}/bin/${_TOOL_PREFIX}cksum 436TOOL_CKSUM= ${TOOLDIR}/bin/${_TOOL_PREFIX}cksum
438TOOL_CLANG_TBLGEN= ${TOOLDIR}/bin/${_TOOL_PREFIX}clang-tblgen 437TOOL_CLANG_TBLGEN= ${TOOLDIR}/bin/${_TOOL_PREFIX}clang-tblgen
439TOOL_COMPILE_ET= ${TOOLDIR}/bin/${_TOOL_PREFIX}compile_et 438TOOL_COMPILE_ET= ${TOOLDIR}/bin/${_TOOL_PREFIX}compile_et
440TOOL_CONFIG= ${TOOLDIR}/bin/${_TOOL_PREFIX}config 439TOOL_CONFIG= ${TOOLDIR}/bin/${_TOOL_PREFIX}config
441TOOL_CRUNCHGEN= MAKE=${.MAKE:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}crunchgen 440TOOL_CRUNCHGEN= MAKE=${.MAKE:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}crunchgen
442TOOL_CTAGS= ${TOOLDIR}/bin/${_TOOL_PREFIX}ctags 441TOOL_CTAGS= ${TOOLDIR}/bin/${_TOOL_PREFIX}ctags
443TOOL_CTFCONVERT= ${TOOLDIR}/bin/${_TOOL_PREFIX}ctfconvert 442TOOL_CTFCONVERT= ${TOOLDIR}/bin/${_TOOL_PREFIX}ctfconvert
444TOOL_CTFMERGE= ${TOOLDIR}/bin/${_TOOL_PREFIX}ctfmerge 443TOOL_CTFMERGE= ${TOOLDIR}/bin/${_TOOL_PREFIX}ctfmerge
445TOOL_CVSLATEST= ${TOOLDIR}/bin/${_TOOL_PREFIX}cvslatest 444TOOL_CVSLATEST= ${TOOLDIR}/bin/${_TOOL_PREFIX}cvslatest
446TOOL_DATE= ${TOOLDIR}/bin/${_TOOL_PREFIX}date 445TOOL_DATE= ${TOOLDIR}/bin/${_TOOL_PREFIX}date
447TOOL_DB= ${TOOLDIR}/bin/${_TOOL_PREFIX}db 446TOOL_DB= ${TOOLDIR}/bin/${_TOOL_PREFIX}db
448TOOL_DISKLABEL= ${TOOLDIR}/bin/${_TOOL_PREFIX}disklabel 447TOOL_DISKLABEL= ${TOOLDIR}/bin/${_TOOL_PREFIX}disklabel
449TOOL_DTC= ${TOOLDIR}/bin/${_TOOL_PREFIX}dtc 448TOOL_DTC= ${TOOLDIR}/bin/${_TOOL_PREFIX}dtc
450TOOL_EQN= ${TOOLDIR}/bin/${_TOOL_PREFIX}eqn 449TOOL_EQN= ${TOOLDIR}/bin/${_TOOL_PREFIX}eqn
451TOOL_FDISK= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-fdisk 450TOOL_FDISK= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-fdisk
452TOOL_FGEN= ${TOOLDIR}/bin/${_TOOL_PREFIX}fgen 451TOOL_FGEN= ${TOOLDIR}/bin/${_TOOL_PREFIX}fgen
453TOOL_GENASSYM= ${TOOLDIR}/bin/${_TOOL_PREFIX}genassym 452TOOL_GENASSYM= ${TOOLDIR}/bin/${_TOOL_PREFIX}genassym
454TOOL_GENCAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}gencat 453TOOL_GENCAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}gencat
455TOOL_GMAKE= ${TOOLDIR}/bin/${_TOOL_PREFIX}gmake 454TOOL_GMAKE= ${TOOLDIR}/bin/${_TOOL_PREFIX}gmake
456TOOL_GPT= ${TOOLDIR}/bin/${_TOOL_PREFIX}gpt 455TOOL_GPT= ${TOOLDIR}/bin/${_TOOL_PREFIX}gpt
457TOOL_GREP= ${TOOLDIR}/bin/${_TOOL_PREFIX}grep 456TOOL_GREP= ${TOOLDIR}/bin/${_TOOL_PREFIX}grep
458GROFF_SHARE_PATH= ${TOOLDIR}/share/groff 457GROFF_SHARE_PATH= ${TOOLDIR}/share/groff
459TOOL_GROFF_ENV= \ 458TOOL_GROFF_ENV= \
460 GROFF_ENCODING= \ 459 GROFF_ENCODING= \
461 GROFF_BIN_PATH=${TOOLDIR}/lib/groff \ 460 GROFF_BIN_PATH=${TOOLDIR}/lib/groff \
462 GROFF_FONT_PATH=${GROFF_SHARE_PATH}/site-font:${GROFF_SHARE_PATH}/font \ 461 GROFF_FONT_PATH=${GROFF_SHARE_PATH}/site-font:${GROFF_SHARE_PATH}/font \
463 GROFF_TMAC_PATH=${GROFF_SHARE_PATH}/site-tmac:${GROFF_SHARE_PATH}/tmac 462 GROFF_TMAC_PATH=${GROFF_SHARE_PATH}/site-tmac:${GROFF_SHARE_PATH}/tmac
464TOOL_GROFF= ${TOOL_GROFF_ENV} ${TOOLDIR}/bin/${_TOOL_PREFIX}groff ${GROFF_FLAGS} 463TOOL_GROFF= ${TOOL_GROFF_ENV} ${TOOLDIR}/bin/${_TOOL_PREFIX}groff ${GROFF_FLAGS}
465 464
466TOOL_HEXDUMP= ${TOOLDIR}/bin/${_TOOL_PREFIX}hexdump 465TOOL_HEXDUMP= ${TOOLDIR}/bin/${_TOOL_PREFIX}hexdump
467TOOL_HP300MKBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}hp300-mkboot 466TOOL_HP300MKBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}hp300-mkboot
468TOOL_HPPAMKBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}hppa-mkboot 467TOOL_HPPAMKBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}hppa-mkboot
469TOOL_INDXBIB= ${TOOLDIR}/bin/${_TOOL_PREFIX}indxbib 468TOOL_INDXBIB= ${TOOLDIR}/bin/${_TOOL_PREFIX}indxbib
470TOOL_INSTALLBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}installboot 469TOOL_INSTALLBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}installboot
471TOOL_INSTALL_INFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}install-info 470TOOL_INSTALL_INFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}install-info
472TOOL_JOIN= ${TOOLDIR}/bin/${_TOOL_PREFIX}join 471TOOL_JOIN= ${TOOLDIR}/bin/${_TOOL_PREFIX}join
473TOOL_LLVM_TBLGEN= ${TOOLDIR}/bin/${_TOOL_PREFIX}llvm-tblgen 472TOOL_LLVM_TBLGEN= ${TOOLDIR}/bin/${_TOOL_PREFIX}llvm-tblgen
474TOOL_M4= ${TOOLDIR}/bin/${_TOOL_PREFIX}m4 473TOOL_M4= ${TOOLDIR}/bin/${_TOOL_PREFIX}m4
475TOOL_MACPPCFIXCOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}macppc-fixcoff 474TOOL_MACPPCFIXCOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}macppc-fixcoff
476TOOL_MAKEFS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makefs 475TOOL_MAKEFS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makefs
477TOOL_MAKEINFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}makeinfo 476TOOL_MAKEINFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}makeinfo
478TOOL_MAKEKEYS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makekeys 477TOOL_MAKEKEYS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makekeys
479TOOL_MAKESTRS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makestrs 478TOOL_MAKESTRS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makestrs
480TOOL_MAKEWHATIS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makewhatis 479TOOL_MAKEWHATIS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makewhatis
481TOOL_MANDOC_ASCII= ${TOOLDIR}/bin/${_TOOL_PREFIX}mandoc -Tascii 480TOOL_MANDOC_ASCII= ${TOOLDIR}/bin/${_TOOL_PREFIX}mandoc -Tascii
482TOOL_MANDOC_HTML= ${TOOLDIR}/bin/${_TOOL_PREFIX}mandoc -Thtml 481TOOL_MANDOC_HTML= ${TOOLDIR}/bin/${_TOOL_PREFIX}mandoc -Thtml
483TOOL_MANDOC_LINT= ${TOOLDIR}/bin/${_TOOL_PREFIX}mandoc -Tlint 482TOOL_MANDOC_LINT= ${TOOLDIR}/bin/${_TOOL_PREFIX}mandoc -Tlint
484TOOL_MDSETIMAGE= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-mdsetimage 483TOOL_MDSETIMAGE= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-mdsetimage
485TOOL_MENUC= MENUDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}menuc 484TOOL_MENUC= MENUDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}menuc
486TOOL_ARMELF2AOUT= ${TOOLDIR}/bin/${_TOOL_PREFIX}arm-elf2aout 485TOOL_ARMELF2AOUT= ${TOOLDIR}/bin/${_TOOL_PREFIX}arm-elf2aout
487TOOL_M68KELF2AOUT= ${TOOLDIR}/bin/${_TOOL_PREFIX}m68k-elf2aout 486TOOL_M68KELF2AOUT= ${TOOLDIR}/bin/${_TOOL_PREFIX}m68k-elf2aout
488TOOL_MIPSELF2ECOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}mips-elf2ecoff 487TOOL_MIPSELF2ECOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}mips-elf2ecoff
489TOOL_MKCSMAPPER= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkcsmapper 488TOOL_MKCSMAPPER= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkcsmapper
490TOOL_MKESDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkesdb 489TOOL_MKESDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkesdb
491TOOL_MKLOCALE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mklocale 490TOOL_MKLOCALE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mklocale
492TOOL_MKMAGIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}file 491TOOL_MKMAGIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}file
493TOOL_MKNOD= ${TOOLDIR}/bin/${_TOOL_PREFIX}mknod 492TOOL_MKNOD= ${TOOLDIR}/bin/${_TOOL_PREFIX}mknod
494TOOL_MKTEMP= ${TOOLDIR}/bin/${_TOOL_PREFIX}mktemp 493TOOL_MKTEMP= ${TOOLDIR}/bin/${_TOOL_PREFIX}mktemp
495TOOL_MKUBOOTIMAGE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkubootimage 494TOOL_MKUBOOTIMAGE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkubootimage
496TOOL_ELFTOSB= ${TOOLDIR}/bin/${_TOOL_PREFIX}elftosb 495TOOL_ELFTOSB= ${TOOLDIR}/bin/${_TOOL_PREFIX}elftosb
497TOOL_MSGC= MSGDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}msgc 496TOOL_MSGC= MSGDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}msgc
498TOOL_MTREE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mtree 497TOOL_MTREE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mtree
499TOOL_MVME68KWRTVID= ${TOOLDIR}/bin/${_TOOL_PREFIX}mvme68k-wrtvid 498TOOL_MVME68KWRTVID= ${TOOLDIR}/bin/${_TOOL_PREFIX}mvme68k-wrtvid
500TOOL_NBPERF= ${TOOLDIR}/bin/${_TOOL_PREFIX}perf 499TOOL_NBPERF= ${TOOLDIR}/bin/${_TOOL_PREFIX}perf
501TOOL_NCDCS= ${TOOLDIR}/bin/${_TOOL_PREFIX}ibmnws-ncdcs 500TOOL_NCDCS= ${TOOLDIR}/bin/${_TOOL_PREFIX}ibmnws-ncdcs
502TOOL_PAX= ${TOOLDIR}/bin/${_TOOL_PREFIX}pax 501TOOL_PAX= ${TOOLDIR}/bin/${_TOOL_PREFIX}pax
503TOOL_PIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}pic 502TOOL_PIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}pic
504TOOL_PIGZ= ${TOOLDIR}/bin/${_TOOL_PREFIX}pigz 503TOOL_PIGZ= ${TOOLDIR}/bin/${_TOOL_PREFIX}pigz
505TOOL_XZ= ${TOOLDIR}/bin/${_TOOL_PREFIX}xz 504TOOL_XZ= ${TOOLDIR}/bin/${_TOOL_PREFIX}xz
506TOOL_PKG_CREATE= ${TOOLDIR}/bin/${_TOOL_PREFIX}pkg_create 505TOOL_PKG_CREATE= ${TOOLDIR}/bin/${_TOOL_PREFIX}pkg_create
507TOOL_POWERPCMKBOOTIMAGE=${TOOLDIR}/bin/${_TOOL_PREFIX}powerpc-mkbootimage 506TOOL_POWERPCMKBOOTIMAGE=${TOOLDIR}/bin/${_TOOL_PREFIX}powerpc-mkbootimage
508TOOL_PWD_MKDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}pwd_mkdb 507TOOL_PWD_MKDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}pwd_mkdb
509TOOL_REFER= ${TOOLDIR}/bin/${_TOOL_PREFIX}refer 508TOOL_REFER= ${TOOLDIR}/bin/${_TOOL_PREFIX}refer
510TOOL_ROFF_ASCII= ${TOOL_GROFF_ENV} ${TOOLDIR}/bin/${_TOOL_PREFIX}nroff 509TOOL_ROFF_ASCII= ${TOOL_GROFF_ENV} ${TOOLDIR}/bin/${_TOOL_PREFIX}nroff
511TOOL_ROFF_DOCASCII= ${TOOL_GROFF} -Tascii 510TOOL_ROFF_DOCASCII= ${TOOL_GROFF} -Tascii
512TOOL_ROFF_DOCHTML= ${TOOL_GROFF} -Thtml 511TOOL_ROFF_DOCHTML= ${TOOL_GROFF} -Thtml
513TOOL_ROFF_DVI= ${TOOL_GROFF} -Tdvi ${ROFF_PAGESIZE} 512TOOL_ROFF_DVI= ${TOOL_GROFF} -Tdvi ${ROFF_PAGESIZE}
514TOOL_ROFF_HTML= ${TOOL_GROFF} -Tlatin1 -mdoc2html 513TOOL_ROFF_HTML= ${TOOL_GROFF} -Tlatin1 -mdoc2html
515TOOL_ROFF_PS= ${TOOL_GROFF} -Tps ${ROFF_PAGESIZE} 514TOOL_ROFF_PS= ${TOOL_GROFF} -Tps ${ROFF_PAGESIZE}
516TOOL_ROFF_RAW= ${TOOL_GROFF} -Z 515TOOL_ROFF_RAW= ${TOOL_GROFF} -Z
517TOOL_RPCGEN= RPCGEN_CPP=${CPP:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}rpcgen 516TOOL_RPCGEN= RPCGEN_CPP=${CPP:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}rpcgen
518TOOL_SED= ${TOOLDIR}/bin/${_TOOL_PREFIX}sed 517TOOL_SED= ${TOOLDIR}/bin/${_TOOL_PREFIX}sed
519TOOL_SLC= ${TOOLDIR}/bin/${_TOOL_PREFIX}slc 518TOOL_SLC= ${TOOLDIR}/bin/${_TOOL_PREFIX}slc
520TOOL_SOELIM= ${TOOLDIR}/bin/${_TOOL_PREFIX}soelim 519TOOL_SOELIM= ${TOOLDIR}/bin/${_TOOL_PREFIX}soelim
521TOOL_SORTINFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}sortinfo 520TOOL_SORTINFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}sortinfo
522TOOL_SPARKCRC= ${TOOLDIR}/bin/${_TOOL_PREFIX}sparkcrc 521TOOL_SPARKCRC= ${TOOLDIR}/bin/${_TOOL_PREFIX}sparkcrc
523TOOL_STAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}stat 522TOOL_STAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}stat
524TOOL_STRFILE= ${TOOLDIR}/bin/${_TOOL_PREFIX}strfile 523TOOL_STRFILE= ${TOOLDIR}/bin/${_TOOL_PREFIX}strfile
525TOOL_SUNLABEL= ${TOOLDIR}/bin/${_TOOL_PREFIX}sunlabel 524TOOL_SUNLABEL= ${TOOLDIR}/bin/${_TOOL_PREFIX}sunlabel
526TOOL_TBL= ${TOOLDIR}/bin/${_TOOL_PREFIX}tbl 525TOOL_TBL= ${TOOLDIR}/bin/${_TOOL_PREFIX}tbl
527TOOL_TIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}tic 526TOOL_TIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}tic
528TOOL_UUDECODE= ${TOOLDIR}/bin/${_TOOL_PREFIX}uudecode 527TOOL_UUDECODE= ${TOOLDIR}/bin/${_TOOL_PREFIX}uudecode
529TOOL_VGRIND= ${TOOLDIR}/bin/${_TOOL_PREFIX}vgrind -f 528TOOL_VGRIND= ${TOOLDIR}/bin/${_TOOL_PREFIX}vgrind -f
530TOOL_VFONTEDPR= ${TOOLDIR}/libexec/${_TOOL_PREFIX}vfontedpr 529TOOL_VFONTEDPR= ${TOOLDIR}/libexec/${_TOOL_PREFIX}vfontedpr
531TOOL_ZIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}zic 530TOOL_ZIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}zic
532 531
533.else # USETOOLS != yes # } { 532.else # USETOOLS != yes # } {
534 533
535# Clang supports C, C++ and Objective C 534# Clang supports C, C++ and Objective C
536TOOL_CC.clang= clang 535TOOL_CC.clang= clang
537TOOL_CPP.clang= clang-cpp 536TOOL_CPP.clang= clang-cpp
538TOOL_CXX.clang= clang++ 537TOOL_CXX.clang= clang++
539TOOL_OBJC.clang= clang 538TOOL_OBJC.clang= clang
540 539
541# GCC supports C, C++, Fortran and Objective C 540# GCC supports C, C++, Fortran and Objective C
542TOOL_CC.gcc= gcc 541TOOL_CC.gcc= gcc
543TOOL_CPP.gcc= cpp 542TOOL_CPP.gcc= cpp
544TOOL_CXX.gcc= c++ 543TOOL_CXX.gcc= c++
545TOOL_FC.gcc= gfortran 544TOOL_FC.gcc= gfortran
546TOOL_OBJC.gcc= gcc 545TOOL_OBJC.gcc= gcc
547 546
548# PCC supports C and Fortran 547# PCC supports C and Fortran
549TOOL_CC.pcc= pcc 548TOOL_CC.pcc= pcc
550TOOL_CPP.pcc= pcpp 549TOOL_CPP.pcc= pcpp
551TOOL_CXX.pcc= p++ 550TOOL_CXX.pcc= p++
552 551
553TOOL_AMIGAAOUT2BB= amiga-aout2bb 552TOOL_AMIGAAOUT2BB= amiga-aout2bb
554TOOL_AMIGAELF2BB= amiga-elf2bb 553TOOL_AMIGAELF2BB= amiga-elf2bb
555TOOL_AMIGATXLT= amiga-txlt 554TOOL_AMIGATXLT= amiga-txlt
556TOOL_ASN1_COMPILE= asn1_compile 555TOOL_ASN1_COMPILE= asn1_compile
557TOOL_AWK= awk 556TOOL_AWK= awk
558TOOL_CAP_MKDB= cap_mkdb 557TOOL_CAP_MKDB= cap_mkdb
559TOOL_CAT= cat 558TOOL_CAT= cat
560TOOL_CKSUM= cksum 559TOOL_CKSUM= cksum
561TOOL_CLANG_TBLGEN= clang-tblgen 560TOOL_CLANG_TBLGEN= clang-tblgen
562TOOL_COMPILE_ET= compile_et 561TOOL_COMPILE_ET= compile_et
563TOOL_CONFIG= config 562TOOL_CONFIG= config
564TOOL_CRUNCHGEN= crunchgen 563TOOL_CRUNCHGEN= crunchgen
565TOOL_CTAGS= ctags 564TOOL_CTAGS= ctags
566TOOL_CTFCONVERT= ctfconvert 565TOOL_CTFCONVERT= ctfconvert
567TOOL_CTFMERGE= ctfmerge 566TOOL_CTFMERGE= ctfmerge
568TOOL_CVSLATEST= cvslatest 567TOOL_CVSLATEST= cvslatest
569TOOL_DATE= date 568TOOL_DATE= date
570TOOL_DB= db 569TOOL_DB= db
571TOOL_DISKLABEL= disklabel 570TOOL_DISKLABEL= disklabel
572TOOL_DTC= dtc 571TOOL_DTC= dtc
573TOOL_EQN= eqn 572TOOL_EQN= eqn
574TOOL_FDISK= fdisk 573TOOL_FDISK= fdisk
575TOOL_FGEN= fgen 574TOOL_FGEN= fgen
576TOOL_GENASSYM= genassym 575TOOL_GENASSYM= genassym
577TOOL_GENCAT= gencat 576TOOL_GENCAT= gencat
578TOOL_GMAKE= gmake 577TOOL_GMAKE= gmake
579TOOL_GPT= gpt 578TOOL_GPT= gpt
580TOOL_GREP= grep 579TOOL_GREP= grep
581TOOL_GROFF= groff 580TOOL_GROFF= groff
582TOOL_HEXDUMP= hexdump 581TOOL_HEXDUMP= hexdump
583TOOL_HP300MKBOOT= hp300-mkboot 582TOOL_HP300MKBOOT= hp300-mkboot
584TOOL_HPPAMKBOOT= hppa-mkboot 583TOOL_HPPAMKBOOT= hppa-mkboot
585TOOL_INDXBIB= indxbib 584TOOL_INDXBIB= indxbib
586TOOL_INSTALLBOOT= installboot 585TOOL_INSTALLBOOT= installboot
587TOOL_INSTALL_INFO= install-info 586TOOL_INSTALL_INFO= install-info
588TOOL_JOIN= join 587TOOL_JOIN= join
589TOOL_LLVM_TBLGEN= llvm-tblgen 588TOOL_LLVM_TBLGEN= llvm-tblgen
590TOOL_M4= m4 589TOOL_M4= m4
591TOOL_MACPPCFIXCOFF= macppc-fixcoff 590TOOL_MACPPCFIXCOFF= macppc-fixcoff
592TOOL_MAKEFS= makefs 591TOOL_MAKEFS= makefs
593TOOL_MAKEINFO= makeinfo 592TOOL_MAKEINFO= makeinfo
594TOOL_MAKEKEYS= makekeys 593TOOL_MAKEKEYS= makekeys
595TOOL_MAKESTRS= makestrs 594TOOL_MAKESTRS= makestrs
596TOOL_MAKEWHATIS= /usr/libexec/makewhatis 595TOOL_MAKEWHATIS= /usr/libexec/makewhatis
597TOOL_MANDOC_ASCII= mandoc -Tascii 596TOOL_MANDOC_ASCII= mandoc -Tascii
598TOOL_MANDOC_HTML= mandoc -Thtml 597TOOL_MANDOC_HTML= mandoc -Thtml
599TOOL_MANDOC_LINT= mandoc -Tlint 598TOOL_MANDOC_LINT= mandoc -Tlint
600TOOL_MDSETIMAGE= mdsetimage 599TOOL_MDSETIMAGE= mdsetimage
601TOOL_MENUC= menuc 600TOOL_MENUC= menuc
602TOOL_ARMELF2AOUT= arm-elf2aout 601TOOL_ARMELF2AOUT= arm-elf2aout
603TOOL_M68KELF2AOUT= m68k-elf2aout 602TOOL_M68KELF2AOUT= m68k-elf2aout
604TOOL_MIPSELF2ECOFF= mips-elf2ecoff 603TOOL_MIPSELF2ECOFF= mips-elf2ecoff
605TOOL_MKCSMAPPER= mkcsmapper 604TOOL_MKCSMAPPER= mkcsmapper
606TOOL_MKESDB= mkesdb 605TOOL_MKESDB= mkesdb
607TOOL_MKLOCALE= mklocale 606TOOL_MKLOCALE= mklocale
608TOOL_MKMAGIC= file 607TOOL_MKMAGIC= file
609TOOL_MKNOD= mknod 608TOOL_MKNOD= mknod
610TOOL_MKTEMP= mktemp 609TOOL_MKTEMP= mktemp
611TOOL_MKUBOOTIMAGE= mkubootimage 610TOOL_MKUBOOTIMAGE= mkubootimage
612TOOL_ELFTOSB= elftosb 611TOOL_ELFTOSB= elftosb
613TOOL_MSGC= msgc 612TOOL_MSGC= msgc
614TOOL_MTREE= mtree 613TOOL_MTREE= mtree
615TOOL_MVME68KWRTVID= wrtvid 614TOOL_MVME68KWRTVID= wrtvid
616TOOL_NBPERF= nbperf 615TOOL_NBPERF= nbperf
617TOOL_NCDCS= ncdcs 616TOOL_NCDCS= ncdcs
618TOOL_PAX= pax 617TOOL_PAX= pax
619TOOL_PIC= pic 618TOOL_PIC= pic
620TOOL_PIGZ= pigz 619TOOL_PIGZ= pigz
621TOOL_XZ= xz 620TOOL_XZ= xz
622TOOL_PKG_CREATE= pkg_create 621TOOL_PKG_CREATE= pkg_create
623TOOL_POWERPCMKBOOTIMAGE= powerpc-mkbootimage 622TOOL_POWERPCMKBOOTIMAGE= powerpc-mkbootimage
624TOOL_PWD_MKDB= pwd_mkdb 623TOOL_PWD_MKDB= pwd_mkdb
625TOOL_REFER= refer 624TOOL_REFER= refer
626TOOL_ROFF_ASCII= nroff 625TOOL_ROFF_ASCII= nroff
627TOOL_ROFF_DOCASCII= ${TOOL_GROFF} -Tascii 626TOOL_ROFF_DOCASCII= ${TOOL_GROFF} -Tascii
628TOOL_ROFF_DOCHTML= ${TOOL_GROFF} -Thtml 627TOOL_ROFF_DOCHTML= ${TOOL_GROFF} -Thtml
629TOOL_ROFF_DVI= ${TOOL_GROFF} -Tdvi ${ROFF_PAGESIZE} 628TOOL_ROFF_DVI= ${TOOL_GROFF} -Tdvi ${ROFF_PAGESIZE}
630TOOL_ROFF_HTML= ${TOOL_GROFF} -Tlatin1 -mdoc2html 629TOOL_ROFF_HTML= ${TOOL_GROFF} -Tlatin1 -mdoc2html
631TOOL_ROFF_PS= ${TOOL_GROFF} -Tps ${ROFF_PAGESIZE} 630TOOL_ROFF_PS= ${TOOL_GROFF} -Tps ${ROFF_PAGESIZE}
632TOOL_ROFF_RAW= ${TOOL_GROFF} -Z 631TOOL_ROFF_RAW= ${TOOL_GROFF} -Z
633TOOL_RPCGEN= rpcgen 632TOOL_RPCGEN= rpcgen
634TOOL_SED= sed 633TOOL_SED= sed
635TOOL_SOELIM= soelim 634TOOL_SOELIM= soelim
636TOOL_SORTINFO= sortinfo 635TOOL_SORTINFO= sortinfo
637TOOL_SPARKCRC= sparkcrc 636TOOL_SPARKCRC= sparkcrc
638TOOL_STAT= stat 637TOOL_STAT= stat
639TOOL_STRFILE= strfile 638TOOL_STRFILE= strfile
640TOOL_SUNLABEL= sunlabel 639TOOL_SUNLABEL= sunlabel
641TOOL_TBL= tbl 640TOOL_TBL= tbl
642TOOL_TIC= tic 641TOOL_TIC= tic
643TOOL_UUDECODE= uudecode 642TOOL_UUDECODE= uudecode
644TOOL_VGRIND= vgrind -f 643TOOL_VGRIND= vgrind -f
645TOOL_VFONTEDPR= /usr/libexec/vfontedpr 644TOOL_VFONTEDPR= /usr/libexec/vfontedpr
646TOOL_ZIC= zic 645TOOL_ZIC= zic
647 646
648.endif # USETOOLS != yes # } 647.endif # USETOOLS != yes # }
649 648
650# Standalone code should not be compiled with PIE or CTF 649# Standalone code should not be compiled with PIE or CTF
651# Should create a better test 650# Should create a better test
652.if defined(BINDIR) && ${BINDIR} == "/usr/mdec" 651.if defined(BINDIR) && ${BINDIR} == "/usr/mdec"
653NOPIE= # defined 652NOPIE= # defined
654NOCTF= # defined 653NOCTF= # defined
655.elif ${MACHINE} == "sun2" 654.elif ${MACHINE} == "sun2"
656NOPIE= # we don't have PIC, so no PIE 655NOPIE= # we don't have PIC, so no PIE
657.endif 656.endif
658 657
659# Fallback to ensure that all variables are defined to something 658# Fallback to ensure that all variables are defined to something
660TOOL_CC.false= false 659TOOL_CC.false= false
661TOOL_CPP.false= false 660TOOL_CPP.false= false
662TOOL_CXX.false= false 661TOOL_CXX.false= false
663TOOL_FC.false= false 662TOOL_FC.false= false
664TOOL_OBJC.false= false 663TOOL_OBJC.false= false
665 664
666AVAILABLE_COMPILER?= ${HAVE_PCC:Dpcc} ${HAVE_LLVM:Dclang} ${HAVE_GCC:Dgcc} false 665AVAILABLE_COMPILER?= ${HAVE_PCC:Dpcc} ${HAVE_LLVM:Dclang} ${HAVE_GCC:Dgcc} false
667 666
668.for _t in CC CPP CXX FC OBJC 667.for _t in CC CPP CXX FC OBJC
669ACTIVE_${_t}= ${AVAILABLE_COMPILER:@.c.@ ${ !defined(UNSUPPORTED_COMPILER.${.c.}) && defined(TOOL_${_t}.${.c.}) :? ${.c.} : }@:[1]} 668ACTIVE_${_t}= ${AVAILABLE_COMPILER:@.c.@ ${ !defined(UNSUPPORTED_COMPILER.${.c.}) && defined(TOOL_${_t}.${.c.}) :? ${.c.} : }@:[1]}
670SUPPORTED_${_t}=${AVAILABLE_COMPILER:Nfalse:@.c.@ ${ !defined(UNSUPPORTED_COMPILER.${.c.}) && defined(TOOL_${_t}.${.c.}) :? ${.c.} : }@} 669SUPPORTED_${_t}=${AVAILABLE_COMPILER:Nfalse:@.c.@ ${ !defined(UNSUPPORTED_COMPILER.${.c.}) && defined(TOOL_${_t}.${.c.}) :? ${.c.} : }@}
671.endfor 670.endfor
672# make bugs prevent moving this into the .for loop 671# make bugs prevent moving this into the .for loop
673CC= ${TOOL_CC.${ACTIVE_CC}} 672CC= ${TOOL_CC.${ACTIVE_CC}}
674CPP= ${TOOL_CPP.${ACTIVE_CPP}} 673CPP= ${TOOL_CPP.${ACTIVE_CPP}}
675CXX= ${TOOL_CXX.${ACTIVE_CXX}} 674CXX= ${TOOL_CXX.${ACTIVE_CXX}}
676FC= ${TOOL_FC.${ACTIVE_FC}} 675FC= ${TOOL_FC.${ACTIVE_FC}}
677OBJC= ${TOOL_OBJC.${ACTIVE_OBJC}} 676OBJC= ${TOOL_OBJC.${ACTIVE_OBJC}}
678 677
679# For each ${MACHINE_CPU}, list the ports that use it. 678# For each ${MACHINE_CPU}, list the ports that use it.
680MACHINES.aarch64= evbarm 679MACHINES.aarch64= evbarm
681MACHINES.alpha= alpha 680MACHINES.alpha= alpha
682MACHINES.arm= acorn32 cats epoc32 evbarm hpcarm \ 681MACHINES.arm= acorn32 cats epoc32 evbarm hpcarm \
683 iyonix netwinder shark zaurus 682 iyonix netwinder shark zaurus
684MACHINES.coldfire= evbcf 683MACHINES.coldfire= evbcf
685MACHINES.i386= i386 684MACHINES.i386= i386
686MACHINES.ia64= ia64 685MACHINES.ia64= ia64
687MACHINES.hppa= hppa 686MACHINES.hppa= hppa
688MACHINES.m68000= sun2 687MACHINES.m68000= sun2
689MACHINES.m68k= amiga atari cesfic hp300 luna68k mac68k \ 688MACHINES.m68k= amiga atari cesfic hp300 luna68k mac68k \
690 news68k next68k sun3 x68k 689 news68k next68k sun3 x68k
691MACHINES.mips= algor arc cobalt emips evbmips ews4800mips \ 690MACHINES.mips= algor arc cobalt emips evbmips ews4800mips \
692 hpcmips mipsco newsmips pmax sbmips sgimips 691 hpcmips mipsco newsmips pmax sbmips sgimips
693MACHINES.or1k= or1k 692MACHINES.or1k= or1k
694MACHINES.powerpc= amigappc bebox evbppc ibmnws macppc mvmeppc \ 693MACHINES.powerpc= amigappc bebox evbppc ibmnws macppc mvmeppc \
695 ofppc prep rs6000 sandpoint 694 ofppc prep rs6000 sandpoint
696MACHINES.riscv= riscv 695MACHINES.riscv= riscv
697MACHINES.sh3= dreamcast evbsh3 hpcsh landisk mmeye 696MACHINES.sh3= dreamcast evbsh3 hpcsh landisk mmeye
698MACHINES.sparc= sparc sparc64 697MACHINES.sparc= sparc sparc64
699MACHINES.sparc64= sparc64 698MACHINES.sparc64= sparc64
700MACHINES.vax= vax 699MACHINES.vax= vax
701MACHINES.x86_64= amd64 700MACHINES.x86_64= amd64
702 701
703# OBJCOPY flags to create a.out binaries for old firmware 702# OBJCOPY flags to create a.out binaries for old firmware
704# shared among src/distrib and ${MACHINE}/conf/Makefile.${MACHINE}.inc 703# shared among src/distrib and ${MACHINE}/conf/Makefile.${MACHINE}.inc
705.if ${MACHINE_CPU} == "arm" 704.if ${MACHINE_CPU} == "arm"
706OBJCOPY_ELF2AOUT_FLAGS?= \ 705OBJCOPY_ELF2AOUT_FLAGS?= \
707 -O a.out-arm-netbsd \ 706 -O a.out-arm-netbsd \
708 -R .ident \ 707 -R .ident \
709 -R .ARM.attributes \ 708 -R .ARM.attributes \
710 -R .ARM.exidx \ 709 -R .ARM.exidx \
711 -R .ARM.extab \ 710 -R .ARM.extab \
712 -R .SUNW_ctf \ 711 -R .SUNW_ctf \
713 -R .arm.atpcs \ 712 -R .arm.atpcs \
714 -R .comment \ 713 -R .comment \
715 -R .debug_abbrev \ 714 -R .debug_abbrev \
716 -R .debug_aranges \ 715 -R .debug_aranges \
717 -R .debug_info \ 716 -R .debug_info \
718 -R .debug_line \ 717 -R .debug_line \
719 -R .debug_frame \ 718 -R .debug_frame \
720 -R .debug_loc \ 719 -R .debug_loc \
721 -R .debug_pubnames \ 720 -R .debug_pubnames \
722 -R .debug_pubtypes \ 721 -R .debug_pubtypes \
723 -R .debug_ranges \ 722 -R .debug_ranges \
724 -R .debug_str \ 723 -R .debug_str \
725 -R .debug_macinfo \ 724 -R .debug_macinfo \
726 -R .eh_frame \ 725 -R .eh_frame \
727 -R .note.netbsd.ident 726 -R .note.netbsd.ident
728.endif 727.endif
729 728
730# 729#
731# Targets to check if DESTDIR or RELEASEDIR is provided 730# Targets to check if DESTDIR or RELEASEDIR is provided
732# 731#
733.if !target(check_DESTDIR) 732.if !target(check_DESTDIR)
734check_DESTDIR: .PHONY .NOTMAIN 733check_DESTDIR: .PHONY .NOTMAIN
735.if !defined(DESTDIR) 734.if !defined(DESTDIR)
736 @echo "setenv DESTDIR before doing that!" 735 @echo "setenv DESTDIR before doing that!"
737 @false 736 @false
738.else 737.else
739 @true 738 @true
740.endif 739.endif
741.endif 740.endif
742 741
743.if !target(check_RELEASEDIR) 742.if !target(check_RELEASEDIR)
744check_RELEASEDIR: .PHONY .NOTMAIN 743check_RELEASEDIR: .PHONY .NOTMAIN
745.if !defined(RELEASEDIR) 744.if !defined(RELEASEDIR)
746 @echo "setenv RELEASEDIR before doing that!" 745 @echo "setenv RELEASEDIR before doing that!"
747 @false 746 @false
748.else 747.else
749 @true 748 @true
750.endif 749.endif
751.endif 750.endif
752 751
753# 752#
754# Where the system object and source trees are kept; can be configurable 753# Where the system object and source trees are kept; can be configurable
755# by the user in case they want them in ~/foosrc and ~/fooobj (for example). 754# by the user in case they want them in ~/foosrc and ~/fooobj (for example).
756# 755#
757BSDSRCDIR?= /usr/src 756BSDSRCDIR?= /usr/src
758BSDOBJDIR?= /usr/obj 757BSDOBJDIR?= /usr/obj
759NETBSDSRCDIR?= ${BSDSRCDIR} 758NETBSDSRCDIR?= ${BSDSRCDIR}
760 759
761BINGRP?= wheel 760BINGRP?= wheel
762BINOWN?= root 761BINOWN?= root
763BINMODE?= 555 762BINMODE?= 555
764NONBINMODE?= 444 763NONBINMODE?= 444
765 764
766# These are here mainly because we don't want suid root in case 765# These are here mainly because we don't want suid root in case
767# a Makefile defines BINMODE. 766# a Makefile defines BINMODE.
768RUMPBINGRP?= wheel 767RUMPBINGRP?= wheel
769RUMPBINOWN?= root 768RUMPBINOWN?= root
770RUMPBINMODE?= 555 769RUMPBINMODE?= 555
771RUMPNONBINMODE?=444 770RUMPNONBINMODE?=444
772 771
773MANDIR?= /usr/share/man 772MANDIR?= /usr/share/man
774MANGRP?= wheel 773MANGRP?= wheel
775MANOWN?= root 774MANOWN?= root
776MANMODE?= ${NONBINMODE} 775MANMODE?= ${NONBINMODE}
777MANINSTALL?= ${_MANINSTALL} 776MANINSTALL?= ${_MANINSTALL}
778 777
779INFODIR?= /usr/share/info 778INFODIR?= /usr/share/info
780INFOGRP?= wheel 779INFOGRP?= wheel
781INFOOWN?= root 780INFOOWN?= root
782INFOMODE?= ${NONBINMODE} 781INFOMODE?= ${NONBINMODE}
783 782
784LIBDIR?= /usr/lib 783LIBDIR?= /usr/lib
785 784
786LINTLIBDIR?= /usr/libdata/lint 785LINTLIBDIR?= /usr/libdata/lint
787LIBGRP?= ${BINGRP} 786LIBGRP?= ${BINGRP}
788LIBOWN?= ${BINOWN} 787LIBOWN?= ${BINOWN}
789LIBMODE?= ${NONBINMODE} 788LIBMODE?= ${NONBINMODE}
790 789
791DOCDIR?= /usr/share/doc 790DOCDIR?= /usr/share/doc
792DOCGRP?= wheel 791DOCGRP?= wheel
793DOCOWN?= root 792DOCOWN?= root
794DOCMODE?= ${NONBINMODE} 793DOCMODE?= ${NONBINMODE}
795 794
796NLSDIR?= /usr/share/nls 795NLSDIR?= /usr/share/nls
797NLSGRP?= wheel 796NLSGRP?= wheel
798NLSOWN?= root 797NLSOWN?= root
799NLSMODE?= ${NONBINMODE} 798NLSMODE?= ${NONBINMODE}
800 799
801KMODULEGRP?= wheel 800KMODULEGRP?= wheel
802KMODULEOWN?= root 801KMODULEOWN?= root
803KMODULEMODE?= ${NONBINMODE} 802KMODULEMODE?= ${NONBINMODE}
804 803
805LOCALEDIR?= /usr/share/locale 804LOCALEDIR?= /usr/share/locale
806LOCALEGRP?= wheel 805LOCALEGRP?= wheel
807LOCALEOWN?= root 806LOCALEOWN?= root
808LOCALEMODE?= ${NONBINMODE} 807LOCALEMODE?= ${NONBINMODE}
809 808
810FIRMWAREDIR?= /libdata/firmware 809FIRMWAREDIR?= /libdata/firmware
811FIRMWAREGRP?= wheel 810FIRMWAREGRP?= wheel
812FIRMWAREOWN?= root 811FIRMWAREOWN?= root
813FIRMWAREMODE?= ${NONBINMODE} 812FIRMWAREMODE?= ${NONBINMODE}
814 813
815DEBUGDIR?= /usr/libdata/debug 814DEBUGDIR?= /usr/libdata/debug
816DEBUGGRP?= wheel 815DEBUGGRP?= wheel
817DEBUGOWN?= root 816DEBUGOWN?= root
818DEBUGMODE?= ${NONBINMODE} 817DEBUGMODE?= ${NONBINMODE}
819 818
820DTBDIR?= /boot/dtb 819DTBDIR?= /boot/dtb
821DTBGRP?= wheel 820DTBGRP?= wheel
822DTBOWN?= root 821DTBOWN?= root
823DTBMODE?= ${NONBINMODE} 822DTBMODE?= ${NONBINMODE}
824 823
825MKDIRMODE?= 0755 824MKDIRMODE?= 0755
826MKDIRPERM?= -m ${MKDIRMODE} 825MKDIRPERM?= -m ${MKDIRMODE}
827 826
828# 827#
829# Data-driven table using make variables to control how 828# Data-driven table using make variables to control how
830# toolchain-dependent targets and shared libraries are built 829# toolchain-dependent targets and shared libraries are built
831# for different platforms and object formats. 830# for different platforms and object formats.
832# 831#
833# OBJECT_FMT: currently either "ELF" or "a.out". 832# OBJECT_FMT: currently either "ELF" or "a.out".
834# 833#
835# All platforms are ELF. 834# All platforms are ELF.
836# 835#
837OBJECT_FMT= ELF 836OBJECT_FMT= ELF
838 837
839# 838#
840# If this platform's toolchain is missing, we obviously cannot build it. 839# If this platform's toolchain is missing, we obviously cannot build it.
841# 840#
842.if ${TOOLCHAIN_MISSING} != "no" 841.if ${TOOLCHAIN_MISSING} != "no"
843MKBINUTILS:= no 842MKBINUTILS:= no
844MKGDB:= no 843MKGDB:= no
845MKGCC:= no 844MKGCC:= no
846.endif 845.endif
847 846
848# 847#
849# If we are using an external toolchain, we can still build the target's 848# If we are using an external toolchain, we can still build the target's
850# binutils, but we cannot build GCC's support libraries, since those are 849# binutils, but we cannot build GCC's support libraries, since those are
851# tightly-coupled to the version of GCC being used. 850# tightly-coupled to the version of GCC being used.
852# 851#
853.if defined(EXTERNAL_TOOLCHAIN) 852.if defined(EXTERNAL_TOOLCHAIN)
854MKGCC:= no 853MKGCC:= no
855.endif 854.endif
856 855
857MKGDB.or1k= no 856MKGDB.or1k= no
858MKGDB.riscv32= no 857MKGDB.riscv32= no
859MKGDB.riscv64= no 858MKGDB.riscv64= no
860 859
861# No kernel modules for or1k, riscv or mips (yet) 860# No kernel modules for or1k, riscv or mips (yet)
862MKKMOD.or1k= no 861MKKMOD.or1k= no
863MKKMOD.riscv32= no 862MKKMOD.riscv32= no
864MKKMOD.riscv64= no 863MKKMOD.riscv64= no
865 864
866# No profiling for or1k (yet) 865# No profiling for or1k (yet)
867MKPROFILE.or1k= no 866MKPROFILE.or1k= no
868MKPROFILE.riscv32=no 867MKPROFILE.riscv32=no
869MKPROFILE.riscv64=no 868MKPROFILE.riscv64=no
870 869
871# 870#
872# The m68000 port is incomplete. 871# The m68000 port is incomplete.
873# 872#
874.if ${MACHINE_ARCH} == "m68000" 873.if ${MACHINE_ARCH} == "m68000"
875NOPIC= # defined 874NOPIC= # defined
876MKISCSI= no 875MKISCSI= no
877# XXX GCC 4 outputs mcount() calling sequences that try to load values 876# XXX GCC 4 outputs mcount() calling sequences that try to load values
878# from over 64KB away and this fails to assemble. 877# from over 64KB away and this fails to assemble.
879.if defined(HAVE_GCC) 878.if defined(HAVE_GCC)
880NOPROFILE= # defined 879NOPROFILE= # defined
881.endif 880.endif
882.endif 881.endif
883 882
884# 883#
885# GCC warnings with simple disables. Use these with eg 884# GCC warnings with simple disables. Use these with eg
886# COPTS.foo.c+= ${GCC_NO_STRINGOP_TRUNCATION}. 885# COPTS.foo.c+= ${GCC_NO_STRINGOP_TRUNCATION}.
887# 886#
888GCC_NO_FORMAT_TRUNCATION= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-format-truncation :} 887GCC_NO_FORMAT_TRUNCATION= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-format-truncation :}
889GCC_NO_FORMAT_OVERFLOW= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-format-overflow :} 888GCC_NO_FORMAT_OVERFLOW= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-format-overflow :}
890GCC_NO_STRINGOP_OVERFLOW= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-stringop-overflow :} 889GCC_NO_STRINGOP_OVERFLOW= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-stringop-overflow :}
891GCC_NO_IMPLICIT_FALLTHRU= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-implicit-fallthrough :}  890GCC_NO_IMPLICIT_FALLTHRU= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-implicit-fallthrough :}
892GCC_NO_STRINGOP_TRUNCATION= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -Wno-stringop-truncation :} 891GCC_NO_STRINGOP_TRUNCATION= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -Wno-stringop-truncation :}
893GCC_NO_CAST_FUNCTION_TYPE= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -Wno-cast-function-type :} 892GCC_NO_CAST_FUNCTION_TYPE= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -Wno-cast-function-type :}
894GCC_NO_ADDR_OF_PACKED_MEMBER= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 9:? -Wno-address-of-packed-member :} 893GCC_NO_ADDR_OF_PACKED_MEMBER= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 9:? -Wno-address-of-packed-member :}
895GCC_NO_MAYBE_UNINITIALIZED= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-maybe-uninitialized :} 894GCC_NO_MAYBE_UNINITIALIZED= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-maybe-uninitialized :}
896GCC_NO_RETURN_LOCAL_ADDR= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-return-local-addr :} 895GCC_NO_RETURN_LOCAL_ADDR= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-return-local-addr :}
897 896
898# 897#
899# Clang warnings 898# Clang warnings
900# 899#
901CLANG_NO_ADDR_OF_PACKED_MEMBER= ${${ACTIVE_CC} == "clang" :? -Wno-error=address-of-packed-member :} 900CLANG_NO_ADDR_OF_PACKED_MEMBER= ${${ACTIVE_CC} == "clang" :? -Wno-error=address-of-packed-member :}
902 901
903NO_ADDR_OF_PACKED_MEMBER= ${CLANG_NO_ADDR_OF_PACKED_MEMBER} ${GCC_NO_ADDR_OF_PACKED_MEMBER} 902NO_ADDR_OF_PACKED_MEMBER= ${CLANG_NO_ADDR_OF_PACKED_MEMBER} ${GCC_NO_ADDR_OF_PACKED_MEMBER}
904 903
905# 904#
906# The ia64 port is incomplete. 905# The ia64 port is incomplete.
907# 906#
908MKGDB.ia64= no 907MKGDB.ia64= no
909 908
910# 909#
911# On VAX using ELF, all objects are PIC, not just shared libraries, 910# On VAX using ELF, all objects are PIC, not just shared libraries,
912# so don't build the _pic version. VAX has no native TLS support either, 911# so don't build the _pic version. VAX has no native TLS support either,
913# so differences between TLS models are not relevant. 912# so differences between TLS models are not relevant.
914# 913#
915MKPICLIB.vax= no 914MKPICLIB.vax= no
916 915
917# 916#
918# Location of the file that contains the major and minor numbers of the 917# Location of the file that contains the major and minor numbers of the
919# version of a shared library. If this file exists a shared library 918# version of a shared library. If this file exists a shared library
920# will be built by <bsd.lib.mk>. 919# will be built by <bsd.lib.mk>.
921# 920#
922SHLIB_VERSION_FILE?= ${.CURDIR}/shlib_version 921SHLIB_VERSION_FILE?= ${.CURDIR}/shlib_version
923 922
924# 923#
925# GNU sources and packages sometimes see architecture names differently. 924# GNU sources and packages sometimes see architecture names differently.
926# 925#
927GNU_ARCH.aarch64eb=aarch64_be 926GNU_ARCH.aarch64eb=aarch64_be
928GNU_ARCH.coldfire=m5407 927GNU_ARCH.coldfire=m5407
929GNU_ARCH.earm=arm 928GNU_ARCH.earm=arm
930GNU_ARCH.earmhf=arm 929GNU_ARCH.earmhf=arm
931GNU_ARCH.earmeb=armeb 930GNU_ARCH.earmeb=armeb
932GNU_ARCH.earmhfeb=armeb 931GNU_ARCH.earmhfeb=armeb
933GNU_ARCH.earmv4=armv4 932GNU_ARCH.earmv4=armv4
934GNU_ARCH.earmv4eb=armv4eb 933GNU_ARCH.earmv4eb=armv4eb
935GNU_ARCH.earmv5=arm 934GNU_ARCH.earmv5=arm
936GNU_ARCH.earmv5hf=arm 935GNU_ARCH.earmv5hf=arm
937GNU_ARCH.earmv5eb=armeb 936GNU_ARCH.earmv5eb=armeb
938GNU_ARCH.earmv5hfeb=armeb 937GNU_ARCH.earmv5hfeb=armeb
939GNU_ARCH.earmv6=armv6 938GNU_ARCH.earmv6=armv6
940GNU_ARCH.earmv6hf=armv6 939GNU_ARCH.earmv6hf=armv6
941GNU_ARCH.earmv6eb=armv6eb 940GNU_ARCH.earmv6eb=armv6eb
942GNU_ARCH.earmv6hfeb=armv6eb 941GNU_ARCH.earmv6hfeb=armv6eb
943GNU_ARCH.earmv7=armv7 942GNU_ARCH.earmv7=armv7
944GNU_ARCH.earmv7hf=armv7 943GNU_ARCH.earmv7hf=armv7
945GNU_ARCH.earmv7eb=armv7eb 944GNU_ARCH.earmv7eb=armv7eb
946GNU_ARCH.earmv7hfeb=armv7eb 945GNU_ARCH.earmv7hfeb=armv7eb
947GNU_ARCH.i386=i486 946GNU_ARCH.i386=i486
948GCC_CONFIG_ARCH.i386=i486 947GCC_CONFIG_ARCH.i386=i486
949GCC_CONFIG_TUNE.i386=nocona 948GCC_CONFIG_TUNE.i386=nocona
950GCC_CONFIG_TUNE.x86_64=nocona 949GCC_CONFIG_TUNE.x86_64=nocona
951GNU_ARCH.m68000=m68010 950GNU_ARCH.m68000=m68010
952GNU_ARCH.sh3eb=sh 951GNU_ARCH.sh3eb=sh
953GNU_ARCH.sh3el=shle 952GNU_ARCH.sh3el=shle
954GNU_ARCH.mips64eb=mips64 953GNU_ARCH.mips64eb=mips64
955MACHINE_GNU_ARCH=${GNU_ARCH.${MACHINE_ARCH}:U${MACHINE_ARCH}} 954MACHINE_GNU_ARCH=${GNU_ARCH.${MACHINE_ARCH}:U${MACHINE_ARCH}}
956 955
957# 956#
958# In order to identify NetBSD to GNU packages, we sometimes need 957# In order to identify NetBSD to GNU packages, we sometimes need
959# an "elf" tag for historically a.out platforms. 958# an "elf" tag for historically a.out platforms.
960# 959#
961.if (!empty(MACHINE_ARCH:Mearm*)) 960.if (!empty(MACHINE_ARCH:Mearm*))
962MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsdelf-${MACHINE_ARCH:C/eb//:C/v[4-7]//:S/earm/eabi/} 961MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsdelf-${MACHINE_ARCH:C/eb//:C/v[4-7]//:S/earm/eabi/}
963.elif (${MACHINE_GNU_ARCH} == "arm" || \ 962.elif (${MACHINE_GNU_ARCH} == "arm" || \
964 ${MACHINE_GNU_ARCH} == "armeb" || \ 963 ${MACHINE_GNU_ARCH} == "armeb" || \
965 ${MACHINE_ARCH} == "i386" || \ 964 ${MACHINE_ARCH} == "i386" || \
966 ${MACHINE_CPU} == "m68k" || \ 965 ${MACHINE_CPU} == "m68k" || \
967 ${MACHINE_GNU_ARCH} == "sh" || \ 966 ${MACHINE_GNU_ARCH} == "sh" || \
968 ${MACHINE_GNU_ARCH} == "shle" || \ 967 ${MACHINE_GNU_ARCH} == "shle" || \
969 ${MACHINE_ARCH} == "sparc" || \ 968 ${MACHINE_ARCH} == "sparc" || \
970 ${MACHINE_ARCH} == "vax") 969 ${MACHINE_ARCH} == "vax")
971MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsdelf 970MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsdelf
972.else 971.else
973MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsd 972MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsd
974.endif 973.endif
975 974
976.if !empty(MACHINE_ARCH:M*arm*) 975.if !empty(MACHINE_ARCH:M*arm*)
977# Flags to pass to CC for using the old APCS ABI on ARM for compat or stand. 976# Flags to pass to CC for using the old APCS ABI on ARM for compat or stand.
978ARM_APCS_FLAGS= -mabi=apcs-gnu -mfloat-abi=soft -marm 977ARM_APCS_FLAGS= -mabi=apcs-gnu -mfloat-abi=soft -marm
979ARM_APCS_FLAGS+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -mno-thumb-interwork :} 978ARM_APCS_FLAGS+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -mno-thumb-interwork :}
980ARM_APCS_FLAGS+=${${ACTIVE_CC} == "clang":? -target ${MACHINE_GNU_ARCH}--netbsdelf -B ${TOOLDIR}/${MACHINE_GNU_PLATFORM}/bin :} 979ARM_APCS_FLAGS+=${${ACTIVE_CC} == "clang":? -target ${MACHINE_GNU_ARCH}--netbsdelf -B ${TOOLDIR}/${MACHINE_GNU_PLATFORM}/bin :}
981.endif 980.endif
982 981
983GENASSYM_CPPFLAGS+= ${${ACTIVE_CC} == "clang":? -no-integrated-as :} 982GENASSYM_CPPFLAGS+= ${${ACTIVE_CC} == "clang":? -no-integrated-as :}
984 983
985TARGETS+= all clean cleandir depend dependall includes \ 984TARGETS+= all clean cleandir depend dependall includes \
986 install lint obj regress tags html analyze describe \ 985 install lint obj regress tags html analyze describe \
987 rumpdescribe 986 rumpdescribe
988PHONY_NOTMAIN = all clean cleandir depend dependall distclean includes \ 987PHONY_NOTMAIN = all clean cleandir depend dependall distclean includes \
989 install lint obj regress beforedepend afterdepend \ 988 install lint obj regress beforedepend afterdepend \
990 beforeinstall afterinstall realinstall realdepend realall \ 989 beforeinstall afterinstall realinstall realdepend realall \
991 html subdir-all subdir-install subdir-depend analyze describe \ 990 html subdir-all subdir-install subdir-depend analyze describe \
992 rumpdescribe 991 rumpdescribe
993.PHONY: ${PHONY_NOTMAIN} 992.PHONY: ${PHONY_NOTMAIN}
994.NOTMAIN: ${PHONY_NOTMAIN} 993.NOTMAIN: ${PHONY_NOTMAIN}
995 994
996.if ${NEED_OWN_INSTALL_TARGET} != "no" 995.if ${NEED_OWN_INSTALL_TARGET} != "no"
997.if !target(install) 996.if !target(install)
998install: beforeinstall .WAIT subdir-install realinstall .WAIT afterinstall 997install: beforeinstall .WAIT subdir-install realinstall .WAIT afterinstall
999beforeinstall: 998beforeinstall:
1000subdir-install: 999subdir-install:
1001realinstall: 1000realinstall:
1002afterinstall: 1001afterinstall:
1003.endif 1002.endif
1004all: realall subdir-all 1003all: realall subdir-all
1005subdir-all: 1004subdir-all:
1006realall: 1005realall:
1007depend: realdepend subdir-depend 1006depend: realdepend subdir-depend
1008subdir-depend: 1007subdir-depend:
1009realdepend: 1008realdepend:
1010distclean: cleandir 1009distclean: cleandir
1011cleandir: clean 1010cleandir: clean
1012 1011
1013dependall: .NOTMAIN realdepend .MAKE 1012dependall: .NOTMAIN realdepend .MAKE
1014 @cd "${.CURDIR}"; ${MAKE} realall 1013 @cd "${.CURDIR}"; ${MAKE} realall
1015.endif 1014.endif
1016 1015
1017# 1016#
1018# Define MKxxx variables (which are either yes or no) for users 1017# Define MKxxx variables (which are either yes or no) for users
1019# to set in /etc/mk.conf and override in the make environment. 1018# to set in /etc/mk.conf and override in the make environment.
1020# These should be tested with `== "no"' or `!= "no"'. 1019# These should be tested with `== "no"' or `!= "no"'.
1021# The NOxxx variables should only be set by Makefiles. 1020# The NOxxx variables should only be set by Makefiles.
1022# 1021#
1023# Please keep etc/Makefile and share/man/man5/mk.conf.5 in sync 1022# Please keep etc/Makefile and share/man/man5/mk.conf.5 in sync
1024# with changes to the MK* variables here. 1023# with changes to the MK* variables here.
1025# 1024#
1026 1025
1027# 1026#
1028# Supported NO* options (if defined, MK* will be forced to "no", 1027# Supported NO* options (if defined, MK* will be forced to "no",
1029# regardless of user's mk.conf setting). 1028# regardless of user's mk.conf setting).
1030# 1029#
1031# Source makefiles should set NO*, and not MK*, and must do so before 1030# Source makefiles should set NO*, and not MK*, and must do so before
1032# including bsd.own.mk. 1031# including bsd.own.mk.
1033# 1032#
1034.for var in \ 1033.for var in \
1035 NOCOMPAT NOCRYPTO NODOC NOHTML NOINFO NOLIBCSANITIZER NOLINKLIB \ 1034 NOCOMPAT NOCRYPTO NODOC NOHTML NOINFO NOLIBCSANITIZER NOLINKLIB \
1036 NOLINT NOMAN NONLS NOOBJ NOPIC NOPICINSTALL NOPROFILE NOSHARE \ 1035 NOLINT NOMAN NONLS NOOBJ NOPIC NOPICINSTALL NOPROFILE NOSHARE \
1037 NOSTATICLIB NODEBUGLIB NOSANITIZER NORELRO 1036 NOSTATICLIB NODEBUGLIB NOSANITIZER NORELRO
1038.if defined(${var}) 1037.if defined(${var})
1039MK${var:S/^NO//}:= no 1038MK${var:S/^NO//}:= no
1040.endif 1039.endif
1041.endfor 1040.endfor
1042 1041
1043# 1042#
1044# Older-style variables that enabled behaviour when set. 1043# Older-style variables that enabled behaviour when set.
1045# 1044#
1046.for var in MANZ UNPRIVED UPDATE 1045.for var in MANZ UNPRIVED UPDATE
1047.if defined(${var}) 1046.if defined(${var})
1048MK${var}:= yes 1047MK${var}:= yes
1049.endif 1048.endif
1050.endfor 1049.endfor
1051 1050
1052# 1051#
1053# MK* options which have variable defaults. 1052# MK* options which have variable defaults.
1054# 1053#
1055# aarch64eb is not yet supported. 1054# aarch64eb is not yet supported.
1056# 1055#
1057.if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "sparc64" \ 1056.if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "sparc64" \
1058 || ${MACHINE_MIPS64} \ 1057 || ${MACHINE_MIPS64} \
1059 || ${MACHINE_ARCH} == "powerpc64" || ${MACHINE_ARCH} == "aarch64" \ 1058 || ${MACHINE_ARCH} == "powerpc64" || ${MACHINE_ARCH} == "aarch64" \
1060 || ${MACHINE_ARCH} == "riscv64" || !empty(MACHINE_ARCH:Mearm*) 1059 || ${MACHINE_ARCH} == "riscv64" || !empty(MACHINE_ARCH:Mearm*)
1061MKCOMPAT?= yes 1060MKCOMPAT?= yes
1062.else 1061.else
1063# Don't let this build where it really isn't supported. 1062# Don't let this build where it really isn't supported.
1064MKCOMPAT:= no 1063MKCOMPAT:= no
1065.endif 1064.endif
1066 1065
1067.if ${MKCOMPAT} == "no" 1066.if ${MKCOMPAT} == "no"
1068MKCOMPATTESTS:= no 1067MKCOMPATTESTS:= no
1069MKCOMPATX11:= no 1068MKCOMPATX11:= no
1070.endif 1069.endif
1071 1070
1072.if ${MACHINE_MIPS64} \ 1071.if ${MACHINE_MIPS64} \
1073 || (${MACHINE} == "evbppc" && ${MACHINE_ARCH} == "powerpc") 1072 || (${MACHINE} == "evbppc" && ${MACHINE_ARCH} == "powerpc")
1074MKCOMPATMODULES?= yes 1073MKCOMPATMODULES?= yes
1075.else 1074.else
1076MKCOMPATMODULES:= no 1075MKCOMPATMODULES:= no
1077.endif 1076.endif
1078 1077
1079# 1078#
1080# These platforms use softfloat by default. 1079# These platforms use softfloat by default.
1081# 1080#
1082.if ${MACHINE_MIPS64} 1081.if ${MACHINE_MIPS64}
1083MKSOFTFLOAT?= yes 1082MKSOFTFLOAT?= yes
1084.endif 1083.endif
1085 1084
1086# 1085#
1087# These platforms always use softfloat. 1086# These platforms always use softfloat.
1088# 1087#
1089.if (${MACHINE_CPU} == "arm" && ${MACHINE_ARCH:M*hf*} == "") || \ 1088.if (${MACHINE_CPU} == "arm" && ${MACHINE_ARCH:M*hf*} == "") || \
1090 ${MACHINE_ARCH} == "coldfire" || ${MACHINE_CPU} == "or1k" || \ 1089 ${MACHINE_ARCH} == "coldfire" || ${MACHINE_CPU} == "or1k" || \
1091 ${MACHINE} == "emips" || ${MACHINE_CPU} == "sh3" 1090 ${MACHINE} == "emips" || ${MACHINE_CPU} == "sh3"
1092MKSOFTFLOAT= yes 1091MKSOFTFLOAT= yes
1093.endif 1092.endif
1094 1093
1095.if ${MACHINE} == "emips" 1094.if ${MACHINE} == "emips"
1096SOFTFLOAT_BITS= 32 1095SOFTFLOAT_BITS= 32
1097.endif 1096.endif
1098 1097
1099# 1098#
1100# We want to build zfs only for amd64, aarch64 and sparc64 by default for now. 1099# We want to build zfs only for amd64, aarch64 and sparc64 by default for now.
1101# 1100#
1102.if ${MACHINE} == "amd64" || ${MACHINE_ARCH} == "aarch64" || \ 1101.if ${MACHINE} == "amd64" || ${MACHINE_ARCH} == "aarch64" || \
1103 ${MACHINE} == "sparc64" 1102 ${MACHINE} == "sparc64"
1104MKZFS?= yes 1103MKZFS?= yes
1105.endif 1104.endif
1106 1105
1107# 1106#
1108# DTrace works on amd64, i386, aarch64, and earm* 1107# DTrace works on amd64, i386, aarch64, and earm*
1109# 1108#
1110.if ${MACHINE_ARCH} == "i386" || \ 1109.if ${MACHINE_ARCH} == "i386" || \
1111 ${MACHINE_ARCH} == "x86_64" || \ 1110 ${MACHINE_ARCH} == "x86_64" || \
1112 ${MACHINE_ARCH} == "aarch64" || \ 1111 ${MACHINE_ARCH} == "aarch64" || \
1113 !empty(MACHINE_ARCH:Mearm*) 1112 !empty(MACHINE_ARCH:Mearm*)
1114MKDTRACE?= yes 1113MKDTRACE?= yes
1115MKCTF?= yes 1114MKCTF?= yes
1116.endif 1115.endif
1117 1116
1118# 1117#
1119# PIE is enabled on many platforms by default. 1118# PIE is enabled on many platforms by default.
1120# 1119#
1121# Coverity does not like PIE 1120# Coverity does not like PIE
1122.if !defined(COVERITY_TOP_CONFIG) && \ 1121.if !defined(COVERITY_TOP_CONFIG) && \
1123 (${MACHINE_ARCH} == "i386" || \ 1122 (${MACHINE_ARCH} == "i386" || \
1124 ${MACHINE_ARCH} == "x86_64" || \ 1123 ${MACHINE_ARCH} == "x86_64" || \
1125 ${MACHINE_CPU} == "arm" || \ 1124 ${MACHINE_CPU} == "arm" || \
1126 ${MACHINE_CPU} == "m68k" || \ 1125 ${MACHINE_CPU} == "m68k" || \
1127 ${MACHINE_CPU} == "mips" || \ 1126 ${MACHINE_CPU} == "mips" || \
1128 ${MACHINE_CPU} == "sh3" || \ 1127 ${MACHINE_CPU} == "sh3" || \
1129 ${MACHINE} == "sparc64") 1128 ${MACHINE} == "sparc64")
1130MKPIE?= yes 1129MKPIE?= yes
1131.else 1130.else
1132MKPIE?= no 1131MKPIE?= no
1133.endif 1132.endif
1134 1133
1135# 1134#
1136# RELRO is enabled on i386 and amd64 by default 1135# RELRO is enabled on i386 and amd64 by default
1137# 1136#
1138.if ${MACHINE_ARCH} == "i386" || \ 1137.if ${MACHINE_ARCH} == "i386" || \
1139 ${MACHINE_ARCH} == "x86_64" 1138 ${MACHINE_ARCH} == "x86_64"
1140MKRELRO?= partial 1139MKRELRO?= partial
1141.else 1140.else
1142MKRELRO?= no 1141MKRELRO?= no
1143.endif 1142.endif
1144 1143
1145.if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "i386" 1144.if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "i386"
1146MKSTATICPIE?= yes 1145MKSTATICPIE?= yes
1147.else 1146.else
1148MKSTATICPIE?= no 1147MKSTATICPIE?= no
1149.endif 1148.endif
1150 1149
1151# 1150#
1152# MK* options which default to "yes". 1151# MK* options which default to "yes".
1153# 1152#
1154_MKVARS.yes= \ 1153_MKVARS.yes= \
1155 MKATF \ 1154 MKATF \
1156 MKBINUTILS \ 1155 MKBINUTILS \
1157 MKBSDTAR \ 1156 MKBSDTAR \
1158 MKCOMPLEX MKCVS MKCXX \ 1157 MKCOMPLEX MKCVS MKCXX \
1159 MKDOC MKDTC \ 1158 MKDOC MKDTC \
1160 MKDYNAMICROOT \ 1159 MKDYNAMICROOT \
1161 MKGCC MKGDB MKGROFF \ 1160 MKGCC MKGDB MKGROFF \
1162 MKHESIOD MKHTML \ 1161 MKHESIOD MKHTML \
1163 MKIEEEFP MKINET6 MKINFO MKIPFILTER MKISCSI \ 1162 MKIEEEFP MKINET6 MKINFO MKIPFILTER MKISCSI \
1164 MKKERBEROS \ 1163 MKKERBEROS \
1165 MKKMOD \ 1164 MKKMOD \
1166 MKLDAP MKLIBSTDCXX MKLINKLIB MKLVM \ 1165 MKLDAP MKLIBSTDCXX MKLINKLIB MKLVM \
1167 MKMAN MKMANDOC \ 1166 MKMAN MKMANDOC \
1168 MKMDNS \ 1167 MKMDNS \
1169 MKMAKEMANDB \ 1168 MKMAKEMANDB \
1170 MKNLS \ 1169 MKNLS \
1171 MKNPF \ 1170 MKNPF \
1172 MKOBJ \ 1171 MKOBJ \
1173 MKPAM MKPERFUSE \ 1172 MKPAM MKPERFUSE \
1174 MKPF MKPIC MKPICLIB MKPOSTFIX MKPROFILE \ 1173 MKPF MKPIC MKPICLIB MKPOSTFIX MKPROFILE \
1175 MKRUMP \ 1174 MKRUMP \
1176 MKSHARE MKSKEY MKSTATICLIB \ 1175 MKSHARE MKSKEY MKSTATICLIB \
1177 MKUNBOUND \ 1176 MKUNBOUND \
1178 MKX11FONTS \ 1177 MKX11FONTS \
1179 MKYP 1178 MKYP
1180.for var in ${_MKVARS.yes} 1179.for var in ${_MKVARS.yes}
1181${var}?= ${${var}.${MACHINE_ARCH}:Uyes} 1180${var}?= ${${var}.${MACHINE_ARCH}:Uyes}
1182.endfor 1181.endfor
1183 1182
1184# 1183#
1185# MKGCCCMDS is only valid if we are building GCC so make it dependent on that. 1184# MKGCCCMDS is only valid if we are building GCC so make it dependent on that.
1186# 1185#
1187_MKVARS.yes += MKGCCCMDS 1186_MKVARS.yes += MKGCCCMDS
1188MKGCCCMDS?= ${MKGCC} 1187MKGCCCMDS?= ${MKGCC}
1189 1188
1190# 1189#
1191# Sanitizers, only "address" and "undefined" are supported by gcc 1190# Sanitizers, only "address" and "undefined" are supported by gcc
1192# 1191#
1193MKSANITIZER?= no 1192MKSANITIZER?= no
1194USE_SANITIZER?= address 1193USE_SANITIZER?= address
1195 1194
1196# 1195#
1197# Sanitizers implemented in libc, only "undefined" is supported 1196# Sanitizers implemented in libc, only "undefined" is supported
1198# 1197#
1199MKLIBCSANITIZER?= no 1198MKLIBCSANITIZER?= no
1200USE_LIBCSANITIZER?= undefined 1199USE_LIBCSANITIZER?= undefined
1201 1200
1202# 1201#
1203# Exceptions to the above: 1202# Exceptions to the above:
1204# 1203#
1205 1204
1206# RUMP uses -nostdinc which coverity does not like 1205# RUMP uses -nostdinc which coverity does not like
1207# It also does not use many new files, so disable it 1206# It also does not use many new files, so disable it
1208.if defined(COVERITY_TOP_CONFIG) 1207.if defined(COVERITY_TOP_CONFIG)
1209MKRUMP= no 1208MKRUMP= no
1210.endif 1209.endif
1211 1210
1212# 1211#
1213# Build a dynamically linked /bin and /sbin, with the necessary shared 1212# Build a dynamically linked /bin and /sbin, with the necessary shared
1214# libraries moved from /usr/lib to /lib and the shared linker moved 1213# libraries moved from /usr/lib to /lib and the shared linker moved
1215# from /usr/libexec to /lib 1214# from /usr/libexec to /lib
1216# 1215#
1217# Note that if the BINDIR is not /bin or /sbin, then we always use the 1216# Note that if the BINDIR is not /bin or /sbin, then we always use the
1218# non-DYNAMICROOT behavior (i.e. it is only enabled for programs in /bin 1217# non-DYNAMICROOT behavior (i.e. it is only enabled for programs in /bin
1219# and /sbin). See <bsd.shlib.mk>. 1218# and /sbin). See <bsd.shlib.mk>.
1220# 1219#
1221# For ia64, ld.elf_so not yet implemented 1220# For ia64, ld.elf_so not yet implemented
1222.if ${MACHINE_ARCH} == "ia64" 1221.if ${MACHINE_ARCH} == "ia64"
1223MKDYNAMICROOT= no 1222MKDYNAMICROOT= no
1224.endif 1223.endif
1225 1224
1226.if defined(MKREPRO) 1225.if defined(MKREPRO)
1227MKARZERO ?= ${MKREPRO} 1226MKARZERO ?= ${MKREPRO}
1228GROFF_FLAGS ?= -dpaper=letter 1227GROFF_FLAGS ?= -dpaper=letter
1229ROFF_PAGESIZE ?= -P-pletter 1228ROFF_PAGESIZE ?= -P-pletter
1230.endif 1229.endif
1231 1230
1232# 1231#
1233# Install the kernel as /netbsd/kernel and the modules in /netbsd/modules 1232# Install the kernel as /netbsd/kernel and the modules in /netbsd/modules
1234# 1233#
1235KERNEL_DIR?= no 1234KERNEL_DIR?= no
1236 1235
1237# Only install the general firmware on some systems 1236# Only install the general firmware on some systems
1238MKFIRMWARE.amd64= yes 1237MKFIRMWARE.amd64= yes
1239MKFIRMWARE.cobalt= yes 1238MKFIRMWARE.cobalt= yes
1240MKFIRMWARE.evbarm= yes 1239MKFIRMWARE.evbarm= yes
1241MKFIRMWARE.evbmips= yes 1240MKFIRMWARE.evbmips= yes
1242MKFIRMWARE.evbppc= yes 1241MKFIRMWARE.evbppc= yes
1243MKFIRMWARE.hpcarm= yes 1242MKFIRMWARE.hpcarm= yes
1244MKFIRMWARE.hppa= yes 1243MKFIRMWARE.hppa= yes
1245MKFIRMWARE.i386= yes 1244MKFIRMWARE.i386= yes
1246MKFIRMWARE.mac68k= yes 1245MKFIRMWARE.mac68k= yes
1247MKFIRMWARE.macppc= yes 1246MKFIRMWARE.macppc= yes
1248MKFIRMWARE.sandpoint= yes 1247MKFIRMWARE.sandpoint= yes
1249MKFIRMWARE.sparc64= yes 1248MKFIRMWARE.sparc64= yes
1250 1249
1251# Only install the nouveau and radeon firmwares on DRM-happy systems. 1250# Only install the nouveau and radeon firmwares on DRM-happy systems.
1252MKNOUVEAUFIRMWARE.x86_64= yes 1251MKNOUVEAUFIRMWARE.x86_64= yes
1253MKNOUVEAUFIRMWARE.i386= yes 1252MKNOUVEAUFIRMWARE.i386= yes
1254MKNOUVEAUFIRMWARE.aarch64= yes 1253MKNOUVEAUFIRMWARE.aarch64= yes
1255MKRADEONFIRMWARE.x86_64= yes 1254MKRADEONFIRMWARE.x86_64= yes
1256MKRADEONFIRMWARE.i386= yes 1255MKRADEONFIRMWARE.i386= yes
1257MKRADEONFIRMWARE.aarch64= yes 1256MKRADEONFIRMWARE.aarch64= yes
1258 1257
1259# Only install the tegra firmware on evbarm. 1258# Only install the tegra firmware on evbarm.
1260MKTEGRAFIRMWARE.evbarm= yes 1259MKTEGRAFIRMWARE.evbarm= yes
1261 1260
1262# Only build devicetree (dtb) files on armv6, armv7, and aarch64. 1261# Only build devicetree (dtb) files on armv6, armv7, and aarch64.
1263MKDTB.aarch64= yes 1262MKDTB.aarch64= yes
1264MKDTB.aarch64eb= yes 1263MKDTB.aarch64eb= yes
1265MKDTB.earmv6= yes 1264MKDTB.earmv6= yes
1266MKDTB.earmv6hf= yes 1265MKDTB.earmv6hf= yes
1267MKDTB.earmv6eb= yes 1266MKDTB.earmv6eb= yes
1268MKDTB.earmv6hfeb= yes 1267MKDTB.earmv6hfeb= yes
1269MKDTB.earmv7= yes 1268MKDTB.earmv7= yes
1270MKDTB.earmv7hf= yes 1269MKDTB.earmv7hf= yes
1271MKDTB.earmv7eb= yes 1270MKDTB.earmv7eb= yes
1272MKDTB.earmv7hfeb= yes 1271MKDTB.earmv7hfeb= yes
1273 1272
1274# MesaLib.old and MesaLib7 go together, and MesaLib is alone. 1273# MesaLib.old and MesaLib7 go together, and MesaLib is alone.
1275HAVE_MESA_VER?= 18 1274HAVE_MESA_VER?= 18
1276.if ${HAVE_MESA_VER} == "10" 1275.if ${HAVE_MESA_VER} == "10"
1277EXTERNAL_MESALIB_DIR?= MesaLib.old 1276EXTERNAL_MESALIB_DIR?= MesaLib.old
1278.elif ${HAVE_MESA_VER} == "18" 1277.elif ${HAVE_MESA_VER} == "18"
1279EXTERNAL_MESALIB_DIR?= MesaLib 1278EXTERNAL_MESALIB_DIR?= MesaLib
1280.endif 1279.endif
1281 1280
1282# Default to LLVM run-time if x86 or aarch64 and X11 and Mesa 18 1281# Default to LLVM run-time if x86 or aarch64 and X11 and Mesa 18
1283# XXX This knows that MKX11=no is default below, but would 1282# XXX This knows that MKX11=no is default below, but would
1284# require splitting the below loop in two parts. 1283# require splitting the below loop in two parts.
1285.if ${MKX11:Uno} != "no" && ${HAVE_MESA_VER} == "18" 1284.if ${MKX11:Uno} != "no" && ${HAVE_MESA_VER} == "18"
1286MKLLVMRT.amd64= yes 1285MKLLVMRT.amd64= yes
1287MKLLVMRT.i386= yes 1286MKLLVMRT.i386= yes
1288MKLLVMRT.aarch64= yes 1287MKLLVMRT.aarch64= yes
1289.endif 1288.endif
1290 1289
1291# 1290#
1292# MK* options which default to "no". Note that MKZFS has a different 1291# MK* options which default to "no". Note that MKZFS has a different
1293# default for some platforms, see above. Please keep alphabetically 1292# default for some platforms, see above. Please keep alphabetically
1294# sorted with at most one letter per line. 1293# sorted with at most one letter per line.
1295# 1294#
1296_MKVARS.no= \ 1295_MKVARS.no= \
1297 MKARGON2 \ 1296 MKARGON2 \
1298 MKARZERO \ 1297 MKARZERO \
1299 MKBSDGREP \ 1298 MKBSDGREP \
1300 MKCATPAGES MKCOMPATTESTS MKCOMPATX11 MKCTF \ 1299 MKCATPAGES MKCOMPATTESTS MKCOMPATX11 MKCTF \
1301 MKDEBUG MKDEBUGLIB MKDTB MKDTRACE \ 1300 MKDEBUG MKDEBUGLIB MKDTB MKDTRACE \
1302 MKEXTSRC \ 1301 MKEXTSRC \
1303 MKFIRMWARE \ 1302 MKFIRMWARE \
1304 MKGROFFHTMLDOC \ 1303 MKGROFFHTMLDOC \
1305 MKKYUA \ 1304 MKKYUA \
1306 MKLIBCXX MKLLD MKLLDB MKLLVM MKLLVMRT MKLINT \ 1305 MKLIBCXX MKLLD MKLLDB MKLLVM MKLLVMRT MKLINT \
1307 MKMANZ MKMCLINKER \ 1306 MKMANZ MKMCLINKER \
1308 MKNOUVEAUFIRMWARE MKNSD \ 1307 MKNOUVEAUFIRMWARE MKNSD \
1309 MKOBJDIRS \ 1308 MKOBJDIRS \
1310 MKPCC MKPICINSTALL MKPIGZGZIP \ 1309 MKPCC MKPICINSTALL MKPIGZGZIP \
1311 MKRADEONFIRMWARE MKREPRO \ 1310 MKRADEONFIRMWARE MKREPRO \
1312 MKSLJIT MKSOFTFLOAT MKSTRIPIDENT \ 1311 MKSLJIT MKSOFTFLOAT MKSTRIPIDENT \
1313 MKTEGRAFIRMWARE MKTPM \ 1312 MKTEGRAFIRMWARE MKTPM \
1314 MKUNPRIVED MKUPDATE \ 1313 MKUNPRIVED MKUPDATE \
1315 MKX11 MKX11MOTIF MKXORG_SERVER \ 1314 MKX11 MKX11MOTIF MKXORG_SERVER \
1316 MKZFS 1315 MKZFS
1317.for var in ${_MKVARS.no} 1316.for var in ${_MKVARS.no}
1318${var}?= ${${var}.${MACHINE_ARCH}:U${${var}.${MACHINE}:Uno}} 1317${var}?= ${${var}.${MACHINE_ARCH}:U${${var}.${MACHINE}:Uno}}
1319.endfor 1318.endfor
1320 1319
1321.if ${MACHINE_ARCH} == "i386" || \ 1320.if ${MACHINE_ARCH} == "i386" || \
1322 ${MACHINE_ARCH} == "x86_64" || \ 1321 ${MACHINE_ARCH} == "x86_64" || \
1323 ${MACHINE_ARCH} == "sparc"  1322 ${MACHINE_ARCH} == "sparc"
1324MKSLJIT= yes 1323MKSLJIT= yes
1325.endif 1324.endif
1326 1325
1327# 1326#
1328# Which platforms build the xorg-server drivers (as opposed 1327# Which platforms build the xorg-server drivers (as opposed
1329# to just Xnest and Xvfb.) 1328# to just Xnest and Xvfb.)
1330# 1329#
1331.if ${MACHINE} == "alpha" || \ 1330.if ${MACHINE} == "alpha" || \
1332 ${MACHINE} == "amd64" || \ 1331 ${MACHINE} == "amd64" || \
1333 ${MACHINE} == "amiga" || \ 1332 ${MACHINE} == "amiga" || \
1334 ${MACHINE} == "bebox" || \ 1333 ${MACHINE} == "bebox" || \
1335 ${MACHINE} == "cats" || \ 1334 ${MACHINE} == "cats" || \
1336 ${MACHINE} == "dreamcast" || \ 1335 ${MACHINE} == "dreamcast" || \
1337 ${MACHINE} == "ews4800mips" || \ 1336 ${MACHINE} == "ews4800mips" || \
1338 ${MACHINE} == "evbarm" || \ 1337 ${MACHINE} == "evbarm" || \
1339 ${MACHINE} == "evbmips" || \ 1338 ${MACHINE} == "evbmips" || \
1340 ${MACHINE} == "evbppc" || \ 1339 ${MACHINE} == "evbppc" || \
1341 ${MACHINE} == "hp300" || \ 1340 ${MACHINE} == "hp300" || \
1342 ${MACHINE} == "hpcarm" || \ 1341 ${MACHINE} == "hpcarm" || \
1343 ${MACHINE} == "hpcmips" || \ 1342 ${MACHINE} == "hpcmips" || \
1344 ${MACHINE} == "hpcsh" || \ 1343 ${MACHINE} == "hpcsh" || \
1345 ${MACHINE} == "hppa" || \ 1344 ${MACHINE} == "hppa" || \
1346 ${MACHINE} == "i386" || \ 1345 ${MACHINE} == "i386" || \
1347 ${MACHINE} == "ibmnws" || \ 1346 ${MACHINE} == "ibmnws" || \
1348 ${MACHINE} == "iyonix" || \ 1347 ${MACHINE} == "iyonix" || \
1349 ${MACHINE} == "luna68k" || \ 1348 ${MACHINE} == "luna68k" || \
1350 ${MACHINE} == "mac68k" || \ 1349 ${MACHINE} == "mac68k" || \
1351 ${MACHINE} == "macppc" || \ 1350 ${MACHINE} == "macppc" || \
1352 ${MACHINE} == "netwinder" || \ 1351 ${MACHINE} == "netwinder" || \
1353 ${MACHINE} == "newsmips" || \ 1352 ${MACHINE} == "newsmips" || \
1354 ${MACHINE} == "prep" || \ 1353 ${MACHINE} == "prep" || \
1355 ${MACHINE} == "ofppc" || \ 1354 ${MACHINE} == "ofppc" || \
1356 ${MACHINE} == "sgimips" || \ 1355 ${MACHINE} == "sgimips" || \
1357 ${MACHINE} == "shark" || \ 1356 ${MACHINE} == "shark" || \
1358 ${MACHINE} == "sparc" || \ 1357 ${MACHINE} == "sparc" || \
1359 ${MACHINE} == "sparc64" || \ 1358 ${MACHINE} == "sparc64" || \
1360 ${MACHINE} == "vax" || \ 1359 ${MACHINE} == "vax" || \
1361 ${MACHINE} == "zaurus" 1360 ${MACHINE} == "zaurus"
1362MKXORG_SERVER=yes 1361MKXORG_SERVER=yes
1363.endif 1362.endif
1364 1363
1365# 1364#
1366# Force some options off if their dependencies are off. 1365# Force some options off if their dependencies are off.
1367# 1366#
1368 1367
1369.if ${MKCXX} == "no" 1368.if ${MKCXX} == "no"
1370MKATF:= no 1369MKATF:= no
1371MKGCCCMDS:= no 1370MKGCCCMDS:= no
1372MKGDB:= no 1371MKGDB:= no
1373MKGROFF:= no 1372MKGROFF:= no
1374MKKYUA:= no 1373MKKYUA:= no
1375.endif 1374.endif
1376 1375
1377.if ${MKMAN} == "no" 1376.if ${MKMAN} == "no"
1378MKCATPAGES:= no 1377MKCATPAGES:= no
1379MKHTML:= no 1378MKHTML:= no
1380.endif 1379.endif
1381 1380
1382_MANINSTALL= maninstall 1381_MANINSTALL= maninstall
1383.if ${MKCATPAGES} != "no" 1382.if ${MKCATPAGES} != "no"
1384_MANINSTALL+= catinstall 1383_MANINSTALL+= catinstall
1385.endif 1384.endif
1386.if ${MKHTML} != "no" 1385.if ${MKHTML} != "no"
1387_MANINSTALL+= htmlinstall 1386_MANINSTALL+= htmlinstall
1388.endif 1387.endif
1389 1388
1390.if ${MKLINKLIB} == "no" 1389.if ${MKLINKLIB} == "no"
1391MKLINT:= no 1390MKLINT:= no
1392MKPICINSTALL:= no 1391MKPICINSTALL:= no
1393MKPROFILE:= no 1392MKPROFILE:= no
1394.endif 1393.endif
1395 1394
1396.if ${MKPIC} == "no" 1395.if ${MKPIC} == "no"
1397MKPICLIB:= no 1396MKPICLIB:= no
1398.endif 1397.endif
1399 1398
1400.if ${MKOBJ} == "no" 1399.if ${MKOBJ} == "no"
1401MKOBJDIRS:= no 1400MKOBJDIRS:= no
1402.endif 1401.endif
1403 1402
1404.if ${MKSHARE} == "no" 1403.if ${MKSHARE} == "no"
1405MKCATPAGES:= no 1404MKCATPAGES:= no
1406MKDOC:= no 1405MKDOC:= no
1407MKINFO:= no 1406MKINFO:= no
1408MKHTML:= no 1407MKHTML:= no
1409MKMAN:= no 1408MKMAN:= no
1410MKNLS:= no 1409MKNLS:= no
1411.endif 1410.endif
1412 1411
1413.if !empty(MACHINE_ARCH:Mearm*) 1412.if !empty(MACHINE_ARCH:Mearm*)
1414_NEEDS_LIBCXX.${MACHINE_ARCH}= yes 1413_NEEDS_LIBCXX.${MACHINE_ARCH}= yes
1415.endif 1414.endif
1416_NEEDS_LIBCXX.aarch64= yes 1415_NEEDS_LIBCXX.aarch64= yes
1417_NEEDS_LIBCXX.aarch64eb= yes 1416_NEEDS_LIBCXX.aarch64eb= yes
1418_NEEDS_LIBCXX.i386= yes 1417_NEEDS_LIBCXX.i386= yes
1419_NEEDS_LIBCXX.powerpc= yes 1418_NEEDS_LIBCXX.powerpc= yes
1420_NEEDS_LIBCXX.powerpc64= yes 1419_NEEDS_LIBCXX.powerpc64= yes
1421_NEEDS_LIBCXX.sparc= yes 1420_NEEDS_LIBCXX.sparc= yes
1422_NEEDS_LIBCXX.sparc64= yes 1421_NEEDS_LIBCXX.sparc64= yes
1423_NEEDS_LIBCXX.x86_64= yes 1422_NEEDS_LIBCXX.x86_64= yes
1424 1423
1425.if ${MKLLVM} == "yes" && ${_NEEDS_LIBCXX.${MACHINE_ARCH}:Uno} == "yes" 1424.if ${MKLLVM} == "yes" && ${_NEEDS_LIBCXX.${MACHINE_ARCH}:Uno} == "yes"
1426MKLIBCXX:= yes 1425MKLIBCXX:= yes
1427.endif 1426.endif