]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Adjust VxWorks special case in testsuite check_weak_available
authorOlivier Hainque <hainque@adacore.com>
Tue, 3 Jun 2025 21:10:38 +0000 (18:10 -0300)
committerOlivier Hainque <hainque@adacore.com>
Fri, 24 Oct 2025 07:22:32 +0000 (07:22 +0000)
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  <hainque@adacore.com>

gcc/testsuite/

* lib/target-supports.exp (check_weak_available):
Return 1 for VxWorks7.

gcc/testsuite/lib/target-supports.exp

index 2d45ddaadc0f7018389e876f4f89d511172d2c44..f90cd26e6e660b1a1d2aeff660b39cbf1874bbaf 100644 (file)
@@ -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