]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
a68: document libgc minimum version and feature-check GC_is_init_called [PR algol68...
authorJose E. Marchesi <jemarch@gnu.org>
Sat, 24 Jan 2026 16:47:41 +0000 (17:47 +0100)
committerJose E. Marchesi <jemarch@gnu.org>
Sat, 24 Jan 2026 16:47:41 +0000 (17:47 +0100)
Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>
gcc/algol68/ChangeLog

PR algol68/123733
* README: Mention minimum version of libgc.

libga68/ChangeLog

PR algol68/123733
* configure.ac: Check for GC_is_init_called in libgc.
* configure: Regenerate.

gcc/algol68/README
libga68/configure
libga68/configure.ac

index 9d1595ad8d8c4cac0e4834a9f9ba668aec99034a..5e9660b6ec01bac053ff6f0d53761592daa614c5 100644 (file)
@@ -26,6 +26,14 @@ The compiler proper is called `a681'.
 Programs built by this compiler make use of the libga68 run-time
 library.
 
+Dependencies
+============
+
+The Algol 68 run-time relies on the Boehm-Demers-Weiser conservative
+garbage collector libgc, version 7.6.2 or later.  If for whatever
+reason a recent enough of libgc is not available for some target then
+you can configure GCC with --disable-algol68-gc.
+
 Building
 ========
 
index fb14f39eb2b3849b060a237ddd9d907ef6d0c67f..01dc61e2d592345b899d152e4733c6657ed75a98 100755 (executable)
@@ -13660,7 +13660,7 @@ GC_init()
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
 
-        if test "$cross_compiling" = yes; then :
+                        if test "$cross_compiling" = yes; then :
             system_bdw_gc_found=no
 
 else
@@ -13669,7 +13669,8 @@ else
 
           #include <gc/gc.h>
           int main() {
-            GC_init();
+            if (!GC_is_init_called ())
+               GC_init();
             return 0;
           }
 
@@ -13692,11 +13693,11 @@ rm -f core conftest.err conftest.$ac_objext \
     CFLAGS=$save_CFLAGS
     LIBS=$save_LIBS
     if test x$enable_algol68_gc = xauto && test x$system_bdw_gc_found = xno; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: system bdw-gc not found, building libga68 with no GC support" >&5
-$as_echo "$as_me: WARNING: system bdw-gc not found, building libga68 with no GC support" >&2;}
+      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: usable system bdw-gc not found, building libga68 with no GC support" >&5
+$as_echo "$as_me: WARNING: usable system bdw-gc not found, building libga68 with no GC support" >&2;}
       use_bdw_gc=no
     elif test x$enable_algol68_gc = xyes && test x$system_bdw_gc_found = xno; then
-      as_fn_error $? "system bdw-gc required but not found" "$LINENO" 5
+      as_fn_error $? "usable system bdw-gc required but not found" "$LINENO" 5
     else
       use_bdw_gc=yes
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
index 244ca1d8cb231a654f5b4cf95704549c562fa1e4..96b23f4a89bcb54e8787a976e93c4081b8979055 100644 (file)
@@ -356,10 +356,13 @@ no)
     AC_LINK_IFELSE(
       [AC_LANG_PROGRAM([#include <gc/gc.h>],[GC_init()])],
       [
+        dnl Make sure to include GC_is_init_called and any other
+        dnl feature that may require a "recent" libgc.
         AC_RUN_IFELSE([AC_LANG_SOURCE([[
           #include <gc/gc.h>
           int main() {
-            GC_init();
+            if (!GC_is_init_called ())
+               GC_init();
             return 0;
           }
           ]])],
@@ -373,10 +376,10 @@ no)
     CFLAGS=$save_CFLAGS
     LIBS=$save_LIBS
     if test x$enable_algol68_gc = xauto && test x$system_bdw_gc_found = xno; then
-      AC_MSG_WARN([system bdw-gc not found, building libga68 with no GC support])
+      AC_MSG_WARN([usable system bdw-gc not found, building libga68 with no GC support])
       use_bdw_gc=no
     elif test x$enable_algol68_gc = xyes && test x$system_bdw_gc_found = xno; then
-      AC_MSG_ERROR([system bdw-gc required but not found])
+      AC_MSG_ERROR([usable system bdw-gc required but not found])
     else
       use_bdw_gc=yes
       AC_MSG_RESULT([found])