Wed Nov 13 19:06:42 2019 UTC ()
PR pkg/54686: try to handle NetBSD/arm without architecture version the same
as {e,}armv4 or {e,}armv6 / {e,}armv7. We do not add an explicit version to
our current default (v5).


(martin)
diff -r1.21 -r1.22 pkgsrc/mk/gnu-config/config.guess

cvs diff -r1.21 -r1.22 pkgsrc/mk/gnu-config/config.guess (expand / switch to unified diff)

--- pkgsrc/mk/gnu-config/config.guess 2019/01/04 07:35:25 1.21
+++ pkgsrc/mk/gnu-config/config.guess 2019/11/13 19:06:42 1.22
@@ -177,28 +177,30 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAM @@ -177,28 +177,30 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAM
177 # Note: NetBSD doesn't particularly care about the vendor 177 # Note: NetBSD doesn't particularly care about the vendor
178 # portion of the name. We always set it to "unknown". 178 # portion of the name. We always set it to "unknown".
179 sysctl="sysctl -n hw.machine_arch" 179 sysctl="sysctl -n hw.machine_arch"
180 UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ 180 UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
181 "/sbin/$sysctl" 2>/dev/null || \ 181 "/sbin/$sysctl" 2>/dev/null || \
182 "/usr/sbin/$sysctl" 2>/dev/null || \ 182 "/usr/sbin/$sysctl" 2>/dev/null || \
183 echo unknown)` 183 echo unknown)`
184 case "$UNAME_MACHINE_ARCH" in 184 case "$UNAME_MACHINE_ARCH" in
185 armeb) machine=armeb-unknown ;; 185 armeb) machine=armeb-unknown ;;
186 arm*) machine=arm-unknown ;; 186 arm*) machine=arm-unknown ;;
187 sh3el) machine=shl-unknown ;; 187 sh3el) machine=shl-unknown ;;
188 sh3eb) machine=sh-unknown ;; 188 sh3eb) machine=sh-unknown ;;
189 sh5el) machine=sh5le-unknown ;; 189 sh5el) machine=sh5le-unknown ;;
190 earmv*) 190 earm*)
191 arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` 191 arch="${UNAME_MACHINE_ARCH#e}"
 192 arch="${arch%eb}"
 193 arch="${arch%hf}"
192 endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` 194 endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
193 machine="${arch}${endian}"-unknown 195 machine="${arch}${endian}"-unknown
194 ;; 196 ;;
195 *) machine="$UNAME_MACHINE_ARCH"-unknown ;; 197 *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
196 esac 198 esac
197 # The Operating System including object format, if it has switched 199 # The Operating System including object format, if it has switched
198 # to ELF recently (or will in the future) and ABI. 200 # to ELF recently (or will in the future) and ABI.
199 case "$UNAME_MACHINE_ARCH" in 201 case "$UNAME_MACHINE_ARCH" in
200 earm*) 202 earm*)
201 os=netbsdelf 203 os=netbsdelf
202 ;; 204 ;;
203 arm*|i386|m68k|ns32k|sh3*|sparc|vax) 205 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
204 set_cc_for_build 206 set_cc_for_build
@@ -209,27 +211,27 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAM @@ -209,27 +211,27 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAM
209 # Return netbsd for either. FIX? 211 # Return netbsd for either. FIX?
210 os=netbsd 212 os=netbsd
211 else 213 else
212 os=netbsdelf 214 os=netbsdelf
213 fi 215 fi
214 ;; 216 ;;
215 *) 217 *)
216 os=netbsd 218 os=netbsd
217 ;; 219 ;;
218 esac 220 esac
219 # Determine ABI tags. 221 # Determine ABI tags.
220 case "$UNAME_MACHINE_ARCH" in 222 case "$UNAME_MACHINE_ARCH" in
221 earm*) 223 earm*)
222 expr='s/^earmv[0-9]/-eabi/;s/eb$//' 224 expr='s/v[0-9]//;s/earm/-eabi/;s/eb$//'
223 abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` 225 abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
224 ;; 226 ;;
225 esac 227 esac
226 # The OS release 228 # The OS release
227 # Debian GNU/NetBSD machines have a different userland, and 229 # Debian GNU/NetBSD machines have a different userland, and
228 # thus, need a distinct triplet. However, they do not need 230 # thus, need a distinct triplet. However, they do not need
229 # kernel version information, so it can be replaced with a 231 # kernel version information, so it can be replaced with a
230 # suitable tag, in the style of linux-gnu. 232 # suitable tag, in the style of linux-gnu.
231 case "$UNAME_VERSION" in 233 case "$UNAME_VERSION" in
232 Debian*) 234 Debian*)
233 release='-gnu' 235 release='-gnu'
234 ;; 236 ;;
235 *) 237 *)