Spotted the issue when deploying x86_64-unknown-linux-gnu.cfg for C/C++/Fortran compilers.
flang-new: error: unknown argument: '--gcc-install-dir=/soft/compilers/gcc/12.2.0/x86_64-suse-linux/lib/gcc/x86_64-pc-linux-gnu/12.2.0'
Need at least --gcc-install-dir option to work.
Only the deprecated way via CMake -DGCC_INSTALL_PREFIX worked