Sat Apr 2 22:08:14 2016 UTC ()
add some comments and prefer MACHINE over MACHINE_ARCH when
they're always the same.  no functional change.


(mrg)
diff -r1.915 -r1.916 src/share/mk/bsd.own.mk

cvs diff -r1.915 -r1.916 src/share/mk/bsd.own.mk (expand / switch to unified diff)

--- src/share/mk/bsd.own.mk 2016/03/30 20:18:18 1.915
+++ src/share/mk/bsd.own.mk 2016/04/02 22:08:14 1.916
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: bsd.own.mk,v 1.915 2016/03/30 20:18:18 mrg Exp $ 1# $NetBSD: bsd.own.mk,v 1.916 2016/04/02 22:08:14 mrg 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#
@@ -51,31 +51,34 @@ NEED_OWN_INSTALL_TARGET?= yes @@ -51,31 +51,34 @@ NEED_OWN_INSTALL_TARGET?= yes
51TOOLCHAIN_MISSING?= no 51TOOLCHAIN_MISSING?= no
52 52
53.if ${MACHINE_CPU} == "aarch64" && !defined(EXTERNAL_TOOLCHAIN) && ${MKLLVM:Uyes} != "no" 53.if ${MACHINE_CPU} == "aarch64" && !defined(EXTERNAL_TOOLCHAIN) && ${MKLLVM:Uyes} != "no"
54MKLLVM?= yes 54MKLLVM?= yes
55HAVE_LLVM?= yes 55HAVE_LLVM?= yes
56MKGCC?= no 56MKGCC?= no
57.endif 57.endif
58 58
59# 59#
60# GCC Using platforms. 60# GCC Using platforms.
61# 61#
62.if ${MKGCC:Uyes} != "no" 62.if ${MKGCC:Uyes} != "no"
63 63
 64#
 65# What GCC is used?
 66#
64.if ${MACHINE_CPU} == "aarch64" 67.if ${MACHINE_CPU} == "aarch64"
65HAVE_GCC?= 0 68HAVE_GCC?= 0
66.elif \ 69.elif \
67 ${MACHINE_ARCH} == "alpha" || \ 70 ${MACHINE} == "alpha" || \
68 ${MACHINE_ARCH} == "hppa" || \ 71 ${MACHINE} == "hppa" || \
69 ${MACHINE} == "playstation2" || \ 72 ${MACHINE} == "playstation2" || \
70 ${MACHINE_ARCH} == "vax" 73 ${MACHINE_ARCH} == "vax"
71HAVE_GCC?= 53 74HAVE_GCC?= 53
72.else 75.else
73# Otherwise, default to GCC4.8 76# Otherwise, default to GCC4.8
74HAVE_GCC?= 48 77HAVE_GCC?= 48
75.endif 78.endif
76 79
77# 80#
78# Platforms that can't run a modern GCC natively 81# Platforms that can't run a modern GCC natively
79.if ${MACHINE_ARCH} == "m68000" 82.if ${MACHINE_ARCH} == "m68000"
80MKGCCCMDS?= no 83MKGCCCMDS?= no
81.endif 84.endif
@@ -111,66 +114,72 @@ _LIBC_COMPILER_RT.x86_64= yes @@ -111,66 +114,72 @@ _LIBC_COMPILER_RT.x86_64= yes
111HAVE_LIBGCC?= no 114HAVE_LIBGCC?= no
112.else 115.else
113HAVE_LIBGCC?= yes 116HAVE_LIBGCC?= yes
114.endif 117.endif
115 118
116 119
117# ia64 is not support 120# ia64 is not support
118.if ${HAVE_LLVM:Uno} == "yes" || !empty(MACHINE_ARCH:Mearm*) 121.if ${HAVE_LLVM:Uno} == "yes" || !empty(MACHINE_ARCH:Mearm*)
119HAVE_LIBGCC_EH?= no 122HAVE_LIBGCC_EH?= no
120.else 123.else
121HAVE_LIBGCC_EH?= yes 124HAVE_LIBGCC_EH?= yes
122.endif 125.endif
123 126
124.if (${MACHINE_ARCH} == "alpha") || \ 127.if ${MACHINE} == "alpha" || \
125 (${MACHINE_ARCH} == "hppa") || \ 128 ${MACHINE} == "hppa" || \
126 (${MACHINE_ARCH} == "ia64") || \ 129 ${MACHINE} == "ia64" || \
127 (${MACHINE_CPU} == "mips") 130 ${MACHINE_CPU} == "mips"
128HAVE_SSP?= no 131HAVE_SSP?= no
129.else 132.else
130HAVE_SSP?= yes 133HAVE_SSP?= yes
131.if !defined(NOFORT) && ${USE_FORT:Uno} != "no" 134.if !defined(NOFORT) && ${USE_FORT:Uno} != "no"
132USE_SSP?= yes 135USE_SSP?= yes
133.endif 136.endif
134.endif 137.endif
135 138
 139#
 140# What GDB is used?
 141#
