As asked in the linked stackoverflow, are you sure you are using clang here? x86_64-linux-gcc.br_real is that the compiler name? If you thought you were using clang but somehow the build system chose gcc, that’s not a clang issue.
Perhaps your config doesn’t support building with clang and is not good at telling you that? (I know clangbuiltlinux exists but haven’t used it myself)
Certainly seems like x86_64-linux-gcc.br_real: error: unrecognized command line option ‘–gcc-toolchain=/’ is something GCC would say not clang.
If you are in fact using clang then we would need to see the compile command for the file qae_mem_utils. Something that reproduces outside of the Linux build system you have, ideally with a single source file input.