From 1e63af8f53e5a28ef71a3f15cf68e889d838d7dd Mon Sep 17 00:00:00 2001
From: Bob Dubner <rdubner@symas.com>
Date: Thu, 6 Feb 2025 14:34:40 -0500
Subject: [PATCH] Compile libgcobol iff --enable-languages=...,cobol

---
 gcc/cobol/config-lang.in | 30 ++++++++++++++++++++++++++----
 1 file changed, 26 insertions(+), 4 deletions(-)

diff --git a/gcc/cobol/config-lang.in b/gcc/cobol/config-lang.in
index 4098105135f3..bbaf7c91bab4 100644
--- a/gcc/cobol/config-lang.in
+++ b/gcc/cobol/config-lang.in
@@ -1,17 +1,39 @@
+# Copyright (C) 2004-2025 Free Software Foundation, Inc.
+#
+# This file is part of GCC.
+#
+# 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/>.
+
+# Configure looks for the existence of this file to auto-config each language.
+# We define several parameters used by configure:
+#
+# language	- name of language as it would appear in $(LANGUAGES)
+# compilers	- value to add to $(COMPILERS)
+# diff_excludes	- files to ignore when building diffs between two versions.
+
 language="cobol"
 
 compilers="cobol1\$(exeext)"
 
-target_libs="libgcobol.a"
+target_libs="target-libgcobol"
 
 # Files that should be scanned by gengtype.c to generate the garbage
 # collection tables.  Not obviously needed.
 
 gtfiles="\$(srcdir)/cobol/cobol1.cc"
 
-# We might write (some of) the cobol FE in C++
-#### lang_requires_boot_languages=c++
-
 # Do not build by default
 build_by_default="no"
 
-- 
GitLab