libgcobol/ChangeLog
* Makefile.in: New file.
* acinclude.m4: New file.
* aclocal.m4: New file.
* configure.ac: New file.
* configure.tgt: New file.
I had updated the configure.tgt, please find it attached here again.
also disabling cobol in the toplevel configury seems to be strange.
+# It's early days for COBOL, and it is known to compile on only some
host and
+# target systems. We remove COBOL from other builds with a warning.
+
+cobol_is_okay_host="no"
+cobol_is_okay_target="no"
+
+case "${host}" in
+ x86_64-*-*)
+ cobol_is_okay_host="yes"
+ ;;
+ aarch64-*-*)
+ cobol_is_okay_host="yes"
+ ;;
+esac
+case "${target}" in
+ x86_64-*-*)
+ cobol_is_okay_target="yes"
+ ;;
+ aarch64-*-*)
+ cobol_is_okay_target="yes"
+ ;;
+esac
+
+if test "$cobol_is_okay_host" = "no" || test "$cobol_is_okay_target" =
"no"; then
+ if echo "${new_enable_languages}" | grep "cobol" >/dev/null 2>&1; then
+ echo "WARNING: cobol is not available on this host or target"
+ new_enable_languages=`echo "${new_enable_languages}" | sed s/,cobol//g`
+ fi
+fi
+
I don't see that for other languages. It's also missing the
powerpc64le-linux-gnu target, where it builds as well.
Matthias
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -742,6 +742,23 @@ if test -d ${srcdir}/libphobos; then
fi
fi
+# Disable libgcobol on unsupported systems.
+# For testing, you can override this with --enable-libgcobol.
+if test -d ${srcdir}/libgcobol; then
+ if test x$enable_libgcobol = x; then
+ AC_MSG_CHECKING([for libgcobol support])
+ if (srcdir=${srcdir}/libgcobol; \
+ . ${srcdir}/configure.tgt; \
+ test "$LIBGCOBOL_SUPPORTED" != "yes")
+ then
+ AC_MSG_RESULT([no])
+ noconfigdirs="$noconfigdirs target-libgcobol"
+ else
+ AC_MSG_RESULT([yes])
+ fi
+ fi
+fi
+
# Disable Fortran for some systems.
case "${target}" in
mmix-*-*)
--- a/src/libgcobol/configure.ac
+++ b/src/libgcobol/configure.ac
@@ -33,6 +33,8 @@ AC_SUBST(VERSION)
# exported.
ORIGINAL_LD_FOR_MULTILIBS=$LD
+. ${srcdir}/configure.tgt
+
# -------
# Options
# -------
--- /dev/null
+++ b/src/libgcobol/configure.tgt
@@ -0,0 +1,42 @@
+# -*- shell-script -*-
+# Copyright (C) 2025 Free Software Foundation, Inc.
+#
+# GCC is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GCC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+# This is the target specific configuration file. This is invoked by the
+# autoconf generated configure script. Putting it in a separate shell file
+# lets us skip running autoconf when modifying target specific information.
+
+# Disable the libphobos or libdruntime components on untested or known
+# broken systems. More targets shall be added after testing.
+
+LIBGCOBOL_SUPPORTED=no
+
+case "${target}" in
+ aarch64*-*-linux*)
+ LIBGCOBOL_SUPPORTED=yes
+ ;;
+ powerpc64le-*-linux*)
+ LIBGCOBOL_SUPPORTED=yes
+ ;;
+ x86_64-*-linux*x32)
+ LIBGCOBOL_SUPPORTED=no
+ ;;
+ x86_64-*-linux*)
+ if test x$ac_cv_sizeof_void_p = x8; then
+ LIBGCOBOL_SUPPORTED=yes
+ fi
+ ;;
+esac