https://gcc.gnu.org/g:1c50531c077a9b98a5533b4829c7bca4fc3ee544

commit r16-4589-g1c50531c077a9b98a5533b4829c7bca4fc3ee544
Author: Olivier Hainque <[email protected]>
Date:   Tue Jun 3 18:10:38 2025 -0300

    Adjust VxWorks special case in testsuite check_weak_available
    
    check_weak_available was reporting weak symbols unsupported
    for vxworks unconditionally while they are actually supported
    vxworks 7 now (assumed >= r2).  This change adjusts the
    predicate to reflect that.
    
    We used to believe we should distinguish kernel and rtp modes,
    and experiments showed that this distinction is actually
    counterproductive for the testsuite's purposes.
    
    This allows a few extra tests to run (and pass :), in particular
    in g++.dg/modules.
    
    2021-02-03  Olivier Hainque  <[email protected]>
    
    gcc/testsuite/
    
            * lib/target-supports.exp (check_weak_available):
            Return 1 for VxWorks7.

Diff:
---
 gcc/testsuite/lib/target-supports.exp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/gcc/testsuite/lib/target-supports.exp 
b/gcc/testsuite/lib/target-supports.exp
index 2d45ddaadc0f..f90cd26e6e66 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -336,10 +336,11 @@ proc check_weak_available { } {
        return 0
     }
 
-    # VxWorks hardly supports it (vx7 RTPs only)
-
+    # VxWorks supports it only since VxWorks 7 (assumed >= r2) for RTPs.
+    # Kernel mode works fine as well for our testsuite's purposes.
+ 
     if { [istarget *-*-vxworks*] } {
-       return 0
+       return [istarget *-*-vxworks7*]
     }
 
     # ELF and ECOFF support it. a.out does with gas/gld but may also with

Reply via email to