Problem with linux-c7-devtoolset - seem to use FreeBSD ld

From: Martin Cracauer <cracauer_at_cons.org>
Date: Fri, 22 Mar 2024 23:34:35 UTC
If you make a fresh install of linux-c7-devtoolset right now (on a
system with no /compat/linux yet) you can't make executables.  It
seems to invoke the FreeBSD ld.

This doesn't work:
% /compat/linux/opt/rh/devtoolset-11/root/usr/bin/g++ -o l l.cc
/usr/local/bin/ld: /mnt/part2/compat/linux/opt/rh/devtoolset-11/root/usr/bin/../libexec/gcc/x86_64-redhat-linux/11/liblto_plugin.so: error loading plugin: Shared object "libc.so.6" not found, required by "liblto_plugin.so"
collect2: error: ld returned 1 exit status
% 

But it works if you separately invoke compiler and linker:
% /compat/linux/opt/rh/devtoolset-11/root/usr/bin/g++ -c l.cc 
% /compat/linux/opt/rh/devtoolset-11/root/usr/bin/ld.gold -o l l.o
%