libgo patch committed: Skip type descriptors in testsuite script

Message ID
State New
Headers show
  • libgo patch committed: Skip type descriptors in testsuite script
Related show

Commit Message

Ian Lance Taylor Jan. 23, 2020, 4:53 a.m.
This libgo patch changes the testsuite script to explicitly skip type
descriptors.  Type descriptors are normally weak and GNU nm will
report them as V, so we will skip them when collecting the list of
symbols.  But when not using GNU nm, they may be reported as D, so
also skip them in symstogo.  This fixes go/doc/check on Solaris.
Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu.  Committed
to mainline.



diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index a778a8540a5..a8ba3afe86e 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@ 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
diff --git a/libgo/testsuite/gotest b/libgo/testsuite/gotest
index de4a392b8cd..33f99d77a31 100755
--- a/libgo/testsuite/gotest
+++ b/libgo/testsuite/gotest
@@ -517,6 +517,11 @@  symtogo() {
     if expr "$tp" : '^\.' >/dev/null 2>&1; then
+    # Skip type descriptors.  These are normally skipped because they
+    # are weak symbols, but if not using GNU nm we may see them here.
+    if expr "$tp" : '^type\.\.' >/dev/null 2>&1; then
+      continue
+    fi
     s=$(echo "$tp" | sed -e 's/\.\.z2f/%/g' | sed -e 's/.*%//')
     # Screen out methods (X.Y.Z).
     if ! expr "$s" : '^[^.]*\.[^.]*$' >/dev/null 2>&1; then