-# It does not build natively under FreeBSD 13.x (or I did not find an
-# easy way to do that. But you can create 12.x's chroot, disable ASLR
-# and build until... it stops doing anything on cmd/go. That is
-# expected. Then you can continue building outside the chroot:
-# sysctl kern.elf64.aslr.enable=0
-# zstd -d <FreeBSD-12.4-RELEASE-amd64-dvd1.iso.zst >fbsd12.iso
-# mdconfig -a fbsd12.iso
-# mount -t cd9660 /dev/md0 /cdrom
-# mkdir /tmp/fbsd12-chroot
-# tar xfC /cdrom/usr/freebsd-dist/base.txz /tmp/fbsd12-chroot
-# tar xfC go1.4.3.src.tar.gz /tmp/fbsd12-chroot/root
-# cd /tmp/fbsd12-chroot/root/go
-# debash
-# chroot /tmp/fbsd12-chroot /bin/sh
-# cd go/src
-# export CGO_ENABLED=0
-# ./make.bash
-# exit
-# cd /tmp/fbsd12-chroot/root/go/src
-# ./make.bash --no-clean
+# Look at contrib/prepare-deps/steps/010-go1.4.3 for building
+# under FreeBSD 13.x+.
[ -n "$BASS_ROOT" ] || BASS_ROOT="$(dirname "$(realpath -- "$0")")"/../../../..
sname=$1.do . "$BASS_ROOT"/lib/rc
# It does not build natively under FreeBSD 13.x (or I did not find an
-# easy way to do that. But you can create 12.x's chroot, disable ASLR
+# easy way to do that). But you can create 12.x's chroot, disable ASLR
# and build until... it stops doing anything on cmd/go. That is
# expected. Then you can continue building outside the chroot:
+#
# sysctl kern.elf64.aslr.enable=0
-# zstd -d <FreeBSD-12.4-RELEASE-amd64-dvd1.iso.zst >fbsd12.iso
-# mdconfig -a fbsd12.iso
-# mount -t cd9660 /dev/md0 /cdrom
-# mkdir /tmp/fbsd12-chroot
-# tar xfC /cdrom/usr/freebsd-dist/base.txz /tmp/fbsd12-chroot
-# tar xfC go1.4.3.src.tar.gz /tmp/fbsd12-chroot/root
-# cd /tmp/fbsd12-chroot/root/go
-# debash
-# chroot /tmp/fbsd12-chroot /bin/sh
+# mdconfig -a FreeBSD-12.4-RELEASE-amd64-disc1.iso
+# mount -t cd9660 /dev/md0 /mnt
+# mkdir /tmp/fbsd12
+# tar xfC /mnt/usr/freebsd-dist/base.txz /tmp/fbsd12
+# tar xfC go1.4.3.src.tar.gz /tmp/fbsd12/root
+# cd /tmp/fbsd12/root/go
+# /path/to/bass/contrib/go-debash/v0
+# chroot /tmp/fbsd12 /bin/sh
# cd go/src
# export CGO_ENABLED=0
# ./make.bash
+# it will stuck on cmd/go, Ctrl-C it
# exit
-# cd /tmp/fbsd12-chroot/root/go/src
+# cd /tmp/fbsd12/root/go/src
+# export CGO_ENABLED=0
# ./make.bash --no-clean
+# mv /tmp/fbsd12/root/go /path/to/bass/contrib/prepare-deps/go1.4.3
+# cd /path/to/bass/contrib/prepare-deps
+# touch 010-go1.4.3.done
rm -fr go $name
tar xf $DISTFILES/$name.src.tar.gz