136.if ${MACHINE} == "amd64" || \ 142.if ${MACHINE} == "amd64" || \
137 ${MACHINE} == "i386" || \ 143 ${MACHINE} == "i386" || \
138 ${MACHINE} == "playstation2" || \ 144 ${MACHINE} == "playstation2" || \
 145 ${MACHINE} == "sparc" || \
 146 ${MACHINE} == "vax" || \
139 ${MACHINE_CPU} == "sh3" || \ 147 ${MACHINE_CPU} == "sh3" || \
140 ${MACHINE_ARCH} == "sparc" || \ 
141 ${MACHINE_ARCH} == "vax" || \ 
142 ${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el" 148 ${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el"
143HAVE_GDB?= 710 149HAVE_GDB?= 710
144.else 150.else
145HAVE_GDB?= 79 151HAVE_GDB?= 79
146.endif 152.endif
147 153
148.if ${HAVE_GDB} == 79 154.if ${HAVE_GDB} == 79
149EXTERNAL_GDB_SUBDIR= gdb.old 155EXTERNAL_GDB_SUBDIR= gdb.old
150.else 156.else
151EXTERNAL_GDB_SUBDIR= gdb 157EXTERNAL_GDB_SUBDIR= gdb
152.endif 158.endif
153 159
 160#
 161# What binutils is used?
 162#
154.if ${MACHINE} == "amd64" || \ 163.if ${MACHINE} == "amd64" || \
155 ${MACHINE} == "evbarm" || \ 164 ${MACHINE} == "evbarm" || \
156 ${MACHINE} == "i386" || \ 165 ${MACHINE} == "i386" || \
157 ${MACHINE} == "hppa" || \ 166 ${MACHINE} == "hppa" || \
158 ${MACHINE} == "playstation2" || \ 167 ${MACHINE} == "playstation2" || \
159 ${MACHINE_CPU} == "sh3" || \ 
160 ${MACHINE} == "sparc" || \ 168 ${MACHINE} == "sparc" || \
161 ${MACHINE} == "sparc64" || \ 169 ${MACHINE} == "sparc64" || \
162 ${MACHINE_ARCH} == "powerpc" || \ 170 ${MACHINE} == "vax" || \
163 ${MACHINE_ARCH} == "vax" 171 ${MACHINE_CPU} == "sh3" || \
 172 ${MACHINE_ARCH} == "powerpc"
164HAVE_BINUTILS?= 226 173HAVE_BINUTILS?= 226
165.else 174.else
166HAVE_BINUTILS?= 223 175HAVE_BINUTILS?= 223
167.endif 176.endif
168 177
169.if ${HAVE_BINUTILS} == 223 178.if ${HAVE_BINUTILS} == 223
170EXTERNAL_BINUTILS_SUBDIR= binutils.old 179EXTERNAL_BINUTILS_SUBDIR= binutils.old
171.elif ${HAVE_BINUTILS} == 226 180.elif ${HAVE_BINUTILS} == 226
172EXTERNAL_BINUTILS_SUBDIR= binutils 181EXTERNAL_BINUTILS_SUBDIR= binutils
173.else 182.else
174EXTERNAL_BINUTILS_SUBDIR= /does/not/exist 183EXTERNAL_BINUTILS_SUBDIR= /does/not/exist
175.endif 184.endif
176 185