Experimental Patch Gets The ARM64 Linux Kernel Compiling Under macOS
With some "duct tape and bailing wire", Nick has managed to achieve compiling the ARM64 Linux kernel under macOS 12.5.1 "Monterey" on his Apple M2 MacBook Air.
With his own built LLVM/Clang and fetching some dependencies via Homebrew, he was able to compile the Linux kernel under macOS. Not that you would be able to use the Linux kernel with macOS, but if just wanting to do development and build/smoke testing on an Apple M1/M2 -- at least until the Linux support is good enough itself for running on the M1/M2 hardware with accelerated graphics, working audio, and other features still being tackled by those bringing up Linux on Apple Silicon.
There is apparently interest in being able to compile the Linux kernel while running macOS on M1/M2 hardware.
Nick published a work-in-progress patch with the necessary changes needed to perform the successful build. The patch is still to be cleaned up and splitten up before its potential upstreaming in the future.
Nick annoucned the success overnight on the mailing list to gauge the interest level of other upstream developers and the Asahi Linux crew over the interest level in being able to compile the Linux kernel under macOS.