How to compile JDK 8 with the latest Xcode on the latest macOS.
Currently (March 2021), OpenJDK jdk8u can only be compiled with Xcode 4, which won't run on the latest macOS. This repo contains patches and information for setting up an environment to compile a JDK using the very latest tools.
This patch can build an x86_64 jdk on eithea an Intel or aarch64 Mac, but cannot yet build a native aarch64 JDK.
The easiest way to get a working JDK8u is:
mkdir workdir cd workdir git clone https://github.com/stooke/jdk8u-xcode10.git ./jdk8u-xcode10/build8.sh ./jdk8u-dev/build/maxosx-x86_64-normal-server-release/images/j2sdk-image/bin/java -version
 Actual OS compatiblity has not been tested.