ac_has_sched_yield is a bit of a misnomer in libstdc++-v3, as it
guards the __gthread_yield call.  That call is implemented on VxWorks,
even where it doesn't support POSIX sched_yield() proper.  So enable
it.

Regstrapped on x86_64-linux-gnu.  Also tested with various vxworks ports
with gcc-15 and earlier.  I'm going to put this in shortly.


for  libstdc++-v3/ChangeLog

        * acinclude.m4 (GLIBXX_ENABLE_LIBSTDCXX_TIME) [vxworks*]:
        Enable __gthread_yield.
        * configure: Rebuilt.
---
 libstdc++-v3/acinclude.m4 |    1 +
 libstdc++-v3/configure    |    3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index 13fb32af1e303..f8899119d18d7 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -1788,6 +1788,7 @@ AC_DEFUN([GLIBCXX_ENABLE_LIBSTDCXX_TIME], [
         ac_has_clock_monotonic=yes
         ac_has_clock_realtime=yes
         ac_has_nanosleep=yes
+        ac_has_sched_yield=yes
         ;;
       gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
         # Don't use link test for freestanding library, in case gcc_no_link=yes
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 7c921ed282a27..acdec92531401 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -21487,6 +21487,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
         ac_has_clock_monotonic=yes
         ac_has_clock_realtime=yes
         ac_has_nanosleep=yes
+        ac_has_sched_yield=yes
         ;;
       gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
         # Don't use link test for freestanding library, in case gcc_no_link=yes
@@ -54158,7 +54159,7 @@ $as_echo "$glibcxx_cv_libbacktrace_atomics" >&6; }
     CXXFLAGS='-O0 -S'
 
     cat > conftest.$ac_ext << EOF
-#line 54161 "configure"
+#line 54162 "configure"
 #include <stddef.h>
 int main()
 {

-- 
Alexandre Oliva, happy hacker            https://blog.lx.oliva.nom.br/
Free Software Activist     FSFLA co-founder     GNU Toolchain Engineer
More tolerance and less prejudice are key for inclusion and diversity.
Excluding neuro-others for not behaving ""normal"" is *not* inclusive!

Reply via email to