It’s likely something you’ve installed/changed on the system. In general, the gcc option -m is the machine type. So -m64 means it thinks it should be compiling for x86_64. For a Pi running Debian 12, it should be selecting -march=armv8-a or something like that. But this appears to be something with your system.
root@Allstar:/opt# apt list --installed | grep gcc
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
gcc-12-base/stable,now 12.2.0-14 arm64 [installed]
gcc-12/stable,now 12.2.0-14 arm64 [installed,automatic]
gcc/stable,now 4:12.2.0-3 arm64 [installed,automatic]
libgcc-12-dev/stable,now 12.2.0-14 arm64 [installed,automatic]
libgcc-s1/stable,now 12.2.0-14 arm64 [installed]
If my understanding is correct, even though it seem to be correct, if I uninstall these libraries, and then reinstalled (or just force a reinstall) it should over-write what is wrong OR should I be looking elsewhere.