Install libgccjit

Prerequisites

sudo pacman -S yay

Install

yay -S libgccjit

Enter your password a few times and press Y when prompted for stuff… it’s from the Arch User Repository, so you’re installing it from source.

Usage

Now you can compile emacs using the --with-native-compilation flag: