Sat Dec 5 16:50:53 2020 UTC ()
bootstrap: Prefer native on Elbrus 2000

A lot of patches for Elbrus 2000 have not been upstreamed, which results
in important packages such as openssl failing to build, while the native
one is quite up-to-date and working.

Tested building devel/fossil with this, which results in a fully working
binary.


(js)
diff -r1.295 -r1.296 pkgsrc/bootstrap/bootstrap

cvs diff -r1.295 -r1.296 pkgsrc/bootstrap/bootstrap (expand / switch to unified diff)

--- pkgsrc/bootstrap/bootstrap 2020/10/28 16:52:43 1.295
+++ pkgsrc/bootstrap/bootstrap 2020/12/05 16:50:52 1.296
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1#! /bin/sh 1#! /bin/sh
2 2
3# $NetBSD: bootstrap,v 1.295 2020/10/28 16:52:43 maya Exp $ 3# $NetBSD: bootstrap,v 1.296 2020/12/05 16:50:52 js Exp $
4# 4#
5# Copyright (c) 2001-2011 Alistair Crooks <agc@NetBSD.org> 5# Copyright (c) 2001-2011 Alistair Crooks <agc@NetBSD.org>
6# All rights reserved. 6# All rights reserved.
7# 7#
8# Redistribution and use in source and binary forms, with or without 8# Redistribution and use in source and binary forms, with or without
9# modification, are permitted provided that the following conditions 9# modification, are permitted provided that the following conditions
10# are met: 10# are met:
11# 1. Redistributions of source code must retain the above copyright 11# 1. Redistributions of source code must retain the above copyright
12# notice, this list of conditions and the following disclaimer. 12# notice, this list of conditions and the following disclaimer.
13# 2. Redistributions in binary form must reproduce the above copyright 13# 2. Redistributions in binary form must reproduce the above copyright
14# notice, this list of conditions and the following disclaimer in the 14# notice, this list of conditions and the following disclaimer in the
15# documentation and/or other materials provided with the distribution. 15# documentation and/or other materials provided with the distribution.
16# 16#
@@ -1071,27 +1071,30 @@ if [ "${sysconfdir}" != "${prefix}/etc"  @@ -1071,27 +1071,30 @@ if [ "${sysconfdir}" != "${prefix}/etc"
1071fi 1071fi
1072echo "PKG_TOOLS_BIN= $prefix/sbin" >> ${TARGET_MKCONF} 1072echo "PKG_TOOLS_BIN= $prefix/sbin" >> ${TARGET_MKCONF}
1073echo "PKGINFODIR= $pkginfodir" >> ${TARGET_MKCONF} 1073echo "PKGINFODIR= $pkginfodir" >> ${TARGET_MKCONF}
1074echo "PKGMANDIR= $pkgmandir" >> ${TARGET_MKCONF} 1074echo "PKGMANDIR= $pkgmandir" >> ${TARGET_MKCONF}
1075echo "" >> ${TARGET_MKCONF} 1075echo "" >> ${TARGET_MKCONF}
1076 1076
1077case $opsys in 1077case $opsys in
1078Linux) 1078Linux)
1079 # Default to PREFER_PKGSRC=yes unless user specifies --prefer-native=yes 1079 # Default to PREFER_PKGSRC=yes unless user specifies --prefer-native=yes
1080 # Linux systems likely have software from other packages managers 1080 # Linux systems likely have software from other packages managers
1081 # like yum or apt that can leak into pkgsrc and cause issues as they 1081 # like yum or apt that can leak into pkgsrc and cause issues as they
1082 # age, undergo ABI changes, or get added/removed behind our backs. 1082 # age, undergo ABI changes, or get added/removed behind our backs.
1083 # Let pkgsrc maintain all dependencies to avoid these problems. 1083 # Let pkgsrc maintain all dependencies to avoid these problems.
1084 if [ -z "$prefer_pkgsrc" ] && [ "$prefer_native" != "yes" ]; then 1084 # The exception here is Elbrus 2000, for which a lot of patches have
 1085 # not been upstreamed, so that it is better to use native.
 1086 if [ -z "$prefer_pkgsrc" ] && [ "$prefer_native" != "yes" ] && \
 1087 [ "$machine_arch" != "e2k" ]; then
1085 prefer_pkgsrc="yes" 1088 prefer_pkgsrc="yes"
1086 fi 1089 fi
1087 ;; 1090 ;;
1088esac 1091esac
1089 1092
1090if [ -n "$prefer_pkgsrc" ]; then 1093if [ -n "$prefer_pkgsrc" ]; then
1091 echo "# WARNING: Changing PREFER_* after bootstrap will require rebuilding all" >> ${TARGET_MKCONF} 1094 echo "# WARNING: Changing PREFER_* after bootstrap will require rebuilding all" >> ${TARGET_MKCONF}
1092 echo "# packages with a dependency that switched between native/pkgsrc." >> ${TARGET_MKCONF} 1095 echo "# packages with a dependency that switched between native/pkgsrc." >> ${TARGET_MKCONF}
1093 echo "PREFER_PKGSRC= $prefer_pkgsrc" >> ${TARGET_MKCONF} 1096 echo "PREFER_PKGSRC= $prefer_pkgsrc" >> ${TARGET_MKCONF}
1094 echo "" >> ${TARGET_MKCONF} 1097 echo "" >> ${TARGET_MKCONF}
1095fi 1098fi
1096if [ -n "$prefer_native" ]; then 1099if [ -n "$prefer_native" ]; then
1097 echo "PREFER_NATIVE= $prefer_native" >> ${TARGET_MKCONF} 1100 echo "PREFER_NATIVE= $prefer_native" >> ${TARGET_MKCONF}