Re: [PATCH] libstdc++: Update ppc64le baseline_symbols.txt

2021-04-20 Thread Jonathan Wakely via Gcc-patches

On 19/04/21 15:07 +0200, Jakub Jelinek wrote:

On Fri, Apr 16, 2021 at 08:48:12PM +0200, Jakub Jelinek via Gcc-patches wrote:

Tested on powerpc64{,le}-linux now (-m32/-m64 on be) and while the first
patch works fine, the second one unfortunately doesn't on either be or le,
so more work is needed there.  Thus, I'm withdrawing the second
* config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
only patch.


Here are the needed changes to make it work.
For symbols with _LDBL_ substring in version name we already have code to
ignore those if no such symbols appear (but it is slightly incorrect, see
below).
So, this patch does the same thing for symbol versions with _IEEE128_
substring.
The previously incorrectly handled case is that in addition to
FUNC:_ZNKSt17__gnu_cxx_ieee1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intImEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_@@GLIBCXX_IEEE128_3.4.29
or
OBJECT:12:_ZTSu9__ieee128@@CXXABI_IEEE128_1.3.13
cases we also have the
OBJECT:0:CXXABI_IEEE128_1.3.13
OBJECT:0:GLIBCXX_IEEE128_3.4.29
cases, which have empty version_name and the name is in that case the
symbol version.  Those need to be ignored too.

Tested on {powerpc64le,powerpc64,x86_64}-linux, ok for trunk?


OK for trunk and gcc-11, thanks.



[PATCH] libstdc++: Update ppc64le baseline_symbols.txt

2021-04-19 Thread Jakub Jelinek via Gcc-patches
On Fri, Apr 16, 2021 at 08:48:12PM +0200, Jakub Jelinek via Gcc-patches wrote:
> Tested on powerpc64{,le}-linux now (-m32/-m64 on be) and while the first
> patch works fine, the second one unfortunately doesn't on either be or le,
> so more work is needed there.  Thus, I'm withdrawing the second
>   * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
> only patch.

Here are the needed changes to make it work.
For symbols with _LDBL_ substring in version name we already have code to
ignore those if no such symbols appear (but it is slightly incorrect, see
below).
So, this patch does the same thing for symbol versions with _IEEE128_
substring.
The previously incorrectly handled case is that in addition to
FUNC:_ZNKSt17__gnu_cxx_ieee1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intImEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_@@GLIBCXX_IEEE128_3.4.29
or
OBJECT:12:_ZTSu9__ieee128@@CXXABI_IEEE128_1.3.13
cases we also have the
OBJECT:0:CXXABI_IEEE128_1.3.13
OBJECT:0:GLIBCXX_IEEE128_3.4.29
cases, which have empty version_name and the name is in that case the
symbol version.  Those need to be ignored too.

Tested on {powerpc64le,powerpc64,x86_64}-linux, ok for trunk?

2021-04-19  Jakub Jelinek  

* testsuite/util/testsuite_abi.cc (compare_symbols): If any symbol
versions with _IEEE128_ substring are found, set ieee_version_found
to true.  Ignore missing symbols with _IEEE128_ in version name if
!ieee_version_found.  Use i->first as version_name instead of
i->second.version_name if the latter is empty.
* config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.

--- libstdc++-v3/testsuite/util/testsuite_abi.cc.jj 2021-01-04 
10:25:57.982016994 +0100
+++ libstdc++-v3/testsuite/util/testsuite_abi.cc2021-04-19 
14:34:06.567359978 +0200
@@ -407,6 +402,15 @@ compare_symbols(const char* baseline_fil
   ++li;
 }
 
+  // Similarly for IEEE128 symbols.
+  bool ieee_version_found(false);
+  for (li = test.begin(); li != test.end(); ++li)
+if (li->second.version_name.find("_IEEE128_") != std::string::npos)
+  {
+ieee_version_found = true;
+break;
+  }
+
   // Sort out names.
   // Assuming all baseline names and test names are both unique w/ no
   // duplicates.
@@ -440,9 +444,12 @@ compare_symbols(const char* baseline_fil
{
  // Iff no test long double compatibility symbols at all and the symbol
  // missing is a baseline long double compatibility symbol, skip.
- string version_name(i->second.version_name);
+ string version_name(i->second.version_name.size()
+ ? i->second.version_name : i->first);
  bool base_ld(version_name.find("_LDBL_") != std::string::npos);
- if (!base_ld || base_ld && ld_version_found)
+ bool base_ieee(version_name.find("_IEEE128_") != std::string::npos);
+ if ((!base_ld || (base_ld && ld_version_found))
+ && (!base_ieee || (base_ieee && ieee_version_found)))
missing_names.push_back(name);
}
 }
--- libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt.jj
2021-04-17 11:31:24.925645956 +0200
+++ libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt   
2021-04-19 14:14:41.285233539 +0200
@@ -548,6 +548,124 @@ FUNC:_ZNKSt15basic_streambufIwSt11char_t
 FUNC:_ZNKSt15basic_stringbufIcSt11char_traitsIcESaIcEE3strEv@@GLIBCXX_3.4
 FUNC:_ZNKSt15basic_stringbufIwSt11char_traitsIwESaIwEE3strEv@@GLIBCXX_3.4
 FUNC:_ZNKSt16bad_array_length4whatEv@@CXXABI_1.3.8
+FUNC:_ZNKSt17__gnu_cxx_ieee1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIjEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_@@GLIBCXX_IEEE128_3.4.29
+FUNC:_ZNKSt17__gnu_cxx_ieee1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIlEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_@@GLIBCXX_IEEE128_3.4.29
+FUNC:_ZNKSt17__gnu_cxx_ieee1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intImEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_@@GLIBCXX_IEEE128_3.4.29
+FUNC:_ZNKSt17__gnu_cxx_ieee1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intItEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_@@GLIBCXX_IEEE128_3.4.29
+FUNC:_ZNKSt17__gnu_cxx_ieee1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIxEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_@@GLIBCXX_IEEE128_3.4.29
+FUNC:_ZNKSt17__gnu_cxx_ieee1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIyEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_@@GLIBCXX_IEEE128_3.4.29
+FUNC:_ZNKSt17__gnu_cxx_ieee1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE16_M_extract_floatES4_S4_RSt8ios_baseRSt12_Ios_IostateRSs@@GLIBCXX_IEEE128_3.4.29
+FUNC:_ZNKSt17__gnu_cxx_ieee1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE3getES4_S4_RSt8ios_baseRSt12_Ios_IostateRPv@@GLIBCXX_IEEE128_3.4.29
+FUNC:_ZNKSt