September 6th, 2024

Updated Patches Allow Compiling the Linux Kernel from Within macOS

Updated patches enable Linux kernel compilation on macOS ARM64, enhancing compatibility for Apple Silicon. Users require the LLVM toolchain and Homebrew for additional C header files. Patches are on the mailing list.

Read original articleLink Icon
Updated Patches Allow Compiling the Linux Kernel from Within macOS

Updated patches have been released that enable the compilation of the Linux kernel from macOS, specifically for ARM64 hosts. Initially introduced in 2022, these patches aimed to facilitate developers in conducting build and smoke tests on Apple Silicon devices using the LLVM/Clang toolchain. The latest version of these patches, shared by Daniel Gomez, enhances the Linux kernel build system's compatibility with macOS ARM64. To successfully compile the Linux kernel, users will need the LLVM toolchain available on macOS and must utilize Homebrew to obtain additional C header files that are not included by default in macOS. Developers interested in these updates can find the new patches on the Linux kernel mailing list.

- Updated patches allow Linux kernel compilation on macOS ARM64.

- Initial patches were introduced in 2022 for testing kernel changes.

- Users need LLVM toolchain and Homebrew for additional C header files.

- New patches enhance compatibility for developers using Apple Silicon.

- Patches are available for review on the Linux kernel mailing list.

Link Icon 1 comments
By @musicale - 5 months
Porting to clang/llvm sounds like it was a good idea.

How many C toolchains can now produce a working Linux?

I think tcc could compile some Linux kernels?

I imagine intel, Microsoft, and IBM closed-source C compilers might be able to do so as well?