12 has the failure:
/usr/local/bin/ld: /usr/bin/../lib/LLVMgold.so: error loading plugin: Cannot open "/usr/bin/../lib/LLVMgold.so"
c++: error: linker command failed with exit code 1 (use -v to see invocation)
that is triggered by the -flto argument. It isn't supplied on 11.
Add patch that eliminates -flto altogether.