Mon May 4 21:32:32 2009 UTC ()
Enable -mtune=nocona by default on x86. I have tested on a range of CPUs
and this seems to give the best results.


(ad)
diff -r1.14 -r1.15 src/gnu/usr.bin/gcc4/arch/i386/configargs.h
diff -r1.10 -r1.11 src/gnu/usr.bin/gcc4/arch/x86_64/configargs.h
diff -r1.562 -r1.563 src/share/mk/bsd.own.mk
diff -r1.31 -r1.32 src/tools/gcc/Makefile

cvs diff -r1.14 -r1.15 src/gnu/usr.bin/gcc4/arch/i386/Attic/configargs.h (switch to unified diff)

--- src/gnu/usr.bin/gcc4/arch/i386/Attic/configargs.h 2009/03/27 19:38:43 1.14
+++ src/gnu/usr.bin/gcc4/arch/i386/Attic/configargs.h 2009/05/04 21:32:31 1.15
@@ -1,11 +1,11 @@ @@ -1,11 +1,11 @@
1/* This file is automatically generated. DO NOT EDIT! */ 1/* This file is automatically generated. DO NOT EDIT! */
2/* Generated from: NetBSD: mknative-gcc,v 1.25 2008/10/11 05:03:44 mrg Exp */ 2/* Generated from: NetBSD: mknative-gcc,v 1.25 2008/10/11 05:03:44 mrg Exp */
3/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ 3/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */
4 4
5/* Generated automatically. */ 5/* Generated automatically. */
6static const char configuration_arguments[] = "/home/drochner/netbsd/work.src.usbdev/tools/gcc/../../gnu/dist/gcc4/configure --target=i486--netbsdelf --enable-long-long --enable-threads --enable-__cxa_atexit --with-arch=i486 --disable-multilib --disable-symvers --build=i386-unknown-netbsdelf5.99.8 --host=i486--netbsdelf"; 6static const char configuration_arguments[] = "/home/drochner/netbsd/work.src.usbdev/tools/gcc/../../gnu/dist/gcc4/configure --target=i486--netbsdelf --enable-long-long --enable-threads --enable-__cxa_atexit --with-arch=i486 --with-tune=nocona --disable-multilib --disable-symvers --build=i386-unknown-netbsdelf5.99.8 --host=i486--netbsdelf";
7static const char thread_model[] = "posix"; 7static const char thread_model[] = "posix";
8 8
9static const struct { 9static const struct {
10 const char *name, *value; 10 const char *name, *value;
11} configure_default_options[] = { { "cpu", "i486" }, { "arch", "i486" } }; 11} configure_default_options[] = { { "cpu", "i486" }, { "arch", "i486" }, { "tune", "nocona" } };

cvs diff -r1.10 -r1.11 src/gnu/usr.bin/gcc4/arch/x86_64/Attic/configargs.h (switch to unified diff)

--- src/gnu/usr.bin/gcc4/arch/x86_64/Attic/configargs.h 2008/09/01 23:52:24 1.10
+++ src/gnu/usr.bin/gcc4/arch/x86_64/Attic/configargs.h 2009/05/04 21:32:31 1.11
@@ -1,11 +1,11 @@ @@ -1,11 +1,11 @@
1/* This file is automatically generated. DO NOT EDIT! */ 1/* This file is automatically generated. DO NOT EDIT! */
2/* Generated from: NetBSD: mknative-gcc,v 1.23 2008/02/08 18:06:48 skrll Exp */ 2/* Generated from: NetBSD: mknative-gcc,v 1.23 2008/02/08 18:06:48 skrll Exp */
3/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */ 3/* Generated from: NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp */
4 4
5/* Generated automatically. */ 5/* Generated automatically. */
6static const char configuration_arguments[] = "/usr/src/tools/gcc/../../gnu/dist/gcc4/configure --enable-long-long --disable-multilib --enable-threads --disable-symvers --build=x86_64-unknown-netbsd4.99.72 --host=x86_64--netbsd --target=x86_64--netbsd --enable-__cxa_atexit"; 6static const char configuration_arguments[] = "/usr/src/tools/gcc/../../gnu/dist/gcc4/configure --enable-long-long --disable-multilib --enable-threads --disable-symvers --build=x86_64-unknown-netbsd4.99.72 --host=x86_64--netbsd --target=x86_64--netbsd --enable-__cxa_atexit --with-tune=nocona";
7static const char thread_model[] = "posix"; 7static const char thread_model[] = "posix";
8 8
9static const struct { 9static const struct {
10 const char *name, *value; 10 const char *name, *value;
11} configure_default_options[] = { { "cpu", "k8" } }; 11} configure_default_options[] = { { "cpu", "k8" }, { "tune", "nocona" } };

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

