https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118701
Bug ID: 118701
Summary: [15 regression] abi_check FAILs on Solaris due to weak
version
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: ro at gcc dot gnu.org
CC: redi at gcc dot gnu.org
Target Milestone: ---
Target: *-*-solaris2.11
Between 20250126 (55d288d4ff5360c572f2a017ba9385840ac5134e) and 20250127
(6a510dea7f3b047d0650a48e558a4911973930eb),
the abi_check test regressed on Solaris (both sparc and x86):
+FAIL: libstdc++-abi/abi_check
The log shows
1 incompatible symbols
0
Argument "{CXXABI_1.3.15}" isn't numeric in numeric eq (==) at
/vol/gcc/src/hg/master/local/libstdc++-v3/scripts/extract_symvers.pl line 129.
version status: incompatible
type: uncategorized
status: added
which no doubt is due to
commit c6977f765838a5ca8d321d916221a7368622bdd9
Author: Andreas Schwab <[email protected]>
Date: Tue Jan 21 23:50:15 2025 +0100
libstdc++: correct symbol version of typeinfo for bfloat16_t on RISC-V
The problem is that on non-RISC-V targets, the new CXXABI_1.3.16 version
contains no symbol. This changes the pvs -dsvo output used by
extract_symvers.pl:
* For regular (strong?) versions it looks like
libstdc++.so.6 - CXXABI_1.3.15: {CXXABI_1.3.14};
* while for weak versions there's
libstdc++.so.6 - CXXABI_1.3.16 [WEAK]: {CXXABI_1.3.15};
This is the first time libstdc++.so has this issue, so the script cannot
yet handle this. I'll harden it not to break in situations like this, but the
question remains how to properly handle this in gnu.ver:
* Keep the new version as is, creating a (useless) weak version on everything
but RISC-V.
* Make the version strong (terminology?). On Solaris, this could be done by
prefixing the symbols with global: outside __riscv. However, GNU ld chokes
on this.
* Move the __riscv #ifdef outside the version definition.
I thing the third variant would be best.
This is not an issue on other ELF targets which use readelf --symbols where
the distinction isn't seen. One would need to use readelf -V to determine
the difference.