This patch updates lang/racket to version 8.1.
With Racket 8.0, the default backend was switched to an implementation based on Chez Scheme. The old byte code interpreter is still supported.
The patch introduces two options -- BC and CS. I made them mutually exclusive, even though Racket supports building and installing both backends simultaneously. The CS backend is enabled by default.
The --enable-libffi and --enable-places options where added to BC_CONFIGURE_ON. The CS backend configure script does not provide these options.
Racket claims to support the Chez Scheme backend on i386, amd64, armv6, aarch64 and powerpc (https://github.com/racket/racket/blob/master/racket/src/ChezScheme/README.md) on FreeBSD, but only amd64 and i386 seem to have machine types defined. I could not test if the CS backend works on architectures other than amd64 and i386, or which machine types the configure script chooses there.
According to the Racket documentation, JIT compilation is supported on 32 bit PowerPC (c.f. https://docs.racket-lang.org/guide/performance.html#%28part._.J.I.T%29). I carried over the patch to src/bc/sconfig.h since I do not have access to FreeBSD machines with architectures other than amd64 and i386.
This patch is based on the work by 'm.ne' in Bug 255529.
Since the patch is larger than 1000KB... It can be found here: https://philippost.de/lang_racket_update.patch
Created attachment 226327 [details]
lang/racket: update to 8.1 (xz archive)
Add xz archive of the proposed patch to have everything in one place.