Support for linux-aarch64 in gradle 7 or 8

I am running an Ubuntu 20.04 guest OS on VMWare with a MacOS host that has an arm64 processor.

Java works fine, but I’m trying to use the cpp-library plugin for compiling c++ libraries with gradle.

The libraries will compile fine when using gcc from the command-line.

How can I get gradle to compile c++ on this architecture? Is there a way to make it ignore the architecture and just execute the gcc command?