11.29Spalle$NetBSD: README,v 1.29 2023/09/02 18:45:48 palle Exp $
21.1Stv
31.1StvSpecial notes for cross-hosting a NetBSD build on certain platforms.  
41.1StvOnly those platforms which have been tested to complete a "build.sh" run
51.1Stvare listed.
61.7Slukem
71.10SjmcAll hosts must have a POSIX compatible sh. /bin/sh is assumed unless 
81.10Sjmcotherwise set. This can be overridden by setting HOST_SH in the environment.
91.10Sjmc
101.10SjmcIn addition all hosts must provide the following local tools:
111.14Scjep  gzip
121.14Scjep  gcc
131.14Scjep  g++
141.14Scjep  zlib and headers (this requirement may be dropped in future)
151.10Sjmc
161.14ScjepFreeBSD
171.18Scjep-------
181.10Sjmc
191.15Scjepbuild.sh was recently tested on:
201.15Scjep* FreeBSD 13 (amd64, aarch64) 
211.15Scjep* FreeBSD 12.2 (amd64, aarch64)
221.15Scjep* FreeBSD 11.4 (amd64)
231.15Scjep* FreeBSD 10.4 (amd64)
241.1Stv
251.14ScjepLinux
261.18Scjep-----
271.1Stv
281.14Scjepbuild.sh has been tested on:
291.14Scjep* Amazon Linux 2 (x86)
301.15Scjep* Debian 10 (x86, aarch64)
311.15Scjep* Red Hat Enterprise Linux 8 (x86, aarch64)
321.14Scjep* SUSE Enterprise Server 15 (x86)
331.15Scjep* Ubuntu Server 20.04 (x86, aarch64)
341.15Scjep* Ubuntu Server 18.04 (x86)
351.14Scjep
361.14Scjep* The gcc and g++ package must be installed, along with the typical system 
371.14Scjep  development packages (glibc-devel, etc.). The g++ package is sometimes 
381.14Scjep  called gcc-c++.
391.1Stv
401.14Scjep* The ncurses-devel package must be installed (for nbinfo).
411.12Sjmc
421.14Scjep* The zlib and zlib-devel packages must be installed (these are
431.14Scjep  called zlib1g and zlib1g-dev on Debian and Ubuntu Linux)
441.1Stv
451.15Scjep* There is a known build problem on Linux/aarch64 with glibc <2.28
461.15Scjep
471.14ScjepmacOS/Darwin
481.18Scjep------------
491.1Stv
501.15Scjepbuild.sh was recently tested on:
511.17Scjep* macOS Big Sur (x86)
521.15Scjep* macOS Catalina
531.16Scjep* macOS High Sierra
541.15Scjep
551.17Scjepwith up to date Xcode command line tools and APFS filesystems. 
561.17ScjepPreviously, there have been issues building on case-insensitive 
571.17ScjepHFS filesystems. build.sh is not working yet on M1-based Macs.
581.9Sdbj
591.14ScjepHP-UX
601.18Scjep-----
611.9Sdbj
621.14Scjep* zlib must be available.
631.1Stv
641.19ScjepOpenBSD
651.19Scjep-------
661.19Scjep
671.19ScjepAs of -current 20210629, ./build.sh will build src on OpenBSD 6.9
681.21Scjepfor all platforms.
691.20Scjep
701.21ScjepDue to the default limits placed on user accounts, the host may experience
711.21Scjepmemory exhaustion on builds requiring the LLVM RT library (including 
721.21ScjepX on amd64, i386 and evbarm64-el) and for MIPS targets.
731.21Scjep
741.21ScjepThis can be avoided by building as root (not ideal) or by asking your
751.21Scjepadministrator to increase your limits in login.conf. These two variables
761.21Scjepseem to be sufficient:
771.21Scjep        :datasize=infinity:\
781.21Scjep        :stacksize-cur=8M:\
791.19Scjep
801.14ScjepNetBSD (earlier releases)
811.18Scjep-------------------------
821.1Stv
831.1Stv* Tested on NetBSD 1.5.2 (machine-independently).
841.1Stv* Should need no special setup.
851.14Scjep* _NETBSD_SOURCE is *not* to be defined/pulled in during compat/tools builds.
861.14Scjep  compat_defs.h will error out if it finds it defined. 
871.1Stv
881.14ScjepSolaris
891.18Scjep-------
901.1Stv
911.26Spalle(updated instruction for Solaris 10 and 11 further below)
921.13Spalle
931.4Sthorpej* Tested on Solaris/x86 8 (5.8) with gcc 2.95.2 and Solaris/sparc 8 (5.8)
941.4Sthorpej  with gcc 3.2 (not yet tested with SUNWspro).
951.1Stv
961.1Stv* $HOST_CC needs to be set properly (for gcc, it should be set to "gcc",
971.1Stv  otherwise the improper /usr/ucb/cc may be invoked by accident).
981.1Stv
991.4Sthorpej* The SUNWzlib package (or a built version of zlib visible to $HOST_CC,
1001.4Sthorpej  such as SMCzlib from sunfreeware.com) must be installed.  This will be
1011.4Sthorpej  fixed in the future to include zlib in libnbcompat.
1021.1Stv
1031.1Stv* Needs the following paths, in this order, in $PATH:
1041.1Stv
1051.5Sthorpej      /usr/xpg4/bin
1061.4Sthorpej      /usr/ccs/bin
1071.4Sthorpej      <path to host C and C++ compilers>
1081.4Sthorpej      /usr/bin
1091.4Sthorpej
1101.4Sthorpej  /usr/ucb may optionally be placed before /usr/bin, per your preference,
1111.4Sthorpej  but /usr/ucb *MUST NOT* be before /usr/ccs/bin or before the path to
1121.4Sthorpej  the host C and C++ compilers.
1131.13Spalle
1141.26Spalle
1151.26SpalleSolaris 10:
1161.26Spalle
1171.26Spalle* Solaris 10 1/13 (u11)
1181.26Spalle * POSIX.1-2001, SUSv3 (see standards(7))
1191.26Spalle * Using gcc-5 from opencsw.org
1201.29Spalle * Set PATH to /usr/xpg6/bin:/usr/xpg4/bin:/usr/bin:/usr/ccs/bin
1211.26Spalle * Set HOST_CC to /opt/csw/bin/gcc
1221.26Spalle * Set HOST_SH to /usr/bin/bash
1231.26Spalle
1241.26Spalle
1251.13SpalleSolaris 11:
1261.13Spalle
1271.13Spalle* Solaris 11.3
1281.26Spalle * POSIX.1-2001, SUSv3 (see standards(7))
1291.28Spalle * Using gcc-12 from pkgsrc.org (installed in $GCC12INSTALLDIR)
1301.27Spalle * Set PATH to /usr/xpg6/bin:/usr/xpg4/bin:/usr/bin:$GCC12INSTALLDIR/bin
1311.28Spalle * Set HOST_CC to $GCC12INSTALLDIR/bin/gcc
1321.26Spalle * Set HOST_SH to /usr/bin/bash
1331.13Spalle
1341.22Spalle* Solaris 11.4 (CBE)
1351.24Spalle * POSIX.1-2008, SUSv4 (see standards(7))
1361.24Spalle * Using gcc-11
1371.24Spalle * Set PATH to /usr/xpg7/bin:/usr/xpg6/bin:/usr/xpg4/bin:/usr/bin
1381.24Spalle * Set HOST_CC to /usr/bin/gcc
1391.25Spalle * Set HOST_SH to /usr/bin/bash
1401.22Spalle
1411.22Spalle* Solaris 11.4 (SRU57)
1421.23Spalle * POSIX.1-2008, SUSv4 (see standards(7))
1431.22Spalle * Using gcc-12
1441.13Spalle * Set PATH to /usr/xpg7/bin:/usr/xpg6/bin:/usr/xpg4/bin:/usr/bin
1451.22Spalle * Set HOST_CC to /usr/bin/gcc
1461.23Spalle * Set HOST_SH to /usr/bin/bash
147