--- src/share/mk/bsd.own.mk 2009/05/01 20:47:53 1.562
+++ src/share/mk/bsd.own.mk 2009/05/04 21:32:31 1.563
@@ -1,979 +1,981 @@ @@ -1,979 +1,981 @@
1# $NetBSD: bsd.own.mk,v 1.562 2009/05/01 20:47:53 apb Exp $ 1# $NetBSD: bsd.own.mk,v 1.563 2009/05/04 21:32:31 ad Exp $
2 2
3.if !defined(_BSD_OWN_MK_) 3.if !defined(_BSD_OWN_MK_)
4_BSD_OWN_MK_=1 4_BSD_OWN_MK_=1
5 5
6MAKECONF?= /etc/mk.conf 6MAKECONF?= /etc/mk.conf
7.-include "${MAKECONF}" 7.-include "${MAKECONF}"
8 8
9# 9#
10# CPU model, derived from MACHINE_ARCH 10# CPU model, derived from MACHINE_ARCH
11# 11#
12MACHINE_CPU= ${MACHINE_ARCH:C/mipse[bl]/mips/:C/mips64e[bl]/mips/:C/sh3e[bl]/sh3/:S/m68000/m68k/:S/armeb/arm/} 12MACHINE_CPU= ${MACHINE_ARCH:C/mipse[bl]/mips/:C/mips64e[bl]/mips/:C/sh3e[bl]/sh3/:S/m68000/m68k/:S/armeb/arm/}
13 13
14# 14#
15# Subdirectory used below ${RELEASEDIR} when building a release 15# Subdirectory used below ${RELEASEDIR} when building a release
16# 16#
17RELEASEMACHINEDIR?= ${MACHINE} 17RELEASEMACHINEDIR?= ${MACHINE}
18 18
19# 19#
20# Subdirectory or path component used for the following paths: 20# Subdirectory or path component used for the following paths:
21# distrib/${RELEASEMACHINE} 21# distrib/${RELEASEMACHINE}
22# distrib/notes/${RELEASEMACHINE} 22# distrib/notes/${RELEASEMACHINE}
23# etc/etc.${RELEASEMACHINE} 23# etc/etc.${RELEASEMACHINE}
24# Used when building a release. 24# Used when building a release.
25# 25#
26RELEASEMACHINE?= ${MACHINE} 26RELEASEMACHINE?= ${MACHINE}
27 27
28# 28#
29# NEED_OWN_INSTALL_TARGET is set to "no" by pkgsrc/mk/bsd.pkg.mk to 29# NEED_OWN_INSTALL_TARGET is set to "no" by pkgsrc/mk/bsd.pkg.mk to
30# ensure that things defined by <bsd.own.mk> (default targets, 30# ensure that things defined by <bsd.own.mk> (default targets,
31# INSTALL_FILE, etc.) are not conflicting with bsd.pkg.mk. 31# INSTALL_FILE, etc.) are not conflicting with bsd.pkg.mk.
32# 32#
33NEED_OWN_INSTALL_TARGET?= yes 33NEED_OWN_INSTALL_TARGET?= yes
34 34
35# 35#
36# This lists the platforms which do not have working in-tree toolchains. 36# This lists the platforms which do not have working in-tree toolchains.
37# For the in-tree gcc 3.3.2 toolchain, this list is empty. 37# For the in-tree gcc 3.3.2 toolchain, this list is empty.
38# If some future port is not supported by the in-tree toolchain, this 38# If some future port is not supported by the in-tree toolchain, this
39# should be set to "yes" for that port only. 39# should be set to "yes" for that port only.
40# 40#
41TOOLCHAIN_MISSING?= no 41TOOLCHAIN_MISSING?= no
42 42
43# default to GCC4 43# default to GCC4
44.if !defined(HAVE_GCC) && !defined(HAVE_PCC) 44.if !defined(HAVE_GCC) && !defined(HAVE_PCC)
45HAVE_GCC= 4 45HAVE_GCC= 4
46.endif 46.endif
47 47
48# default to GDB6 48# default to GDB6
49HAVE_GDB?= 6 49HAVE_GDB?= 6
50 50
51CPPFLAG_ISYSTEM= -isystem 51CPPFLAG_ISYSTEM= -isystem
52.if defined(HAVE_GCC) 52.if defined(HAVE_GCC)
53.if ${HAVE_GCC} == 3 53.if ${HAVE_GCC} == 3
54CPPFLAG_ISYSTEMXX= -isystem-cxx 54CPPFLAG_ISYSTEMXX= -isystem-cxx
55.else # GCC 4 55.else # GCC 4
56CPPFLAG_ISYSTEMXX= -cxx-isystem 56CPPFLAG_ISYSTEMXX= -cxx-isystem
57.endif 57.endif
58.endif 58.endif
59 59
60.if empty(.MAKEFLAGS:M-V*) 60.if empty(.MAKEFLAGS:M-V*)
61.if defined(MAKEOBJDIRPREFIX) || defined(MAKEOBJDIR) 61.if defined(MAKEOBJDIRPREFIX) || defined(MAKEOBJDIR)
62PRINTOBJDIR= ${MAKE} -r -V .OBJDIR -f /dev/null xxx 62PRINTOBJDIR= ${MAKE} -r -V .OBJDIR -f /dev/null xxx
63.else 63.else
64PRINTOBJDIR= ${MAKE} -V .OBJDIR 64PRINTOBJDIR= ${MAKE} -V .OBJDIR
65.endif 65.endif
66.else 66.else
67PRINTOBJDIR= echo # prevent infinite recursion 67PRINTOBJDIR= echo # prevent infinite recursion
68.endif 68.endif
69 69
70# 70#
71# Determine if running in the NetBSD source tree by checking for the 71# Determine if running in the NetBSD source tree by checking for the
72# existence of build.sh and tools/ in the current or a parent directory, 72# existence of build.sh and tools/ in the current or a parent directory,
73# and setting _SRC_TOP_ to the result. 73# and setting _SRC_TOP_ to the result.
74# 74#
75.if !defined(_SRC_TOP_) # { 75.if !defined(_SRC_TOP_) # {
76_SRC_TOP_!= cd ${.CURDIR}; while :; do \ 76_SRC_TOP_!= cd ${.CURDIR}; while :; do \
77 here=`pwd`; \ 77 here=`pwd`; \
78 [ -f build.sh ] && [ -d tools ] && { echo $$here; break; }; \ 78 [ -f build.sh ] && [ -d tools ] && { echo $$here; break; }; \
79 case $$here in /) echo ""; break;; esac; \ 79 case $$here in /) echo ""; break;; esac; \
80 cd ..; done 80 cd ..; done
81 81
82.MAKEOVERRIDES+= _SRC_TOP_ 82.MAKEOVERRIDES+= _SRC_TOP_
83 83
84.endif # } 84.endif # }
85 85
86# 86#
87# If _SRC_TOP_ != "", we're within the NetBSD source tree, so set 87# If _SRC_TOP_ != "", we're within the NetBSD source tree, so set
88# defaults for NETBSDSRCDIR and _SRC_TOP_OBJ_. 88# defaults for NETBSDSRCDIR and _SRC_TOP_OBJ_.
89# 89#
90.if (${_SRC_TOP_} != "") # { 90.if (${_SRC_TOP_} != "") # {
91 91
92NETBSDSRCDIR?= ${_SRC_TOP_} 92NETBSDSRCDIR?= ${_SRC_TOP_}
93 93
94.if !defined(_SRC_TOP_OBJ_) 94.if !defined(_SRC_TOP_OBJ_)
95_SRC_TOP_OBJ_!= cd ${_SRC_TOP_} && ${PRINTOBJDIR} 95_SRC_TOP_OBJ_!= cd ${_SRC_TOP_} && ${PRINTOBJDIR}
96.MAKEOVERRIDES+= _SRC_TOP_OBJ_ 96.MAKEOVERRIDES+= _SRC_TOP_OBJ_
97.endif 97.endif
98 98
99.endif # _SRC_TOP_ != "" # } 99.endif # _SRC_TOP_ != "" # }
100 100
101 101
102.if (${_SRC_TOP_} != "") && \ 102.if (${_SRC_TOP_} != "") && \
103 (${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN)) 103 (${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN))
104USETOOLS?= yes 104USETOOLS?= yes
105.endif 105.endif
106USETOOLS?= no 106USETOOLS?= no
107 107
108 108
109.if ${MACHINE_ARCH} == "mips" || ${MACHINE_ARCH} == "mips64" || \ 109.if ${MACHINE_ARCH} == "mips" || ${MACHINE_ARCH} == "mips64" || \
110 ${MACHINE_ARCH} == "sh3" 110 ${MACHINE_ARCH} == "sh3"
111.BEGIN: 111.BEGIN:
112 @echo "Must set MACHINE_ARCH to one of ${MACHINE_ARCH}eb or ${MACHINE_ARCH}el" 112 @echo "Must set MACHINE_ARCH to one of ${MACHINE_ARCH}eb or ${MACHINE_ARCH}el"
113 @false 113 @false
114.elif defined(REQUIRETOOLS) && \ 114.elif defined(REQUIRETOOLS) && \
115 (${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN)) && \ 115 (${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN)) && \
116 ${USETOOLS} == "no" 116 ${USETOOLS} == "no"
117.BEGIN: 117.BEGIN:
118 @echo "USETOOLS=no, but this component requires a version-specific host toolchain" 118 @echo "USETOOLS=no, but this component requires a version-specific host toolchain"
119 @false 119 @false
120.endif 120.endif
121 121
122# 122#
123# Host platform information; may be overridden 123# Host platform information; may be overridden
124# 124#
125.if !defined(HOST_OSTYPE) 125.if !defined(HOST_OSTYPE)
126_HOST_OSNAME!= uname -s 126_HOST_OSNAME!= uname -s
127_HOST_OSREL!= uname -r 127_HOST_OSREL!= uname -r
128# For _HOST_ARCH, if uname -p fails, or prints "unknown", or prints 128# For _HOST_ARCH, if uname -p fails, or prints "unknown", or prints
129# something that does not look like an identifier, then use uname -m. 129# something that does not look like an identifier, then use uname -m.
130_HOST_ARCH!= uname -p 2>/dev/null 130_HOST_ARCH!= uname -p 2>/dev/null
131_HOST_ARCH:= ${HOST_ARCH:tW:C/.*[^-_A-Za-z0-9].*//:S/unknown//} 131_HOST_ARCH:= ${HOST_ARCH:tW:C/.*[^-_A-Za-z0-9].*//:S/unknown//}
132.if empty(_HOST_ARCH) 132.if empty(_HOST_ARCH)
133_HOST_ARCH!= uname -m 133_HOST_ARCH!= uname -m
134.endif 134.endif
135HOST_OSTYPE:= ${_HOST_OSNAME}-${_HOST_OSREL:C/\([^\)]*\)//g:[*]:C/ /_/g}-${_HOST_ARCH:C/\([^\)]*\)//g:[*]:C/ /_/g} 135HOST_OSTYPE:= ${_HOST_OSNAME}-${_HOST_OSREL:C/\([^\)]*\)//g:[*]:C/ /_/g}-${_HOST_ARCH:C/\([^\)]*\)//g:[*]:C/ /_/g}
136.MAKEOVERRIDES+= HOST_OSTYPE 136.MAKEOVERRIDES+= HOST_OSTYPE
137.endif # !defined(HOST_OSTYPE) 137.endif # !defined(HOST_OSTYPE)
138 138
139.if ${USETOOLS} == "yes" # { 139.if ${USETOOLS} == "yes" # {
140 140
141# 141#
142# Provide a default for TOOLDIR. 142# Provide a default for TOOLDIR.
143# 143#
144.if !defined(TOOLDIR) 144.if !defined(TOOLDIR)
145TOOLDIR:= ${_SRC_TOP_OBJ_}/tooldir.${HOST_OSTYPE} 145TOOLDIR:= ${_SRC_TOP_OBJ_}/tooldir.${HOST_OSTYPE}
146.MAKEOVERRIDES+= TOOLDIR 146.MAKEOVERRIDES+= TOOLDIR
147.endif 147.endif
148 148
149# 149#
150# This is the prefix used for the NetBSD-sourced tools. 150# This is the prefix used for the NetBSD-sourced tools.
151# 151#
152_TOOL_PREFIX?= nb 152_TOOL_PREFIX?= nb
153 153
154# 154#
155# If an external toolchain base is specified, use it. 155# If an external toolchain base is specified, use it.
156# 156#
157.if defined(EXTERNAL_TOOLCHAIN) # { 157.if defined(EXTERNAL_TOOLCHAIN) # {
158AR= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ar 158AR= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ar
159AS= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-as 159AS= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-as
160LD= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ld 160LD= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ld
161NM= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-nm 161NM= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-nm
162OBJCOPY= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objcopy 162OBJCOPY= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objcopy
163OBJDUMP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objdump 163OBJDUMP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objdump
164RANLIB= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ranlib 164RANLIB= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ranlib
165SIZE= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-size 165SIZE= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-size
166STRIP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-strip 166STRIP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-strip
167 167
168CC= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc 168CC= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc
169CPP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-cpp 169CPP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-cpp
170CXX= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-c++ 170CXX= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-c++
171FC= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-g77 171FC= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-g77
172OBJC= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc 172OBJC= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc
173.else # } { 173.else # } {
174# Define default locations for common tools. 174# Define default locations for common tools.
175.if ${USETOOLS_BINUTILS:Uyes} == "yes" # { 175.if ${USETOOLS_BINUTILS:Uyes} == "yes" # {
176AR= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ar 176AR= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ar
177AS= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-as 177AS= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-as
178LD= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ld 178LD= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ld
179NM= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-nm 179NM= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-nm
180OBJCOPY= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-objcopy 180OBJCOPY= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-objcopy
181OBJDUMP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-objdump 181OBJDUMP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-objdump
182RANLIB= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ranlib 182RANLIB= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ranlib
183SIZE= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-size 183SIZE= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-size
184STRIP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-strip 184STRIP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-strip
185.endif # } 185.endif # }
186 186
187.if defined(HAVE_GCC) && ${USETOOLS_GCC:Uyes} == "yes" # { 187.if defined(HAVE_GCC) && ${USETOOLS_GCC:Uyes} == "yes" # {
188CC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc 188CC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc
189CPP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-cpp 189CPP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-cpp
190CXX= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-c++ 190CXX= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-c++
191FC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-g77 191FC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-g77
192OBJC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc 192OBJC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc
193.endif # } 193.endif # }
194 194
195.if defined(HAVE_PCC) && ${USETOOLS_PCC:Uyes} == "yes" 195.if defined(HAVE_PCC) && ${USETOOLS_PCC:Uyes} == "yes"
196CC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-pcc 196CC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-pcc
197CPP= ${TOOLDIR}/libexec/${MACHINE_GNU_PLATFORM}-cpp 197CPP= ${TOOLDIR}/libexec/${MACHINE_GNU_PLATFORM}-cpp
198CXX= false 198CXX= false
199FC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-f77 199FC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-f77
200OBJC= false 200OBJC= false
201.endif 201.endif
202 202
203.endif # EXTERNAL_TOOLCHAIN # } 203.endif # EXTERNAL_TOOLCHAIN # }
204 204
205HOST_MKDEP= ${TOOLDIR}/bin/${_TOOL_PREFIX}host-mkdep 205HOST_MKDEP= ${TOOLDIR}/bin/${_TOOL_PREFIX}host-mkdep
206 206
207DBSYM= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-dbsym 207DBSYM= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-dbsym
208ELF2ECOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}mips-elf2ecoff 208ELF2ECOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}mips-elf2ecoff
209INSTALL= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-install 209INSTALL= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-install
210LEX= ${TOOLDIR}/bin/${_TOOL_PREFIX}lex 210LEX= ${TOOLDIR}/bin/${_TOOL_PREFIX}lex
211LINT= CC=${CC:Q} ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-lint 211LINT= CC=${CC:Q} ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-lint
212LORDER= NM=${NM:Q} MKTEMP=${TOOL_MKTEMP:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}lorder 212LORDER= NM=${NM:Q} MKTEMP=${TOOL_MKTEMP:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}lorder
213MKDEP= CC=${CC:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}mkdep 213MKDEP= CC=${CC:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}mkdep
214PAXCTL= ${TOOLDIR}/bin/${_TOOL_PREFIX}paxctl 214PAXCTL= ${TOOLDIR}/bin/${_TOOL_PREFIX}paxctl
215TSORT= ${TOOLDIR}/bin/${_TOOL_PREFIX}tsort -q 215TSORT= ${TOOLDIR}/bin/${_TOOL_PREFIX}tsort -q
216YACC= ${TOOLDIR}/bin/${_TOOL_PREFIX}yacc 216YACC= ${TOOLDIR}/bin/${_TOOL_PREFIX}yacc
217 217
218TOOL_AMIGAAOUT2BB= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-aout2bb 218TOOL_AMIGAAOUT2BB= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-aout2bb
219TOOL_AMIGAELF2BB= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-elf2bb 219TOOL_AMIGAELF2BB= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-elf2bb
220TOOL_AMIGATXLT= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-txlt 220TOOL_AMIGATXLT= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-txlt
221TOOL_ASN1_COMPILE= ${TOOLDIR}/bin/${_TOOL_PREFIX}asn1_compile 221TOOL_ASN1_COMPILE= ${TOOLDIR}/bin/${_TOOL_PREFIX}asn1_compile
222TOOL_ATF_COMPILE= ${TOOLDIR}/bin/${_TOOL_PREFIX}atf-compile 222TOOL_ATF_COMPILE= ${TOOLDIR}/bin/${_TOOL_PREFIX}atf-compile
223TOOL_AWK= ${TOOLDIR}/bin/${_TOOL_PREFIX}awk 223TOOL_AWK= ${TOOLDIR}/bin/${_TOOL_PREFIX}awk
224TOOL_CAP_MKDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}cap_mkdb 224TOOL_CAP_MKDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}cap_mkdb
225TOOL_CAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}cat 225TOOL_CAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}cat
226TOOL_CKSUM= ${TOOLDIR}/bin/${_TOOL_PREFIX}cksum 226TOOL_CKSUM= ${TOOLDIR}/bin/${_TOOL_PREFIX}cksum
227TOOL_COMPILE_ET= ${TOOLDIR}/bin/${_TOOL_PREFIX}compile_et 227TOOL_COMPILE_ET= ${TOOLDIR}/bin/${_TOOL_PREFIX}compile_et
228TOOL_CONFIG= ${TOOLDIR}/bin/${_TOOL_PREFIX}config 228TOOL_CONFIG= ${TOOLDIR}/bin/${_TOOL_PREFIX}config
229TOOL_CRUNCHGEN= MAKE=${.MAKE:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}crunchgen 229TOOL_CRUNCHGEN= MAKE=${.MAKE:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}crunchgen
230TOOL_CTAGS= ${TOOLDIR}/bin/${_TOOL_PREFIX}ctags 230TOOL_CTAGS= ${TOOLDIR}/bin/${_TOOL_PREFIX}ctags
231TOOL_DB= ${TOOLDIR}/bin/${_TOOL_PREFIX}db 231TOOL_DB= ${TOOLDIR}/bin/${_TOOL_PREFIX}db
232TOOL_DISKLABEL= ${TOOLDIR}/bin/nbdisklabel-${MAKEWRAPPERMACHINE} 232TOOL_DISKLABEL= ${TOOLDIR}/bin/nbdisklabel-${MAKEWRAPPERMACHINE}
233TOOL_EQN= ${TOOLDIR}/bin/${_TOOL_PREFIX}eqn 233TOOL_EQN= ${TOOLDIR}/bin/${_TOOL_PREFIX}eqn
234TOOL_FDISK= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-fdisk 234TOOL_FDISK= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-fdisk
235TOOL_FGEN= ${TOOLDIR}/bin/${_TOOL_PREFIX}fgen 235TOOL_FGEN= ${TOOLDIR}/bin/${_TOOL_PREFIX}fgen
236TOOL_GENASSYM= ${TOOLDIR}/bin/${_TOOL_PREFIX}genassym 236TOOL_GENASSYM= ${TOOLDIR}/bin/${_TOOL_PREFIX}genassym
237TOOL_GENCAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}gencat 237TOOL_GENCAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}gencat
238TOOL_GMAKE= ${TOOLDIR}/bin/${_TOOL_PREFIX}gmake 238TOOL_GMAKE= ${TOOLDIR}/bin/${_TOOL_PREFIX}gmake
239TOOL_GREP= ${TOOLDIR}/bin/${_TOOL_PREFIX}grep 239TOOL_GREP= ${TOOLDIR}/bin/${_TOOL_PREFIX}grep
240TOOL_GROFF= PATH=${TOOLDIR}/lib/groff:$${PATH} ${TOOLDIR}/bin/${_TOOL_PREFIX}groff 240TOOL_GROFF= PATH=${TOOLDIR}/lib/groff:$${PATH} ${TOOLDIR}/bin/${_TOOL_PREFIX}groff
241TOOL_HEXDUMP= ${TOOLDIR}/bin/${_TOOL_PREFIX}hexdump 241TOOL_HEXDUMP= ${TOOLDIR}/bin/${_TOOL_PREFIX}hexdump
242TOOL_HP300MKBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}hp300-mkboot 242TOOL_HP300MKBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}hp300-mkboot
243TOOL_HP700MKBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}hp700-mkboot 243TOOL_HP700MKBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}hp700-mkboot
244TOOL_INDXBIB= ${TOOLDIR}/bin/${_TOOL_PREFIX}indxbib 244TOOL_INDXBIB= ${TOOLDIR}/bin/${_TOOL_PREFIX}indxbib
245TOOL_INSTALLBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}installboot 245TOOL_INSTALLBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}installboot
246TOOL_INSTALL_INFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}install-info 246TOOL_INSTALL_INFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}install-info
247TOOL_JOIN= ${TOOLDIR}/bin/${_TOOL_PREFIX}join 247TOOL_JOIN= ${TOOLDIR}/bin/${_TOOL_PREFIX}join
248TOOL_M4= ${TOOLDIR}/bin/${_TOOL_PREFIX}m4 248TOOL_M4= ${TOOLDIR}/bin/${_TOOL_PREFIX}m4
249TOOL_MACPPCFIXCOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}macppc-fixcoff 249TOOL_MACPPCFIXCOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}macppc-fixcoff
250TOOL_MAKEFS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makefs 250TOOL_MAKEFS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makefs
251TOOL_MAKEINFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}makeinfo 251TOOL_MAKEINFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}makeinfo
252TOOL_MAKEWHATIS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makewhatis 252TOOL_MAKEWHATIS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makewhatis
253TOOL_MDSETIMAGE= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-mdsetimage 253TOOL_MDSETIMAGE= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-mdsetimage
254TOOL_MENUC= MENUDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}menuc 254TOOL_MENUC= MENUDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}menuc
255TOOL_MIPSELF2ECOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}mips-elf2ecoff 255TOOL_MIPSELF2ECOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}mips-elf2ecoff
256TOOL_MKCSMAPPER= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkcsmapper 256TOOL_MKCSMAPPER= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkcsmapper
257TOOL_MKESDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkesdb 257TOOL_MKESDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkesdb
258TOOL_MKLOCALE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mklocale 258TOOL_MKLOCALE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mklocale
259TOOL_MKMAGIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}file 259TOOL_MKMAGIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}file
260TOOL_MKTEMP= ${TOOLDIR}/bin/${_TOOL_PREFIX}mktemp 260TOOL_MKTEMP= ${TOOLDIR}/bin/${_TOOL_PREFIX}mktemp
261TOOL_MSGC= MSGDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}msgc 261TOOL_MSGC= MSGDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}msgc
262TOOL_MTREE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mtree 262TOOL_MTREE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mtree
263TOOL_PAX= ${TOOLDIR}/bin/${_TOOL_PREFIX}pax 263TOOL_PAX= ${TOOLDIR}/bin/${_TOOL_PREFIX}pax
264TOOL_PIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}pic 264TOOL_PIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}pic
265TOOL_POWERPCMKBOOTIMAGE=${TOOLDIR}/bin/${_TOOL_PREFIX}powerpc-mkbootimage 265TOOL_POWERPCMKBOOTIMAGE=${TOOLDIR}/bin/${_TOOL_PREFIX}powerpc-mkbootimage
266TOOL_PWD_MKDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}pwd_mkdb 266TOOL_PWD_MKDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}pwd_mkdb
267TOOL_REFER= ${TOOLDIR}/bin/${_TOOL_PREFIX}refer 267TOOL_REFER= ${TOOLDIR}/bin/${_TOOL_PREFIX}refer
268TOOL_ROFF_ASCII= PATH=${TOOLDIR}/lib/groff:$${PATH} ${TOOLDIR}/bin/${_TOOL_PREFIX}nroff 268TOOL_ROFF_ASCII= PATH=${TOOLDIR}/lib/groff:$${PATH} ${TOOLDIR}/bin/${_TOOL_PREFIX}nroff
269TOOL_ROFF_DVI= ${TOOL_GROFF} -Tdvi 269TOOL_ROFF_DVI= ${TOOL_GROFF} -Tdvi
270TOOL_ROFF_HTML= ${TOOL_GROFF} -Tlatin1 -mdoc2html 270TOOL_ROFF_HTML= ${TOOL_GROFF} -Tlatin1 -mdoc2html
271TOOL_ROFF_PS= ${TOOL_GROFF} -Tps 271TOOL_ROFF_PS= ${TOOL_GROFF} -Tps
272TOOL_ROFF_RAW= ${TOOL_GROFF} -Z 272TOOL_ROFF_RAW= ${TOOL_GROFF} -Z
273TOOL_RPCGEN= RPCGEN_CPP=${CPP:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}rpcgen 273TOOL_RPCGEN= RPCGEN_CPP=${CPP:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}rpcgen
274TOOL_SED= ${TOOLDIR}/bin/${_TOOL_PREFIX}sed 274TOOL_SED= ${TOOLDIR}/bin/${_TOOL_PREFIX}sed
275TOOL_SOELIM= ${TOOLDIR}/bin/${_TOOL_PREFIX}soelim 275TOOL_SOELIM= ${TOOLDIR}/bin/${_TOOL_PREFIX}soelim
276TOOL_SPARKCRC= ${TOOLDIR}/bin/${_TOOL_PREFIX}sparkcrc 276TOOL_SPARKCRC= ${TOOLDIR}/bin/${_TOOL_PREFIX}sparkcrc
277TOOL_STAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}stat 277TOOL_STAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}stat
278TOOL_STRFILE= ${TOOLDIR}/bin/${_TOOL_PREFIX}strfile 278TOOL_STRFILE= ${TOOLDIR}/bin/${_TOOL_PREFIX}strfile
279TOOL_SUNLABEL= ${TOOLDIR}/bin/${_TOOL_PREFIX}sunlabel 279TOOL_SUNLABEL= ${TOOLDIR}/bin/${_TOOL_PREFIX}sunlabel
280TOOL_TBL= ${TOOLDIR}/bin/${_TOOL_PREFIX}tbl 280TOOL_TBL= ${TOOLDIR}/bin/${_TOOL_PREFIX}tbl
281TOOL_UUDECODE= ${TOOLDIR}/bin/${_TOOL_PREFIX}uudecode 281TOOL_UUDECODE= ${TOOLDIR}/bin/${_TOOL_PREFIX}uudecode
282TOOL_VGRIND= ${TOOLDIR}/bin/${_TOOL_PREFIX}vgrind -f 282TOOL_VGRIND= ${TOOLDIR}/bin/${_TOOL_PREFIX}vgrind -f
283TOOL_ZIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}zic 283TOOL_ZIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}zic
284 284
285.else # USETOOLS != yes # } { 285.else # USETOOLS != yes # } {
286 286
287TOOL_AMIGAAOUT2BB= amiga-aout2bb 287TOOL_AMIGAAOUT2BB= amiga-aout2bb
288TOOL_AMIGAELF2BB= amiga-elf2bb 288TOOL_AMIGAELF2BB= amiga-elf2bb
289TOOL_AMIGATXLT= amiga-txlt 289TOOL_AMIGATXLT= amiga-txlt
290TOOL_ASN1_COMPILE= asn1_compile 290TOOL_ASN1_COMPILE= asn1_compile
291TOOL_ATF_COMPILE= atf-compile 291TOOL_ATF_COMPILE= atf-compile
292TOOL_AWK= awk 292TOOL_AWK= awk
293TOOL_CAP_MKDB= cap_mkdb 293TOOL_CAP_MKDB= cap_mkdb
294TOOL_CAT= cat 294TOOL_CAT= cat
295TOOL_CKSUM= cksum 295TOOL_CKSUM= cksum
296TOOL_COMPILE_ET= compile_et 296TOOL_COMPILE_ET= compile_et
297TOOL_CONFIG= config 297TOOL_CONFIG= config
298TOOL_CRUNCHGEN= crunchgen 298TOOL_CRUNCHGEN= crunchgen
299TOOL_CTAGS= ctags 299TOOL_CTAGS= ctags
300TOOL_DB= db 300TOOL_DB= db
301TOOL_DISKLABEL= disklabel 301TOOL_DISKLABEL= disklabel
302TOOL_EQN= eqn 302TOOL_EQN= eqn
303TOOL_FDISK= fdisk 303TOOL_FDISK= fdisk
304TOOL_FGEN= fgen 304TOOL_FGEN= fgen
305TOOL_GENASSYM= genassym 305TOOL_GENASSYM= genassym
306TOOL_GENCAT= gencat 306TOOL_GENCAT= gencat
307TOOL_GMAKE= gmake 307TOOL_GMAKE= gmake
308TOOL_GREP= grep 308TOOL_GREP= grep
309TOOL_GROFF= groff 309TOOL_GROFF= groff
310TOOL_HEXDUMP= hexdump 310TOOL_HEXDUMP= hexdump
311TOOL_HP300MKBOOT= hp300-mkboot 311TOOL_HP300MKBOOT= hp300-mkboot
312TOOL_HP700MKBOOT= hp700-mkboot 312TOOL_HP700MKBOOT= hp700-mkboot
313TOOL_INDXBIB= indxbib 313TOOL_INDXBIB= indxbib
314TOOL_INSTALLBOOT= installboot 314TOOL_INSTALLBOOT= installboot
315TOOL_INSTALL_INFO= install-info 315TOOL_INSTALL_INFO= install-info
316TOOL_JOIN= join 316TOOL_JOIN= join
317TOOL_M4= m4 317TOOL_M4= m4
318TOOL_MACPPCFIXCOFF= macppc-fixcoff 318TOOL_MACPPCFIXCOFF= macppc-fixcoff
319TOOL_MAKEFS= makefs 319TOOL_MAKEFS= makefs
320TOOL_MAKEINFO= makeinfo 320TOOL_MAKEINFO= makeinfo
321TOOL_MAKEWHATIS= /usr/libexec/makewhatis 321TOOL_MAKEWHATIS= /usr/libexec/makewhatis
322TOOL_MDSETIMAGE= mdsetimage 322TOOL_MDSETIMAGE= mdsetimage
323TOOL_MENUC= menuc 323TOOL_MENUC= menuc
324TOOL_MIPSELF2ECOFF= mips-elf2ecoff 324TOOL_MIPSELF2ECOFF= mips-elf2ecoff
325TOOL_MKCSMAPPER= mkcsmapper 325TOOL_MKCSMAPPER= mkcsmapper
326TOOL_MKESDB= mkesdb 326TOOL_MKESDB= mkesdb
327TOOL_MKLOCALE= mklocale 327TOOL_MKLOCALE= mklocale
328TOOL_MKMAGIC= file 328TOOL_MKMAGIC= file
329TOOL_MKTEMP= mktemp 329TOOL_MKTEMP= mktemp
330TOOL_MSGC= msgc 330TOOL_MSGC= msgc
331TOOL_MTREE= mtree 331TOOL_MTREE= mtree
332TOOL_PAX= pax 332TOOL_PAX= pax
333TOOL_PIC= pic 333TOOL_PIC= pic
334TOOL_POWERPCMKBOOTIMAGE= powerpc-mkbootimage 334TOOL_POWERPCMKBOOTIMAGE= powerpc-mkbootimage
335TOOL_PWD_MKDB= pwd_mkdb 335TOOL_PWD_MKDB= pwd_mkdb
336TOOL_REFER= refer 336TOOL_REFER= refer
337TOOL_ROFF_ASCII= nroff 337TOOL_ROFF_ASCII= nroff
338TOOL_ROFF_DVI= ${TOOL_GROFF} -Tdvi 338TOOL_ROFF_DVI= ${TOOL_GROFF} -Tdvi
339TOOL_ROFF_HTML= ${TOOL_GROFF} -Tlatin1 -mdoc2html 339TOOL_ROFF_HTML= ${TOOL_GROFF} -Tlatin1 -mdoc2html
340TOOL_ROFF_PS= ${TOOL_GROFF} -Tps 340TOOL_ROFF_PS= ${TOOL_GROFF} -Tps
341TOOL_ROFF_RAW= ${TOOL_GROFF} -Z 341TOOL_ROFF_RAW= ${TOOL_GROFF} -Z
342TOOL_RPCGEN= rpcgen 342TOOL_RPCGEN= rpcgen
343TOOL_SED= sed 343TOOL_SED= sed
344TOOL_SOELIM= soelim 344TOOL_SOELIM= soelim
345TOOL_SPARKCRC= sparkcrc 345TOOL_SPARKCRC= sparkcrc
346TOOL_STAT= stat 346TOOL_STAT= stat
347TOOL_STRFILE= strfile 347TOOL_STRFILE= strfile
348TOOL_SUNLABEL= sunlabel 348TOOL_SUNLABEL= sunlabel
349TOOL_TBL= tbl 349TOOL_TBL= tbl
350TOOL_UUDECODE= uudecode 350TOOL_UUDECODE= uudecode
351TOOL_VGRIND= vgrind -f 351TOOL_VGRIND= vgrind -f
352TOOL_ZIC= zic 352TOOL_ZIC= zic
353 353
354.endif # USETOOLS != yes # } 354.endif # USETOOLS != yes # }
355 355
356# 356#
357# Targets to check if DESTDIR or RELEASEDIR is provided 357# Targets to check if DESTDIR or RELEASEDIR is provided
358# 358#
359.if !target(check_DESTDIR) 359.if !target(check_DESTDIR)
360check_DESTDIR: .PHONY .NOTMAIN 360check_DESTDIR: .PHONY .NOTMAIN
361.if !defined(DESTDIR) 361.if !defined(DESTDIR)
362 @echo "setenv DESTDIR before doing that!" 362 @echo "setenv DESTDIR before doing that!"
363 @false 363 @false
364.else 364.else
365 @true 365 @true
366.endif 366.endif
367.endif 367.endif
368 368
369.if !target(check_RELEASEDIR) 369.if !target(check_RELEASEDIR)
370check_RELEASEDIR: .PHONY .NOTMAIN 370check_RELEASEDIR: .PHONY .NOTMAIN
371.if !defined(RELEASEDIR) 371.if !defined(RELEASEDIR)
372 @echo "setenv RELEASEDIR before doing that!" 372 @echo "setenv RELEASEDIR before doing that!"
373 @false 373 @false
374.else 374.else
375 @true 375 @true
376.endif 376.endif
377.endif 377.endif
378 378
379 379
380.if ${USETOOLS} == "yes" # { 380.if ${USETOOLS} == "yes" # {
381# 381#
382# Make sure DESTDIR is set, so that builds with these tools always 382# Make sure DESTDIR is set, so that builds with these tools always
383# get appropriate -nostdinc, -nostdlib, etc. handling. The default is 383# get appropriate -nostdinc, -nostdlib, etc. handling. The default is
384# <empty string>, meaning start from /, the root directory. 384# <empty string>, meaning start from /, the root directory.
385# 385#
386DESTDIR?= 386DESTDIR?=
387.endif # } 387.endif # }
388 388
389# 389#
390# Build a dynamically linked /bin and /sbin, with the necessary shared 390# Build a dynamically linked /bin and /sbin, with the necessary shared
391# libraries moved from /usr/lib to /lib and the shared linker moved 391# libraries moved from /usr/lib to /lib and the shared linker moved
392# from /usr/libexec to /lib 392# from /usr/libexec to /lib
393# 393#
394# Note that if the BINDIR is not /bin or /sbin, then we always use the 394# Note that if the BINDIR is not /bin or /sbin, then we always use the
395# non-DYNAMICROOT behavior (i.e. it is only enabled for programs in /bin 395# non-DYNAMICROOT behavior (i.e. it is only enabled for programs in /bin
396# and /sbin). See <bsd.shlib.mk>. 396# and /sbin). See <bsd.shlib.mk>.
397# 397#
398MKDYNAMICROOT?= yes 398MKDYNAMICROOT?= yes
399 399
400# 400#
401# Where the system object and source trees are kept; can be configurable 401# Where the system object and source trees are kept; can be configurable
402# by the user in case they want them in ~/foosrc and ~/fooobj (for example). 402# by the user in case they want them in ~/foosrc and ~/fooobj (for example).
403# 403#
404BSDSRCDIR?= /usr/src 404BSDSRCDIR?= /usr/src
405BSDOBJDIR?= /usr/obj 405BSDOBJDIR?= /usr/obj
406NETBSDSRCDIR?= ${BSDSRCDIR} 406NETBSDSRCDIR?= ${BSDSRCDIR}
407 407
408BINGRP?= wheel 408BINGRP?= wheel
409BINOWN?= root 409BINOWN?= root
410BINMODE?= 555 410BINMODE?= 555
411NONBINMODE?= 444 411NONBINMODE?= 444
412 412
413MANDIR?= /usr/share/man 413MANDIR?= /usr/share/man
414MANGRP?= wheel 414MANGRP?= wheel
415MANOWN?= root 415MANOWN?= root
416MANMODE?= ${NONBINMODE} 416MANMODE?= ${NONBINMODE}
417MANINSTALL?= catinstall htmlinstall maninstall 417MANINSTALL?= catinstall htmlinstall maninstall
418 418
419INFODIR?= /usr/share/info 419INFODIR?= /usr/share/info
420INFOGRP?= wheel 420INFOGRP?= wheel
421INFOOWN?= root 421INFOOWN?= root
422INFOMODE?= ${NONBINMODE} 422INFOMODE?= ${NONBINMODE}
423 423
424LIBDIR?= /usr/lib 424LIBDIR?= /usr/lib
425 425
426LINTLIBDIR?= /usr/libdata/lint 426LINTLIBDIR?= /usr/libdata/lint
427LIBGRP?= ${BINGRP} 427LIBGRP?= ${BINGRP}
428LIBOWN?= ${BINOWN} 428LIBOWN?= ${BINOWN}
429LIBMODE?= ${NONBINMODE} 429LIBMODE?= ${NONBINMODE}
430 430
431DOCDIR?= /usr/share/doc 431DOCDIR?= /usr/share/doc
432HTMLDOCDIR?= /usr/share/doc/html 432HTMLDOCDIR?= /usr/share/doc/html
433DOCGRP?= wheel 433DOCGRP?= wheel
434DOCOWN?= root 434DOCOWN?= root
435DOCMODE?= ${NONBINMODE} 435DOCMODE?= ${NONBINMODE}
436 436
437NLSDIR?= /usr/share/nls 437NLSDIR?= /usr/share/nls
438NLSGRP?= wheel 438NLSGRP?= wheel
439NLSOWN?= root 439NLSOWN?= root
440NLSMODE?= ${NONBINMODE} 440NLSMODE?= ${NONBINMODE}
441 441
442KMODULEGRP?= wheel 442KMODULEGRP?= wheel
443KMODULEOWN?= root 443KMODULEOWN?= root
444KMODULEMODE?= ${NONBINMODE} 444KMODULEMODE?= ${NONBINMODE}
445 445
446LOCALEDIR?= /usr/share/locale 446LOCALEDIR?= /usr/share/locale
447LOCALEGRP?= wheel 447LOCALEGRP?= wheel
448LOCALEOWN?= root 448LOCALEOWN?= root
449LOCALEMODE?= ${NONBINMODE} 449LOCALEMODE?= ${NONBINMODE}
450 450
451FIRMWAREDIR?= /libdata/firmware 451FIRMWAREDIR?= /libdata/firmware
452FIRMWAREGRP?= wheel 452FIRMWAREGRP?= wheel
453FIRMWAREOWN?= root 453FIRMWAREOWN?= root
454FIRMWAREMODE?= ${NONBINMODE} 454FIRMWAREMODE?= ${NONBINMODE}
455 455
456DEBUGDIR?= /usr/libdata/debug 456DEBUGDIR?= /usr/libdata/debug
457DEBUGGRP?= wheel 457DEBUGGRP?= wheel
458DEBUGOWN?= root 458DEBUGOWN?= root
459DEBUGMODE?= ${NONBINMODE} 459DEBUGMODE?= ${NONBINMODE}
460 460
461# 461#
462# Data-driven table using make variables to control how 462# Data-driven table using make variables to control how
463# toolchain-dependent targets and shared libraries are built 463# toolchain-dependent targets and shared libraries are built
464# for different platforms and object formats. 464# for different platforms and object formats.
465# 465#
466# OBJECT_FMT: currently either "ELF" or "a.out". 466# OBJECT_FMT: currently either "ELF" or "a.out".
467# 467#
468# All platforms are ELF. 468# All platforms are ELF.
469# 469#
470OBJECT_FMT= ELF 470OBJECT_FMT= ELF
471 471
472# 472#
473# If this platform's toolchain is missing, we obviously cannot build it. 473# If this platform's toolchain is missing, we obviously cannot build it.
474# 474#
475.if ${TOOLCHAIN_MISSING} != "no" 475.if ${TOOLCHAIN_MISSING} != "no"
476MKBFD:= no 476MKBFD:= no
477MKGDB:= no 477MKGDB:= no
478MKGCC:= no 478MKGCC:= no
479.endif 479.endif
480 480
481# 481#
482# If we are using an external toolchain, we can still build the target's 482# If we are using an external toolchain, we can still build the target's
483# BFD stuff, but we cannot build GCC's support libraries, since those are 483# BFD stuff, but we cannot build GCC's support libraries, since those are
484# tightly-coupled to the version of GCC being used. 484# tightly-coupled to the version of GCC being used.
485# 485#
486.if defined(EXTERNAL_TOOLCHAIN) 486.if defined(EXTERNAL_TOOLCHAIN)
487MKGCC:= no 487MKGCC:= no
488.endif 488.endif
489 489
490# 490#
491# The m68000 port is incomplete. 491# The m68000 port is incomplete.
492# 492#
493.if ${MACHINE_ARCH} == "m68000" 493.if ${MACHINE_ARCH} == "m68000"
494NOPIC= # defined 494NOPIC= # defined
495MKISCSI= no 495MKISCSI= no
496# XXX GCC 4 outputs mcount() calling sequences that try to load values 496# XXX GCC 4 outputs mcount() calling sequences that try to load values
497# from over 64KB away and this fails to assemble. 497# from over 64KB away and this fails to assemble.
498.if defined(HAVE_GCC) && (${HAVE_GCC} == 4) 498.if defined(HAVE_GCC) && (${HAVE_GCC} == 4)
499NOPROFILE= # defined 499NOPROFILE= # defined
500.endif 500.endif
501.endif 501.endif
502 502
503# 503#
504# The ia64 port is incomplete. 504# The ia64 port is incomplete.
505# 505#
506.if ${MACHINE_ARCH} == "ia64" 506.if ${MACHINE_ARCH} == "ia64"
507MKLINT= no 507MKLINT= no
508MKGDB= no 508MKGDB= no
509.endif 509.endif
510 510
511# 511#
512# On the MIPS, all libs are compiled with ABIcalls (and are thus PIC), 512# On the MIPS, all libs are compiled with ABIcalls (and are thus PIC),
513# not just shared libraries, so don't build the _pic version. 513# not just shared libraries, so don't build the _pic version.
514# 514#
515.if ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb" 515.if ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb"
516MKPICLIB:= no 516MKPICLIB:= no
517.endif 517.endif
518 518
519# 519#
520# On VAX using ELF, all objects are PIC, not just shared libraries, 520# On VAX using ELF, all objects are PIC, not just shared libraries,
521# so don't build the _pic version. Unless we are using GCC3 which 521# so don't build the _pic version. Unless we are using GCC3 which
522# doesn't support PIC yet. 522# doesn't support PIC yet.
523# 523#
524.if ${MACHINE_ARCH} == "vax" 524.if ${MACHINE_ARCH} == "vax"
525MKPICLIB= no 525MKPICLIB= no
526.endif 526.endif
527 527
528# 528#
529# Location of the file that contains the major and minor numbers of the 529# Location of the file that contains the major and minor numbers of the
530# version of a shared library. If this file exists a shared library 530# version of a shared library. If this file exists a shared library
531# will be built by <bsd.lib.mk>. 531# will be built by <bsd.lib.mk>.
532# 532#
533SHLIB_VERSION_FILE?= ${.CURDIR}/shlib_version 533SHLIB_VERSION_FILE?= ${.CURDIR}/shlib_version
534 534
535# 535#
536# GNU sources and packages sometimes see architecture names differently. 536# GNU sources and packages sometimes see architecture names differently.
537# 537#
538GNU_ARCH.coldfire=m68k 538GNU_ARCH.coldfire=m68k
539GNU_ARCH.i386=i486 539GNU_ARCH.i386=i486
540GCC_CONFIG_ARCH.i386=i486 540GCC_CONFIG_ARCH.i386=i486
 541GCC_CONFIG_TUNE.i386=nocona
 542GCC_CONFIG_TUNE.x86_64=nocona
