gcc and base system disagree on version of __unordtf2 in libgcc_s

From: John F Carr <jfc_at_mit.edu>
Date: Wed, 24 Jan 2024 20:24:13 UTC
If I build a C++ program with g++ on 64 bit ARM and do not use -Wl,-rpath
the resulting executable fails with

ld-elf.so.1: /lib/libgcc_s.so.1: version GCC_4.5.0 required by /usr/local/lib/gcc11/libstdc++.so.6 not found

The symbol exists but has the wrong version.

FreeBSD's /lib/libgcc_s.so.1 defines __unordtf2 in version GCC_4.6.0.

gcc's libgcc_s.so defines __unordtf2 in version GCC_4.5.0.

Who is right?  Can we make the gcc port and base system agree?
Can we do it without breaking old executables?

In the gcc source a comment in libgcc/config/i386/libgcc-bsd.ver reads:

# 128 bit long double support was introduced with GCC 4.6.0 for FreeBSD.
# These lines make the symbols to get a @@GCC_4.6.0.

Reproduced with gcc11, gcc12, and gcc13-devel packages on FreeBSD 14 and 15.