541GNU_ARCH.m68000=m68010 543GNU_ARCH.m68000=m68010
542GNU_ARCH.sh3eb=sh 544GNU_ARCH.sh3eb=sh
543GNU_ARCH.sh3el=shle 545GNU_ARCH.sh3el=shle
544GNU_ARCH.mips64eb=mips64 546GNU_ARCH.mips64eb=mips64
545MACHINE_GNU_ARCH=${GNU_ARCH.${MACHINE_ARCH}:U${MACHINE_ARCH}} 547MACHINE_GNU_ARCH=${GNU_ARCH.${MACHINE_ARCH}:U${MACHINE_ARCH}}
546 548
547# 549#
548# In order to identify NetBSD to GNU packages, we sometimes need 550# In order to identify NetBSD to GNU packages, we sometimes need
549# an "elf" tag for historically a.out platforms. 551# an "elf" tag for historically a.out platforms.
550# 552#
551.if ${OBJECT_FMT} == "ELF" && \ 553.if ${OBJECT_FMT} == "ELF" && \
552 (${MACHINE_GNU_ARCH} == "arm" || \ 554 (${MACHINE_GNU_ARCH} == "arm" || \
553 ${MACHINE_GNU_ARCH} == "armeb" || \ 555 ${MACHINE_GNU_ARCH} == "armeb" || \
554 ${MACHINE_ARCH} == "i386" || \ 556 ${MACHINE_ARCH} == "i386" || \
555 ${MACHINE_CPU} == "m68k" || \ 557 ${MACHINE_CPU} == "m68k" || \
556 ${MACHINE_GNU_ARCH} == "sh" || \ 558 ${MACHINE_GNU_ARCH} == "sh" || \
557 ${MACHINE_GNU_ARCH} == "shle" || \ 559 ${MACHINE_GNU_ARCH} == "shle" || \
558 ${MACHINE_ARCH} == "sparc" || \ 560 ${MACHINE_ARCH} == "sparc" || \
559 ${MACHINE_ARCH} == "vax") 561 ${MACHINE_ARCH} == "vax")
560MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsdelf 562MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsdelf
561.else 563.else
562MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsd 564MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsd
563.endif 565.endif
564 566
565# 567#
566# Determine if arch uses native kernel modules with rump 568# Determine if arch uses native kernel modules with rump
567# 569#
568.if ${MACHINE_ARCH} == "i386" || \ 570.if ${MACHINE_ARCH} == "i386" || \
569 ${MACHINE_ARCH} == "x86_64" 571 ${MACHINE_ARCH} == "x86_64"
570RUMPKMOD= # defined 572RUMPKMOD= # defined
571.endif 573.endif
572 574
573TARGETS+= all clean cleandir depend dependall includes \ 575TARGETS+= all clean cleandir depend dependall includes \
574 install lint obj regress tags html 576 install lint obj regress tags html
575PHONY_NOTMAIN = all clean cleandir depend dependall distclean includes \ 577PHONY_NOTMAIN = all clean cleandir depend dependall distclean includes \
576 install lint obj regress tags beforedepend afterdepend \ 578 install lint obj regress tags beforedepend afterdepend \
577 beforeinstall afterinstall realinstall realdepend realall \ 579 beforeinstall afterinstall realinstall realdepend realall \
578 html subdir-all subdir-install subdir-depend 580 html subdir-all subdir-install subdir-depend
579.PHONY: ${PHONY_NOTMAIN} 581.PHONY: ${PHONY_NOTMAIN}
580.NOTMAIN: ${PHONY_NOTMAIN} 582.NOTMAIN: ${PHONY_NOTMAIN}
581 583
582.if ${NEED_OWN_INSTALL_TARGET} != "no" 584.if ${NEED_OWN_INSTALL_TARGET} != "no"
583.if !target(install) 585.if !target(install)
584install: beforeinstall .WAIT subdir-install realinstall .WAIT afterinstall 586install: beforeinstall .WAIT subdir-install realinstall .WAIT afterinstall
585beforeinstall: 587beforeinstall:
586subdir-install: 588subdir-install:
587realinstall: 589realinstall:
588afterinstall: 590afterinstall:
589.endif 591.endif
590all: realall subdir-all 592all: realall subdir-all
591subdir-all: 593subdir-all:
592realall: 594realall:
593depend: realdepend subdir-depend 595depend: realdepend subdir-depend
594subdir-depend: 596subdir-depend:
595realdepend: 597realdepend:
596distclean: cleandir 598distclean: cleandir
597cleandir: clean 599cleandir: clean
598 600
599dependall: .NOTMAIN realdepend .MAKE 601dependall: .NOTMAIN realdepend .MAKE
600 @cd ${.CURDIR}; ${MAKE} realall 602 @cd ${.CURDIR}; ${MAKE} realall
601.endif 603.endif
602 604
603# 605#
604# Define MKxxx variables (which are either yes or no) for users 606# Define MKxxx variables (which are either yes or no) for users
605# to set in /etc/mk.conf and override in the make environment. 607# to set in /etc/mk.conf and override in the make environment.
606# These should be tested with `== "no"' or `!= "no"'. 608# These should be tested with `== "no"' or `!= "no"'.
607# The NOxxx variables should only be set by Makefiles. 609# The NOxxx variables should only be set by Makefiles.
608# 610#
609# Please keep etc/Makefile and share/man/man5/mk.conf.5 in sync 611# Please keep etc/Makefile and share/man/man5/mk.conf.5 in sync
610# with changes to the MK* variables here. 612# with changes to the MK* variables here.
611# 613#
612 614
613# 615#
614# Supported NO* options (if defined, MK* will be forced to "no", 616# Supported NO* options (if defined, MK* will be forced to "no",
615# regardless of user's mk.conf setting). 617# regardless of user's mk.conf setting).
616# 618#
617# Source makefiles should set NO*, and not MK*, and must do so before 619# Source makefiles should set NO*, and not MK*, and must do so before
618# including bsd.own.mk. 620# including bsd.own.mk.
619# 621#
620.for var in \ 622.for var in \
621 NOCRYPTO NODOC NOHTML NOINFO NOLINKLIB NOLINT NOMAN NONLS NOOBJ NOPIC \ 623 NOCRYPTO NODOC NOHTML NOINFO NOLINKLIB NOLINT NOMAN NONLS NOOBJ NOPIC \
622 NOPICINSTALL NOPROFILE NOSHARE NOSTATICLIB 624 NOPICINSTALL NOPROFILE NOSHARE NOSTATICLIB
623.if defined(${var}) 625.if defined(${var})
624MK${var:S/^NO//}:= no 626MK${var:S/^NO//}:= no
625.endif 627.endif
626.endfor 628.endfor
627 629
628# 630#
629# Older-style variables that enabled behaviour when set. 631# Older-style variables that enabled behaviour when set.
630# 632#
631.for var in MANZ UNPRIVED UPDATE 633.for var in MANZ UNPRIVED UPDATE
632.if defined(${var}) 634.if defined(${var})
633MK${var}:= yes 635MK${var}:= yes
634.endif 636.endif
635.endfor 637.endfor
636 638
637# 639#
638# MK* options which have variable defaults. 640# MK* options which have variable defaults.
639# 641#
640.if ${MACHINE} == "amd64" || ${MACHINE} == "sparc64" 642.if ${MACHINE} == "amd64" || ${MACHINE} == "sparc64"
641MKCOMPAT?= yes 643MKCOMPAT?= yes
642.else 644.else
643# Don't let this build where it really isn't supported. 645# Don't let this build where it really isn't supported.
644MKCOMPAT:= no 646MKCOMPAT:= no
645.endif 647.endif
646 648
647# 649#
648# MK* options which default to "yes". 650# MK* options which default to "yes".
649# 651#
650.for var in \ 652.for var in \
651 MKATF \ 653 MKATF \
652 MKBFD MKBINUTILS \ 654 MKBFD MKBINUTILS \
653 MKCATPAGES MKCRYPTO MKCOMPLEX MKCVS \ 655 MKCATPAGES MKCRYPTO MKCOMPLEX MKCVS \
654 MKDOC \ 656 MKDOC \
655 MKGCC MKGCCCMDS MKGDB \ 657 MKGCC MKGCCCMDS MKGDB \
656 MKHESIOD MKHTML \ 658 MKHESIOD MKHTML \
657 MKIEEEFP MKINET6 MKINFO MKIPFILTER MKISCSI \ 659 MKIEEEFP MKINET6 MKINFO MKIPFILTER MKISCSI \
658 MKKERBEROS \ 660 MKKERBEROS \
659 MKLDAP MKLINKLIB MKLINT \ 661 MKLDAP MKLINKLIB MKLINT \
660 MKMAN \ 662 MKMAN \
661 MKNLS \ 663 MKNLS \
662 MKOBJ \ 664 MKOBJ \
663 MKPAM \ 665 MKPAM \
664 MKPF MKPIC MKPICINSTALL MKPICLIB MKPOSTFIX MKPROFILE \ 666 MKPF MKPIC MKPICINSTALL MKPICLIB MKPOSTFIX MKPROFILE \
665 MKSHARE MKSKEY MKSTATICLIB \ 667 MKSHARE MKSKEY MKSTATICLIB \
666 MKYP 668 MKYP
667${var}?= yes 669${var}?= yes
668.endfor 670.endfor
669 671
670# 672#
671# MK* options which default to "no". 673# MK* options which default to "no".
672# 674#
673.for var in \ 675.for var in \
674 MKCRYPTO_IDEA MKCRYPTO_MDC2 MKCRYPTO_RC5 MKDEBUG MKDEBUGLIB \ 676 MKCRYPTO_IDEA MKCRYPTO_MDC2 MKCRYPTO_RC5 MKDEBUG MKDEBUGLIB \
675 MKLVM \ 677 MKLVM \
676 MKMANZ MKOBJDIRS \ 678 MKMANZ MKOBJDIRS \
677 MKPCC MKPCCCMDS \ 679 MKPCC MKPCCCMDS \
678 MKSOFTFLOAT MKSTRIPIDENT \ 680 MKSOFTFLOAT MKSTRIPIDENT \
679 MKUNPRIVED MKUPDATE MKX11  681 MKUNPRIVED MKUPDATE MKX11
680${var}?=no 682${var}?=no
681.endfor 683.endfor
682 684
683# 685#
684# Do we default to XFree86 or Xorg for this platform? 686# Do we default to XFree86 or Xorg for this platform?
685# 687#
686.if ${MACHINE} == "alpha" || ${MACHINE} == "acorn32" || \ 688.if ${MACHINE} == "alpha" || ${MACHINE} == "acorn32" || \
687 ${MACHINE} == "amiga" || ${MACHINE} == "cats" || \ 689 ${MACHINE} == "amiga" || ${MACHINE} == "cats" || \
688 ${MACHINE} == "dreamcast" || ${MACHINE} == "ews4800mips" || \ 690 ${MACHINE} == "dreamcast" || ${MACHINE} == "ews4800mips" || \
689 ${MACHINE} == "hpcarm" || ${MACHINE} == "hpcmips" || \ 691 ${MACHINE} == "hpcarm" || ${MACHINE} == "hpcmips" || \
690 ${MACHINE} == "hpcsh" || ${MACHINE} == "mac68k" || \ 692 ${MACHINE} == "hpcsh" || ${MACHINE} == "mac68k" || \
691 ${MACHINE} == "netwinder" || ${MACHINE} == "newsmips" || \ 693 ${MACHINE} == "netwinder" || ${MACHINE} == "newsmips" || \
692 ${MACHINE} == "ofppc" || ${MACHINE} == "pmax" || \ 694 ${MACHINE} == "ofppc" || ${MACHINE} == "pmax" || \
693 ${MACHINE} == "sparc" || ${MACHINE} == "sun3" || ${MACHINE} == "x68k" 695 ${MACHINE} == "sparc" || ${MACHINE} == "sun3" || ${MACHINE} == "x68k"
694X11FLAVOUR?= XFree86 696X11FLAVOUR?= XFree86
695.else 697.else
696X11FLAVOUR?= Xorg 698X11FLAVOUR?= Xorg
697.endif 699.endif
698 700
699# 701#
700# Force some options off if their dependencies are off. 702# Force some options off if their dependencies are off.
701# 703#
702 704
703.if ${MKCRYPTO} == "no" 705.if ${MKCRYPTO} == "no"
704MKKERBEROS:= no 706MKKERBEROS:= no
705.endif 707.endif
706 708
707.if ${MKMAN} == "no" 709.if ${MKMAN} == "no"
708MKCATPAGES:= no 710MKCATPAGES:= no
709MKHTML:= no 711MKHTML:= no
710.endif 712.endif
711 713
712.if ${MKLINKLIB} == "no" 714.if ${MKLINKLIB} == "no"
713MKLINT:= no 715MKLINT:= no
714MKPICINSTALL:= no 716MKPICINSTALL:= no
715MKPROFILE:= no 717MKPROFILE:= no
716.endif 718.endif
717 719
718.if ${MKPIC} == "no" 720.if ${MKPIC} == "no"
719MKPICLIB:= no 721MKPICLIB:= no
720.endif 722.endif
721 723
722.if ${MKOBJ} == "no" 724.if ${MKOBJ} == "no"
723MKOBJDIRS:= no 725MKOBJDIRS:= no
724.endif 726.endif
725 727
726.if ${MKSHARE} == "no" 728.if ${MKSHARE} == "no"
727MKCATPAGES:= no 729MKCATPAGES:= no
728MKDOC:= no 730MKDOC:= no
729MKINFO:= no 731MKINFO:= no
730MKHTML:= no 732MKHTML:= no
731MKMAN:= no 733MKMAN:= no
732MKNLS:= no 734MKNLS:= no
733.endif 735.endif
734 736
735# 737#
736# install(1) parameters. 738# install(1) parameters.
737# 739#
738COPY?= -c 740COPY?= -c
739.if ${MKUPDATE} == "no" 741.if ${MKUPDATE} == "no"
740PRESERVE?=  742PRESERVE?=
741.else 743.else
742PRESERVE?= -p 744PRESERVE?= -p
743.endif 745.endif
744RENAME?= -r 746RENAME?= -r
745HRDLINK?= -l h 747HRDLINK?= -l h
746SYMLINK?= -l s 748SYMLINK?= -l s
747 749
748METALOG?= ${DESTDIR}/METALOG 750METALOG?= ${DESTDIR}/METALOG
749METALOG.add?= ${TOOL_CAT} -l >> ${METALOG} 751METALOG.add?= ${TOOL_CAT} -l >> ${METALOG}
750.if (${_SRC_TOP_} != "") # only set INSTPRIV if inside ${NETBSDSRCDIR} 752.if (${_SRC_TOP_} != "") # only set INSTPRIV if inside ${NETBSDSRCDIR}
751.if ${MKUNPRIVED} != "no" 753.if ${MKUNPRIVED} != "no"
752INSTPRIV.unpriv=-U -M ${METALOG} -D ${DESTDIR} -h sha256 754INSTPRIV.unpriv=-U -M ${METALOG} -D ${DESTDIR} -h sha256
753.else 755.else
754INSTPRIV.unpriv= 756INSTPRIV.unpriv=
755.endif 757.endif
756INSTPRIV?= ${INSTPRIV.unpriv} -N ${NETBSDSRCDIR}/etc 758INSTPRIV?= ${INSTPRIV.unpriv} -N ${NETBSDSRCDIR}/etc
757.endif 759.endif
758STRIPFLAG?=  760STRIPFLAG?=
759 761
760.if ${NEED_OWN_INSTALL_TARGET} != "no" 762.if ${NEED_OWN_INSTALL_TARGET} != "no"
761INSTALL_DIR?= ${INSTALL} ${INSTPRIV} -d 763INSTALL_DIR?= ${INSTALL} ${INSTPRIV} -d
762INSTALL_FILE?= ${INSTALL} ${INSTPRIV} ${COPY} ${PRESERVE} ${RENAME} 764INSTALL_FILE?= ${INSTALL} ${INSTPRIV} ${COPY} ${PRESERVE} ${RENAME}
763INSTALL_LINK?= ${INSTALL} ${INSTPRIV} ${HRDLINK} ${RENAME} 765INSTALL_LINK?= ${INSTALL} ${INSTPRIV} ${HRDLINK} ${RENAME}
764INSTALL_SYMLINK?= ${INSTALL} ${INSTPRIV} ${SYMLINK} ${RENAME} 766INSTALL_SYMLINK?= ${INSTALL} ${INSTPRIV} ${SYMLINK} ${RENAME}
765HOST_INSTALL_FILE?= ${INSTALL} ${COPY} ${PRESERVE} ${RENAME} 767HOST_INSTALL_FILE?= ${INSTALL} ${COPY} ${PRESERVE} ${RENAME}
766HOST_INSTALL_DIR?= ${INSTALL} -d 768HOST_INSTALL_DIR?= ${INSTALL} -d
767HOST_INSTALL_SYMLINK?= ${INSTALL} ${SYMLINK} ${RENAME} 769HOST_INSTALL_SYMLINK?= ${INSTALL} ${SYMLINK} ${RENAME}
768.endif 770.endif
769 771
770# 772#
771# Set defaults for the USE_xxx variables. 773# Set defaults for the USE_xxx variables.
772# 774#
773 775
774# 776#
775# USE_* options which default to "no" and will be forced to "no" if their 777# USE_* options which default to "no" and will be forced to "no" if their
776# corresponding MK* variable is set to "no". 778# corresponding MK* variable is set to "no".
777# 779#
778.for var in USE_SKEY 780.for var in USE_SKEY
779.if (${${var:S/USE_/MK/}} == "no") 781.if (${${var:S/USE_/MK/}} == "no")
780${var}:= no 782${var}:= no
781.else 783.else
782${var}?= no 784${var}?= no
783.endif 785.endif
784.endfor 786.endfor
785 787
786# 788#
787# USE_* options which default to "yes" unless their corresponding MK* 789# USE_* options which default to "yes" unless their corresponding MK*
788# variable is set to "no". 790# variable is set to "no".
789# 791#
790.for var in USE_HESIOD USE_INET6 USE_KERBEROS USE_LDAP USE_PAM USE_YP 792.for var in USE_HESIOD USE_INET6 USE_KERBEROS USE_LDAP USE_PAM USE_YP
791.if (${${var:S/USE_/MK/}} == "no") 793.if (${${var:S/USE_/MK/}} == "no")
792${var}:= no 794${var}:= no
793.else 795.else
794${var}?= yes 796${var}?= yes
795.endif 797.endif
796.endfor 798.endfor
797 799
798# 800#
799# USE_* options which default to "yes". 801# USE_* options which default to "yes".
800# 802#
801.for var in USE_JEMALLOC 803.for var in USE_JEMALLOC
802${var}?= yes 804${var}?= yes
803.endfor 805.endfor
804 806
805# 807#
806# USE_* options which default to "no". 808# USE_* options which default to "no".
807# 809#
808#.for var in 810#.for var in
809#${var}?= no 811#${var}?= no
810#.endfor 812#.endfor
811 813
812# 814#
813# Where X11 sources are and where it is installed to. 815# Where X11 sources are and where it is installed to.
814# 816#
815X11SRCDIR?= /usr/xsrc 817X11SRCDIR?= /usr/xsrc
816X11SRCDIR.xc?= ${X11SRCDIR}/xfree/xc 818X11SRCDIR.xc?= ${X11SRCDIR}/xfree/xc
817X11SRCDIR.local?= ${X11SRCDIR}/local 819X11SRCDIR.local?= ${X11SRCDIR}/local
818.if ${X11FLAVOUR} == "Xorg" 820.if ${X11FLAVOUR} == "Xorg"
819X11ROOTDIR?= /usr/X11R7 821X11ROOTDIR?= /usr/X11R7
820.else 822.else
821X11ROOTDIR?= /usr/X11R6 823X11ROOTDIR?= /usr/X11R6
822.endif 824.endif
823X11BINDIR?= ${X11ROOTDIR}/bin 825X11BINDIR?= ${X11ROOTDIR}/bin
824X11ETCDIR?= /etc/X11 826X11ETCDIR?= /etc/X11
825X11FONTDIR?= ${X11ROOTDIR}/lib/X11/fonts 827X11FONTDIR?= ${X11ROOTDIR}/lib/X11/fonts
826X11INCDIR?= ${X11ROOTDIR}/include 828X11INCDIR?= ${X11ROOTDIR}/include
827X11LIBDIR?= ${X11ROOTDIR}/lib/X11 829X11LIBDIR?= ${X11ROOTDIR}/lib/X11
828X11MANDIR?= ${X11ROOTDIR}/man 830X11MANDIR?= ${X11ROOTDIR}/man
829X11USRLIBDIR?= ${X11ROOTDIR}/lib 831X11USRLIBDIR?= ${X11ROOTDIR}/lib
830 832
831# 833#
832# New modular-xorg based builds 834# New modular-xorg based builds
833# 835#
834X11SRCDIRMIT?= ${X11SRCDIR}/external/mit 836X11SRCDIRMIT?= ${X11SRCDIR}/external/mit
835.for _lib in \ 837.for _lib in \
836 FS ICE SM X11 XScrnSaver XTrap Xau Xcomposite Xcursor Xdamage \ 838 FS ICE SM X11 XScrnSaver XTrap Xau Xcomposite Xcursor Xdamage \
837 Xdmcp Xevie Xext Xfixes Xfont Xft Xi Xinerama Xmu Xp Xpm XprintUtil \ 839 Xdmcp Xevie Xext Xfixes Xfont Xft Xi Xinerama Xmu Xp Xpm XprintUtil \
838 Xrandr Xrender Xres Xt Xtst Xv XvMC Xxf86dga Xxf86misc Xxf86vm drm \ 840 Xrandr Xrender Xres Xt Xtst Xv XvMC Xxf86dga Xxf86misc Xxf86vm drm \
839 fontenc xkbfile xkbui Xaw lbxutil Xfontcache XprintAppUtil 841 fontenc xkbfile xkbui Xaw lbxutil Xfontcache XprintAppUtil
840X11SRCDIR.${_lib}?= ${X11SRCDIRMIT}/lib${_lib}/dist 842X11SRCDIR.${_lib}?= ${X11SRCDIRMIT}/lib${_lib}/dist
841.endfor 843.endfor
842 844
843.for _proto in \ 845.for _proto in \
844 xcmisc xext xf86bigfont bigreqs input kb x fonts fixes scrnsaver \ 846 xcmisc xext xf86bigfont bigreqs input kb x fonts fixes scrnsaver \
845 xinerama print render resource record video xf86dga xf86misc \ 847 xinerama print render resource record video xf86dga xf86misc \
846 xf86vidmode composite damage trap gl randr fontcache xf86dri 848 xf86vidmode composite damage trap gl randr fontcache xf86dri
847X11SRCDIR.${_proto}proto?= ${X11SRCDIRMIT}/${_proto}proto/dist 849X11SRCDIR.${_proto}proto?= ${X11SRCDIRMIT}/${_proto}proto/dist
848.endfor 850.endfor
849 851
850.for _dir in \ 852.for _dir in \
851 xtrans fontconfig expat freetype evieext mkfontscale bdftopcf \ 853 xtrans fontconfig expat freetype evieext mkfontscale bdftopcf \
852 xkbcomp xorg-cf-files imake xorg-server xbiff xkbdata \ 854 xkbcomp xorg-cf-files imake xorg-server xbiff xkbdata \
853 xbitmaps appres xeyes xev xedit sessreg pixman \ 855 xbitmaps appres xeyes xev xedit sessreg pixman \
854 beforelight bitmap editres makedepend fonttosfnt fslsfonts \ 856 beforelight bitmap editres makedepend fonttosfnt fslsfonts \
855 fstobdf MesaDemos MesaGLUT MesaLib ico iceauth lbxproxy listres lndir \ 857 fstobdf MesaDemos MesaGLUT MesaLib ico iceauth lbxproxy listres lndir \
856 luit xproxymanagementprotocol mkfontdir oclock proxymngr rgb \ 858 luit xproxymanagementprotocol mkfontdir oclock proxymngr rgb \
857 setxkbmap smproxy twm viewres x11perf xauth xcalc xclipboard \ 859 setxkbmap smproxy twm viewres x11perf xauth xcalc xclipboard \
858 xclock xcmsdb xconsole xcutsel xditview xdpyinfo xdriinfo xdm \ 860 xclock xcmsdb xconsole xcutsel xditview xdpyinfo xdriinfo xdm \
859 xfd xf86dga xfindproxy xfontsel xfwp xgamma xgc xhost xinit \ 861 xfd xf86dga xfindproxy xfontsel xfwp xgamma xgc xhost xinit \
860 xkill xload xlogo xlsatoms xlsclients xlsfonts xmag xmessage \ 862 xkill xload xlogo xlsatoms xlsclients xlsfonts xmag xmessage \
861 xmh xmodmap xmore xman xprop xrandr xrdb xrefresh xset \ 863 xmh xmodmap xmore xman xprop xrandr xrdb xrefresh xset \
862 xsetmode xsetpointer xsetroot xsm xstdcmap xvidtune xvinfo \ 864 xsetmode xsetpointer xsetroot xsm xstdcmap xvidtune xvinfo \
863 xwininfo xwud xprehashprinterlist xplsprinters xkbprint xkbevd \ 865 xwininfo xwud xprehashprinterlist xplsprinters xkbprint xkbevd \
864 xterm xwd xfs xfsinfo xphelloworld xtrap xkbutils xkbcomp \ 866 xterm xwd xfs xfsinfo xphelloworld xtrap xkbutils xkbcomp \
865 xkeyboard-config xinput \ 867 xkeyboard-config xinput \
866 font-adobe-100dpi font-adobe-75dpi font-adobe-utopia-100dpi \ 868 font-adobe-100dpi font-adobe-75dpi font-adobe-utopia-100dpi \
867 font-adobe-utopia-75dpi font-adobe-utopia-type1 \ 869 font-adobe-utopia-75dpi font-adobe-utopia-type1 \
868 font-alias \ 870 font-alias \
869 font-bh-100dpi font-bh-75dpi font-bh-lucidatypewriter-100dpi \ 871 font-bh-100dpi font-bh-75dpi font-bh-lucidatypewriter-100dpi \
870 font-bh-lucidatypewriter-75dpi font-bh-ttf font-bh-type1 \ 872 font-bh-lucidatypewriter-75dpi font-bh-ttf font-bh-type1 \
871 font-bitstream-100dpi font-bitstream-75dpi font-bitstream-type1 \ 873 font-bitstream-100dpi font-bitstream-75dpi font-bitstream-type1 \
872 font-cursor-misc font-daewoo-misc font-dec-misc font-ibm-type1 \ 874 font-cursor-misc font-daewoo-misc font-dec-misc font-ibm-type1 \
873 font-isas-misc font-jis-misc font-misc-misc font-mutt-misc \ 875 font-isas-misc font-jis-misc font-misc-misc font-mutt-misc \
874 font-sony-misc font-util ttf-bitstream-vera encodings 876 font-sony-misc font-util ttf-bitstream-vera encodings
875X11SRCDIR.${_dir}?= ${X11SRCDIRMIT}/${_dir}/dist 877X11SRCDIR.${_dir}?= ${X11SRCDIRMIT}/${_dir}/dist
876.endfor 878.endfor
877 879
878.for _i in \ 880.for _i in \
879 keyboard mouse vmmouse void 881 keyboard mouse vmmouse void
880X11SRCDIR.xf86-input-${_i}?= ${X11SRCDIRMIT}/xf86-input-${_i}/dist 882X11SRCDIR.xf86-input-${_i}?= ${X11SRCDIRMIT}/xf86-input-${_i}/dist
881.endfor 883.endfor
882 884
883.for _v in \ 885.for _v in \
884 ag10e apm ark ast ati chips cirrus crime cyrix glint i128 i740 imstt \ 886 ag10e apm ark ast ati chips cirrus crime cyrix glint i128 i740 imstt \
885 intel mach64 mga neomagic newport nsc nv nvxbox pnozz r128 radeonhd \ 887 intel mach64 mga neomagic newport nsc nv nvxbox pnozz r128 radeonhd \
886 rendition s3 s3virge savage siliconmotion sis sunffb suncg6 tdfx tga \ 888 rendition s3 s3virge savage siliconmotion sis sunffb suncg6 tdfx tga \
887 trident tseng vesa vga via vmware wsfb 889 trident tseng vesa vga via vmware wsfb
888  890
889X11SRCDIR.xf86-video-${_v}?= ${X11SRCDIRMIT}/xf86-video-${_v}/dist 891X11SRCDIR.xf86-video-${_v}?= ${X11SRCDIRMIT}/xf86-video-${_v}/dist
890.endfor 892.endfor
891 893
892.if ${X11FLAVOUR} == "Xorg" 894.if ${X11FLAVOUR} == "Xorg"
893X11DRI?= yes 895X11DRI?= yes
894.endif 896.endif
895 897
896X11DRI?= no 898X11DRI?= no
897X11LOADABLE?= yes 899X11LOADABLE?= yes
898 900
899 901
900# 902#
901# MAKEDIRTARGET dir target [extra make(1) params] 903# MAKEDIRTARGET dir target [extra make(1) params]
902# run "cd $${dir} && ${MAKE} [params] $${target}", with a pretty message 904# run "cd $${dir} && ${MAKE} [params] $${target}", with a pretty message
903# 905#
904MAKEDIRTARGET=\ 906MAKEDIRTARGET=\
905 @_makedirtarget() { \ 907 @_makedirtarget() { \
906 dir="$$1"; shift; \ 908 dir="$$1"; shift; \
907 target="$$1"; shift; \ 909 target="$$1"; shift; \
908 case "$${dir}" in \ 910 case "$${dir}" in \
909 /*) this="$${dir}/"; \ 911 /*) this="$${dir}/"; \
910 real="$${dir}" ;; \ 912 real="$${dir}" ;; \
911 .) this="${_THISDIR_}"; \ 913 .) this="${_THISDIR_}"; \
912 real="${.CURDIR}" ;; \ 914 real="${.CURDIR}" ;; \
913 *) this="${_THISDIR_}$${dir}/"; \ 915 *) this="${_THISDIR_}$${dir}/"; \
914 real="${.CURDIR}/$${dir}" ;; \ 916 real="${.CURDIR}/$${dir}" ;; \
915 esac; \ 917 esac; \
916 show=$${this:-.}; \ 918 show=$${this:-.}; \
917 echo "$${target} ===> $${show%/}$${1:+ (with: $$@)}"; \ 919 echo "$${target} ===> $${show%/}$${1:+ (with: $$@)}"; \
918 cd "$${real}" \ 920 cd "$${real}" \
919 && ${MAKE} _THISDIR_="$${this}" "$$@" $${target}; \ 921 && ${MAKE} _THISDIR_="$${this}" "$$@" $${target}; \
920 }; \ 922 }; \
921 _makedirtarget 923 _makedirtarget
922 924
923# 925#
924# MAKEVERBOSE support. Levels are: 926# MAKEVERBOSE support. Levels are:
925# 0 Minimal output ("quiet") 927# 0 Minimal output ("quiet")
926# 1 Describe what is occurring 928# 1 Describe what is occurring
927# 2 Describe what is occurring and echo the actual command 929# 2 Describe what is occurring and echo the actual command
928# 3 Ignore the effect of the "@" prefix in make commands 930# 3 Ignore the effect of the "@" prefix in make commands
929# 4 Trace shell commands using the shell's -x flag 931# 4 Trace shell commands using the shell's -x flag
930#  932#
931MAKEVERBOSE?= 2 933MAKEVERBOSE?= 2
932 934
933.if ${MAKEVERBOSE} == 0 935.if ${MAKEVERBOSE} == 0
934_MKMSG?= @\# 936_MKMSG?= @\#
935_MKSHMSG?= : echo 937_MKSHMSG?= : echo
936_MKSHECHO?= : echo 938_MKSHECHO?= : echo
937.SILENT: 939.SILENT:
938.elif ${MAKEVERBOSE} == 1 940.elif ${MAKEVERBOSE} == 1
939_MKMSG?= @echo ' ' 941_MKMSG?= @echo ' '
940_MKSHMSG?= echo ' ' 942_MKSHMSG?= echo ' '
941_MKSHECHO?= : echo 943_MKSHECHO?= : echo
942.SILENT: 944.SILENT:
943.else # MAKEVERBOSE >= 2 945.else # MAKEVERBOSE >= 2
944_MKMSG?= @echo '\# ' 946_MKMSG?= @echo '\# '
945_MKSHMSG?= echo '\# ' 947_MKSHMSG?= echo '\# '
946_MKSHECHO?= echo 948_MKSHECHO?= echo
947.SILENT: __makeverbose_dummy_target__ 949.SILENT: __makeverbose_dummy_target__
948.endif # MAKEVERBOSE >= 2 950.endif # MAKEVERBOSE >= 2
949.if ${MAKEVERBOSE} >= 3 951.if ${MAKEVERBOSE} >= 3
950.MAKEFLAGS: -dl 952.MAKEFLAGS: -dl
951.endif # ${MAKEVERBOSE} >= 3 953.endif # ${MAKEVERBOSE} >= 3
952.if ${MAKEVERBOSE} >= 4 954.if ${MAKEVERBOSE} >= 4
953.MAKEFLAGS: -dx 955.MAKEFLAGS: -dx
954.endif # ${MAKEVERBOSE} >= 4 956.endif # ${MAKEVERBOSE} >= 4
955 957
956_MKMSG_BUILD?= ${_MKMSG} " build " 958_MKMSG_BUILD?= ${_MKMSG} " build "
957_MKMSG_CREATE?= ${_MKMSG} " create " 959_MKMSG_CREATE?= ${_MKMSG} " create "
958_MKMSG_COMPILE?= ${_MKMSG} "compile " 960_MKMSG_COMPILE?= ${_MKMSG} "compile "
959_MKMSG_FORMAT?= ${_MKMSG} " format " 961_MKMSG_FORMAT?= ${_MKMSG} " format "
960_MKMSG_INSTALL?= ${_MKMSG} "install " 962_MKMSG_INSTALL?= ${_MKMSG} "install "
961_MKMSG_LINK?= ${_MKMSG} " link " 963_MKMSG_LINK?= ${_MKMSG} " link "
962_MKMSG_LEX?= ${_MKMSG} " lex " 964_MKMSG_LEX?= ${_MKMSG} " lex "
963_MKMSG_REMOVE?= ${_MKMSG} " remove " 965_MKMSG_REMOVE?= ${_MKMSG} " remove "
964_MKMSG_YACC?= ${_MKMSG} " yacc " 966_MKMSG_YACC?= ${_MKMSG} " yacc "
965 967
966_MKSHMSG_CREATE?= ${_MKSHMSG} " create " 968_MKSHMSG_CREATE?= ${_MKSHMSG} " create "
967_MKSHMSG_INSTALL?= ${_MKSHMSG} "install " 969_MKSHMSG_INSTALL?= ${_MKSHMSG} "install "
968 970
969_MKTARGET_BUILD?= ${_MKMSG_BUILD} ${.CURDIR:T}/${.TARGET} 971_MKTARGET_BUILD?= ${_MKMSG_BUILD} ${.CURDIR:T}/${.TARGET}
970_MKTARGET_CREATE?= ${_MKMSG_CREATE} ${.CURDIR:T}/${.TARGET} 972_MKTARGET_CREATE?= ${_MKMSG_CREATE} ${.CURDIR:T}/${.TARGET}
971_MKTARGET_COMPILE?= ${_MKMSG_COMPILE} ${.CURDIR:T}/${.TARGET} 973_MKTARGET_COMPILE?= ${_MKMSG_COMPILE} ${.CURDIR:T}/${.TARGET}
972_MKTARGET_FORMAT?= ${_MKMSG_FORMAT} ${.CURDIR:T}/${.TARGET} 974_MKTARGET_FORMAT?= ${_MKMSG_FORMAT} ${.CURDIR:T}/${.TARGET}
973_MKTARGET_INSTALL?= ${_MKMSG_INSTALL} ${.TARGET} 975_MKTARGET_INSTALL?= ${_MKMSG_INSTALL} ${.TARGET}
974_MKTARGET_LINK?= ${_MKMSG_LINK} ${.CURDIR:T}/${.TARGET} 976_MKTARGET_LINK?= ${_MKMSG_LINK} ${.CURDIR:T}/${.TARGET}
975_MKTARGET_LEX?= ${_MKMSG_LEX} ${.CURDIR:T}/${.TARGET} 977_MKTARGET_LEX?= ${_MKMSG_LEX} ${.CURDIR:T}/${.TARGET}
976_MKTARGET_REMOVE?= ${_MKMSG_REMOVE} ${.TARGET} 978_MKTARGET_REMOVE?= ${_MKMSG_REMOVE} ${.TARGET}
977_MKTARGET_YACC?= ${_MKMSG_YACC} ${.CURDIR:T}/${.TARGET} 979_MKTARGET_YACC?= ${_MKMSG_YACC} ${.CURDIR:T}/${.TARGET}
978 980
979.endif # !defined(_BSD_OWN_MK_) 981.endif # !defined(_BSD_OWN_MK_)

cvs diff -r1.31 -r1.32 src/tools/gcc/Makefile (switch to unified diff)

--- src/tools/gcc/Makefile 2009/03/27 19:19:49 1.31
+++ src/tools/gcc/Makefile 2009/05/04 21:32:31 1.32
@@ -1,136 +1,139 @@ @@ -1,136 +1,139 @@
1# $NetBSD: Makefile,v 1.31 2009/03/27 19:19:49 drochner Exp $ 1# $NetBSD: Makefile,v 1.32 2009/05/04 21:32:31 ad Exp $
2 2
3.include <bsd.own.mk> 3.include <bsd.own.mk>
4 4
5GCC_LANGUAGES=c c++ objc 5GCC_LANGUAGES=c c++ objc
6MODULE= gcc4 6MODULE= gcc4
7MKNATIVE_TARGET= gcc4 7MKNATIVE_TARGET= gcc4
8MKNATIVE_CONFIG_TARGET_LIBS= 8MKNATIVE_CONFIG_TARGET_LIBS=
9BINENV= /usr/bin/env -i 9BINENV= /usr/bin/env -i
10 10
11VAX_CONFIGURE_ARGS= 11VAX_CONFIGURE_ARGS=
12 12
13.if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "sparc64" 13.if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "sparc64"
14MULTILIB_ARGS= --enable-multilib 14MULTILIB_ARGS= --enable-multilib
15.else 15.else
16MULTILIB_ARGS= --disable-multilib 16MULTILIB_ARGS= --disable-multilib
17.endif 17.endif
18 18
19COMMON_CONFIGURE_ARGS= --target=${MACHINE_GNU_PLATFORM} \ 19COMMON_CONFIGURE_ARGS= --target=${MACHINE_GNU_PLATFORM} \
20 --enable-long-long \ 20 --enable-long-long \
21 --enable-threads \ 21 --enable-threads \
22 ${VAX_CONFIGURE_ARGS} \ 22 ${VAX_CONFIGURE_ARGS} \
23 --enable-__cxa_atexit 23 --enable-__cxa_atexit
24.if defined(GCC_CONFIG_ARCH.${MACHINE_ARCH}) 24.if defined(GCC_CONFIG_ARCH.${MACHINE_ARCH})
25COMMON_CONFIGURE_ARGS+= --with-arch=${GCC_CONFIG_ARCH.${MACHINE_ARCH}} 25COMMON_CONFIGURE_ARGS+= --with-arch=${GCC_CONFIG_ARCH.${MACHINE_ARCH}}
26.endif 26.endif
 27.if defined(GCC_CONFIG_TUNE.${MACHINE_ARCH})
 28COMMON_CONFIGURE_ARGS+= --with-tune=${GCC_CONFIG_TUNE.${MACHINE_ARCH}}
 29.endif
27 30
28CONFIGURE_ARGS= ${COMMON_CONFIGURE_ARGS} \ 31CONFIGURE_ARGS= ${COMMON_CONFIGURE_ARGS} \
29 --disable-nls \ 32 --disable-nls \
30 ${MULTILIB_ARGS} \ 33 ${MULTILIB_ARGS} \
31 --program-transform-name="s,^,${MACHINE_GNU_PLATFORM}-," \ 34 --program-transform-name="s,^,${MACHINE_GNU_PLATFORM}-," \
32 --enable-languages="${GCC_LANGUAGES}" 35 --enable-languages="${GCC_LANGUAGES}"
33 36
34MAKE_ARGS= MACHINE= MAKEINFO=${TOOL_MAKEINFO:Q} \ 37MAKE_ARGS= MACHINE= MAKEINFO=${TOOL_MAKEINFO:Q} \
35 LIBGCC= LIBGCC1= LIBGCC1_TEST= LIBGCC2= INSTALL_LIBGCC= \ 38 LIBGCC= LIBGCC1= LIBGCC1_TEST= LIBGCC2= INSTALL_LIBGCC= \
36 EXTRA_PARTS= CPPFLAGS=-DNETBSD_TOOLS \ 39 EXTRA_PARTS= CPPFLAGS=-DNETBSD_TOOLS \
37 AR=${HOST_AR:Q} RANLIB=${HOST_RANLIB:Q} 40 AR=${HOST_AR:Q} RANLIB=${HOST_RANLIB:Q}
38 41
39CONFIGURE_ENV+= gcc_cv_libc_provides_ssp=yes 42CONFIGURE_ENV+= gcc_cv_libc_provides_ssp=yes
40 43
41MKNATIVE_ENV= ${BINENV} ${CONFIGURE_ENV:NC*:NLD*} \ 44MKNATIVE_ENV= ${BINENV} ${CONFIGURE_ENV:NC*:NLD*} \
42 CC_FOR_BUILD=${HOST_CC:Q} \ 45 CC_FOR_BUILD=${HOST_CC:Q} \
43 CC=${CC:Q}' '${CCADDFLAGS:Q} \ 46 CC=${CC:Q}' '${CCADDFLAGS:Q} \
44 CXX=${CXX:Q}' '${CCADDFLAGS:Q}' '${CXXADDFLAGS:Q} \ 47 CXX=${CXX:Q}' '${CCADDFLAGS:Q}' '${CXXADDFLAGS:Q} \
45 CPP=${CPP:Q}' '-I${DESTDIR}/usr/include \ 48 CPP=${CPP:Q}' '-I${DESTDIR}/usr/include \
46 CFLAGS= CPPFLAGS= CXXFLAGS= LDFLAGS= \ 49 CFLAGS= CPPFLAGS= CXXFLAGS= LDFLAGS= \
47 AS=${AS:Q} AWK=${TOOL_AWK:Q} LD=${LD:Q} \ 50 AS=${AS:Q} AWK=${TOOL_AWK:Q} LD=${LD:Q} \
48 MSGFMT=${TOOLDIR}/bin/${_TOOL_PREFIX}msgfmt \ 51 MSGFMT=${TOOLDIR}/bin/${_TOOL_PREFIX}msgfmt \
49 NM=${NM:Q} OBJDUMP=${OBJDUMP:Q} \ 52 NM=${NM:Q} OBJDUMP=${OBJDUMP:Q} \
50 XGETTEXT=${TOOLDIR}/bin/${_TOOL_PREFIX}xgettext \ 53 XGETTEXT=${TOOLDIR}/bin/${_TOOL_PREFIX}xgettext \
51 LIBS=-lintl \ 54 LIBS=-lintl \
52 ac_cv_prog_cc_cross=yes \ 55 ac_cv_prog_cc_cross=yes \
53 ac_cv_func_strcoll_works=yes \ 56 ac_cv_func_strcoll_works=yes \
54 gcc_cv_func_printf_ptr=yes \ 57 gcc_cv_func_printf_ptr=yes \
55 gcc_cv_libc_provides_ssp=yes \ 58 gcc_cv_libc_provides_ssp=yes \
56 gdb_cv_printf_has_long_double=yes \ 59 gdb_cv_printf_has_long_double=yes \
57 gdb_cv_printf_has_long_long=yes \ 60 gdb_cv_printf_has_long_long=yes \
58 gdb_cv_scanf_has_long_double=yes 61 gdb_cv_scanf_has_long_double=yes
59 62
60ALL_TARGET= all-gcc 63ALL_TARGET= all-gcc
61INSTALL_TARGET= install-gcc 64INSTALL_TARGET= install-gcc
62 65
63.include "${.CURDIR}/../Makefile.gmakehost" 66.include "${.CURDIR}/../Makefile.gmakehost"
64BUILD_MAKE=${TOOL_GMAKE} 67BUILD_MAKE=${TOOL_GMAKE}
65 68
66CXXADDFLAGS= ${CPPFLAG_ISYSTEMXX} ${DESTDIR}/usr/include/g++ 69CXXADDFLAGS= ${CPPFLAG_ISYSTEMXX} ${DESTDIR}/usr/include/g++
67CCADDFLAGS= ${CPPFLAG_ISYSTEM} ${DESTDIR}/usr/include -L${DESTDIR}/lib -L${DESTDIR}/usr/lib -B${DESTDIR}/usr/lib/ 70CCADDFLAGS= ${CPPFLAG_ISYSTEM} ${DESTDIR}/usr/include -L${DESTDIR}/lib -L${DESTDIR}/usr/lib -B${DESTDIR}/usr/lib/
68 71
69NEWCONFIGDIR?= ${.CURDIR}/../.. 72NEWCONFIGDIR?= ${.CURDIR}/../..
70MKNATIVE?= ${.CURDIR}/mknative-gcc 73MKNATIVE?= ${.CURDIR}/mknative-gcc
71 74
72bootstrap-libgcc: .configure_done 75bootstrap-libgcc: .configure_done
73 @echo 'Creating files needed for libgcc by a native bootstrap build.' 76 @echo 'Creating files needed for libgcc by a native bootstrap build.'
74 @MAKE=${BUILD_MAKE:Q} ${HOST_SH} ${MKNATIVE} lib${MODULE} \ 77 @MAKE=${BUILD_MAKE:Q} ${HOST_SH} ${MKNATIVE} lib${MODULE} \
75 ${.OBJDIR}/build ${NEWCONFIGDIR} ${MACHINE_GNU_PLATFORM} 78 ${.OBJDIR}/build ${NEWCONFIGDIR} ${MACHINE_GNU_PLATFORM}
76 79
77native-gcc: .native/.configure_done 80native-gcc: .native/.configure_done
78 @echo 'Extracting GNU GCC configury for a native toolchain.' 81 @echo 'Extracting GNU GCC configury for a native toolchain.'
79 @MAKE=${BUILD_MAKE:Q} ${HOST_SH} ${MKNATIVE} ${MKNATIVE_TARGET} \ 82 @MAKE=${BUILD_MAKE:Q} ${HOST_SH} ${MKNATIVE} ${MKNATIVE_TARGET} \
80 ${.OBJDIR}/.native ${NEWCONFIGDIR} ${MACHINE_GNU_PLATFORM} 83 ${.OBJDIR}/.native ${NEWCONFIGDIR} ${MACHINE_GNU_PLATFORM}
81 84
82NATIVE_CONFIGURE_ARGS= ${COMMON_CONFIGURE_ARGS} \ 85NATIVE_CONFIGURE_ARGS= ${COMMON_CONFIGURE_ARGS} \
83 --disable-multilib \ 86 --disable-multilib \
84 --disable-symvers \ 87 --disable-symvers \
85 --build=`${.CURDIR}/../../gnu/dist/${MODULE}/config.guess` \ 88 --build=`${.CURDIR}/../../gnu/dist/${MODULE}/config.guess` \
86 --host=${MACHINE_GNU_PLATFORM} 89 --host=${MACHINE_GNU_PLATFORM}
87 90
88.native/.configure_done: ${_GNU_CFGSRC} ${.CURDIR}/Makefile 91.native/.configure_done: ${_GNU_CFGSRC} ${.CURDIR}/Makefile
89 mkdir .native 2>/dev/null || true 92 mkdir .native 2>/dev/null || true
90 PATH=${TOOLDIR}/bin:$$PATH; export PATH; \ 93 PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
91 (cd .native && ${MKNATIVE_ENV} \ 94 (cd .native && ${MKNATIVE_ENV} \
92 ${HOST_SH} ${GNUHOSTDIST}/configure \ 95 ${HOST_SH} ${GNUHOSTDIST}/configure \
93 ${NATIVE_CONFIGURE_ARGS}) && \ 96 ${NATIVE_CONFIGURE_ARGS}) && \
94 (cd .native && ${MKNATIVE_ENV} ${BUILD_MAKE} all-build-libiberty) 97 (cd .native && ${MKNATIVE_ENV} ${BUILD_MAKE} all-build-libiberty)
95.if ${HAVE_GCC} == 4 98.if ${HAVE_GCC} == 4
96 PATH=${TOOLDIR}/bin:$$PATH; export PATH; \ 99 PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
97 (cd .native && ${MKNATIVE_ENV} ${BUILD_MAKE} configure-gcc configure-libcpp) && \ 100 (cd .native && ${MKNATIVE_ENV} ${BUILD_MAKE} configure-gcc configure-libcpp) && \
98 (cd .native && ${MKNATIVE_ENV} ${BUILD_MAKE} configure-libiberty) 101 (cd .native && ${MKNATIVE_ENV} ${BUILD_MAKE} configure-libiberty)
99 # edit Makefile so that maybe-all-gcc does not depend on all-gcc any more. 102 # edit Makefile so that maybe-all-gcc does not depend on all-gcc any more.
100 (cd .native && mv Makefile Makefile.config && \ 103 (cd .native && mv Makefile Makefile.config && \
101 ${TOOL_SED} -e 's/\(maybe-all-gcc:\) all-gcc/\1/' \ 104 ${TOOL_SED} -e 's/\(maybe-all-gcc:\) all-gcc/\1/' \
102 < Makefile.config > Makefile) && \ 105 < Makefile.config > Makefile) && \
103 (cd .native/gcc && ${MKNATIVE_ENV} ${BUILD_MAKE} -e tree-check.h config.h multilib.h gcov-iov.h) 106 (cd .native/gcc && ${MKNATIVE_ENV} ${BUILD_MAKE} -e tree-check.h config.h multilib.h gcov-iov.h)
104.else 107.else
105 PATH=${TOOLDIR}/bin:$$PATH; export PATH; \ 108 PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
106 (cd .native && ${MKNATIVE_ENV} ${BUILD_MAKE} all-libiberty) && \ 109 (cd .native && ${MKNATIVE_ENV} ${BUILD_MAKE} all-libiberty) && \
107 (cd .native/gcc && ${MKNATIVE_ENV} ${BUILD_MAKE} tree-check.h config.h) 110 (cd .native/gcc && ${MKNATIVE_ENV} ${BUILD_MAKE} tree-check.h config.h)
108.endif 111.endif
109 PATH=${TOOLDIR}/bin:$$PATH; export PATH; \ 112 PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
110 (cd .native && touch gcc/cc1obj gcc/cc1plus gcc/f771 gcc/libgcc.a gcc/libgcc_s.so && \ 113 (cd .native && touch gcc/cc1obj gcc/cc1plus gcc/f771 gcc/libgcc.a gcc/libgcc_s.so && \
111 ${MKNATIVE_ENV} ${BUILD_MAKE} configure-target-libiberty \ 114 ${MKNATIVE_ENV} ${BUILD_MAKE} configure-target-libiberty \
112 ${MKNATIVE_CONFIG_TARGET_LIBS} configure-target-libobjc \ 115 ${MKNATIVE_CONFIG_TARGET_LIBS} configure-target-libobjc \
113 configure-target-libstdc++-v3 \ 116 configure-target-libstdc++-v3 \
114 ALL_GCC_C= ALL_GCC_CXX= \ 117 ALL_GCC_C= ALL_GCC_CXX= \
115 CC_FOR_TARGET=${CC:Q}' '${CCADDFLAGS:Q} \ 118 CC_FOR_TARGET=${CC:Q}' '${CCADDFLAGS:Q} \
116 CXX_FOR_TARGET=${CXX:Q}' '${CCADDFLAGS:Q}' '${CXXADDFLAGS:Q} \ 119 CXX_FOR_TARGET=${CXX:Q}' '${CCADDFLAGS:Q}' '${CXXADDFLAGS:Q} \
117 RAW_CXX_FOR_TARGET=${CXX:Q}' '${CCADDFLAGS:Q}' '${CXXADDFLAGS:Q} \ 120 RAW_CXX_FOR_TARGET=${CXX:Q}' '${CCADDFLAGS:Q}' '${CXXADDFLAGS:Q} \
118 CPP=${CPP:Q}' '-I${DESTDIR}/usr/include \ 121 CPP=${CPP:Q}' '-I${DESTDIR}/usr/include \
119 ac_cv_prog_cc_cross=yes) && \ 122 ac_cv_prog_cc_cross=yes) && \
120 true 123 true
121 PATH=${TOOLDIR}/bin:$$PATH; export PATH; \ 124 PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
122 (cd .native/${MACHINE_GNU_PLATFORM}/libstdc++-v3/include && \ 125 (cd .native/${MACHINE_GNU_PLATFORM}/libstdc++-v3/include && \
123 ${MKNATIVE_ENV} ${BUILD_MAKE} \ 126 ${MKNATIVE_ENV} ${BUILD_MAKE} \
124 CC_FOR_TARGET=${CC:Q}' '${CCADDFLAGS:Q} \ 127 CC_FOR_TARGET=${CC:Q}' '${CCADDFLAGS:Q} \
125 CXX_FOR_TARGET=${CXX:Q}' '${CCADDFLAGS:Q}' '${CXXADDFLAGS:Q} \ 128 CXX_FOR_TARGET=${CXX:Q}' '${CCADDFLAGS:Q}' '${CXXADDFLAGS:Q} \
126 CPP=${CPP:Q}' '-I${DESTDIR}/usr/include \ 129 CPP=${CPP:Q}' '-I${DESTDIR}/usr/include \
127 all-local) && \ 130 all-local) && \
128 true 131 true
129 PATH=${TOOLDIR}/bin:$$PATH; export PATH; \ 132 PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
130 (cd .native/${MACHINE_GNU_PLATFORM}/libiberty && \ 133 (cd .native/${MACHINE_GNU_PLATFORM}/libiberty && \
131 ${MKNATIVE_ENV} ${BUILD_MAKE} needed-list) 134 ${MKNATIVE_ENV} ${BUILD_MAKE} needed-list)
132 @touch $@ 135 @touch $@
133 136
134clean: clean.native 137clean: clean.native
135clean.native: 138clean.native:
136 -rm -r -f .native 139 -rm -r -f .native