Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2196506/?format=api
{ "id": 2196506, "url": "http://patchwork.ozlabs.org/api/patches/2196506/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/aZBMvxCXEAuL7G8z@tucnak/", "project": { "id": 17, "url": "http://patchwork.ozlabs.org/api/projects/17/?format=api", "name": "GNU Compiler Collection", "link_name": "gcc", "list_id": "gcc-patches.gcc.gnu.org", "list_email": "gcc-patches@gcc.gnu.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<aZBMvxCXEAuL7G8z@tucnak>", "list_archive_url": null, "date": "2026-02-14T10:21:51", "name": "libgcobol: Add --with-target-libxml2{,-lib,-include}= configure options [PR122839]", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "d817d2be760ae06d6f22c97ea0bac0c2de921528", "submitter": { "id": 671, "url": "http://patchwork.ozlabs.org/api/people/671/?format=api", "name": "Jakub Jelinek", "email": "jakub@redhat.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/aZBMvxCXEAuL7G8z@tucnak/mbox/", "series": [ { "id": 492166, "url": "http://patchwork.ozlabs.org/api/series/492166/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=492166", "date": "2026-02-14T10:21:51", "name": "libgcobol: Add --with-target-libxml2{,-lib,-include}= configure options [PR122839]", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/492166/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2196506/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2196506/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "gcc-patches@gcc.gnu.org" ], "Delivered-To": [ "patchwork-incoming@legolas.ozlabs.org", "gcc-patches@gcc.gnu.org" ], "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=gqJl9V9Q;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=2620:52:6:3111::32; helo=vm01.sourceware.org;\n envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org;\n receiver=patchwork.ozlabs.org)", "sourceware.org;\n\tdkim=pass (1024-bit key,\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=gqJl9V9Q", "sourceware.org; dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com", "sourceware.org; spf=pass smtp.mailfrom=redhat.com", "server2.sourceware.org;\n arc=none smtp.remote-ip=170.10.129.124" ], "Received": [ "from vm01.sourceware.org (vm01.sourceware.org\n [IPv6:2620:52:6:3111::32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fClVP0k0lz1xr1\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 14 Feb 2026 21:22:46 +1100 (AEDT)", "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 0F6D34BAD15A\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 14 Feb 2026 10:22:33 +0000 (GMT)", "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by sourceware.org (Postfix) with ESMTP id 76FE84BA23C7\n for <gcc-patches@gcc.gnu.org>; Sat, 14 Feb 2026 10:22:01 +0000 (GMT)", "from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-673-J429S8grMwuigXplhsMeZQ-1; Sat,\n 14 Feb 2026 05:21:57 -0500", "from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 6F17819560AA; Sat, 14 Feb 2026 10:21:56 +0000 (UTC)", "from tucnak.zalov.cz (unknown [10.44.32.49])\n by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with\n ESMTPS\n id B381E180066F; Sat, 14 Feb 2026 10:21:55 +0000 (UTC)", "from tucnak.zalov.cz (localhost [127.0.0.1])\n by tucnak.zalov.cz (8.18.1/8.18.1) with ESMTPS id 61EALq2f1331038\n (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT);\n Sat, 14 Feb 2026 11:21:52 +0100", "(from jakub@localhost)\n by tucnak.zalov.cz (8.18.1/8.18.1/Submit) id 61EALp821331035;\n Sat, 14 Feb 2026 11:21:51 +0100" ], "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 sourceware.org 0F6D34BAD15A", "OpenDKIM Filter v2.11.0 sourceware.org 76FE84BA23C7" ], "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 76FE84BA23C7", "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 76FE84BA23C7", "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1771064521; cv=none;\n b=XKC4abb4pLtRdSK2vg7YvCBwAtUEb49UQ5rsVOsbf7tdP7zLWigAkdzCVwN22+ahnLDH+P16odaq4Nt2GVPh9AkxeAhC73653S+ZEYN8dbaDSv1aufB1xZ+FGlSdGVess+8j0U0y8GEpRulHN3tXW77DYNuffI3WTrr6oZXOulc=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1771064521; c=relaxed/simple;\n bh=PG6d7ZHjlCtluFmV6f5p92AEzFjpobYZ/KcqN69IxXU=;\n h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version;\n b=V/Fey587fHNs76uVghlsgc5F9cSHqT8BlbwpsjM/kJrGxkoMIoQhSa+Tj0Abj6/JlSQRLsevSILGBxjA2RwsM/d6WgG0+0wywUP+VaIYBgeF9L5PJQfPMhUEJeiw61I91ri4HvMlZXp15kb7hc97lZ+iP2ibAih3uCxTAgH1Uf4=", "ARC-Authentication-Results": "i=1; server2.sourceware.org", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1771064521;\n h=from:from:reply-to:reply-to:subject:subject:date:date:\n message-id:message-id:to:to:cc:cc:mime-version:mime-version:\n content-type:content-type; bh=ycEplFxW6Eptpem09tDT5H9ECJgD184uqUDnzXeH3fw=;\n b=gqJl9V9Q43MB719z2foIhmNv+13/2egoXl0wIruUQKz3Y/qKR2s0nDO0j3w7fKTnwSSoNE\n ifE0zWGyBuh2Yqe2AM8FK1UPp1oDOxXgFJQrwZ+GF3j77A34dZnLl9x8imps2j2uxoagtp\n TqrPIJTClGKTcPnjwQJrDXl0an7pxuw=", "X-MC-Unique": "J429S8grMwuigXplhsMeZQ-1", "X-Mimecast-MFC-AGG-ID": "J429S8grMwuigXplhsMeZQ_1771064516", "Date": "Sat, 14 Feb 2026 11:21:51 +0100", "From": "Jakub Jelinek <jakub@redhat.com>", "To": "Robert Dubner <rdubner@symas.com>,\n \"James K. Lowden\" <jklowden@cobolworx.com>", "Cc": "gcc-patches@gcc.gnu.org", "Subject": "[PATCH] libgcobol: Add --with-target-libxml2{,-lib,-include}=\n configure options [PR122839]", "Message-ID": "<aZBMvxCXEAuL7G8z@tucnak>", "MIME-Version": "1.0", "X-Scanned-By": "MIMEDefang 3.4.1 on 10.30.177.93", "X-Mimecast-Spam-Score": "0", "X-Mimecast-MFC-PROC-ID": "yHvqlo_Qlh_OVCmEplJSddayD_Rqivhie7zb02juNvE_1771064516", "X-Mimecast-Originator": "redhat.com", "Content-Type": "text/plain; charset=us-ascii", "Content-Disposition": "inline", "X-BeenThere": "gcc-patches@gcc.gnu.org", "X-Mailman-Version": "2.1.30", "Precedence": "list", "List-Id": "Gcc-patches mailing list <gcc-patches.gcc.gnu.org>", "List-Unsubscribe": "<https://gcc.gnu.org/mailman/options/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe>", "List-Archive": "<https://gcc.gnu.org/pipermail/gcc-patches/>", "List-Post": "<mailto:gcc-patches@gcc.gnu.org>", "List-Help": "<mailto:gcc-patches-request@gcc.gnu.org?subject=help>", "List-Subscribe": "<https://gcc.gnu.org/mailman/listinfo/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe>", "Reply-To": "Jakub Jelinek <jakub@redhat.com>", "Errors-To": "gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org" }, "content": "Hi!\n\nThe following patch adds new configure options similar to ObjC/Algol68\n--with-bdw-gc{,-lib,-include}= configure options where one can override\nthe default of -I /usr/include/libxml2 and -lxml2 for finding libxml2\nheaders and library. Similarly to the bdw-gc options, the override can\nbe for all multilibs or just specific to each multilib.\n\nBootstrapped/regtested on x86_64-linux and i686-linux without any of the\nnew options on the configure line, and tested also with\n../configure --enable-languages=c,c++,cobol --with-target-libxml2=/tmp/libxml2 \\\n--disable-bootstrap --disable-libsanitizer --disable-libgomp\nOk for trunk?\n\n2026-02-14 Jakub Jelinek <jakub@redhat.com>\n\n\tPR cobol/122839\n\t* configure.ac (--with-target-libxml2, --with-target-libxml2-include,\n\t--with-target-libxml2-lib): New configure options, use those to find\n\tlibxml2. \n\t(LIBXML2_CPPFLAGS, LIBXML2_LIBS): New AC_SUBSTs.\n\t* Makefile.am (AM_CPPFLAGS): Add $(LIBXML2_CPPFLAGS) rather than\n\t-I /usr/include/libxml2.\n\t(libgcobol_la_LDFLAGS): Add $(LIBXML2_LIBS).\n\t* configure: Regenerate.\n\t* config.h.in: Regenerate.\n\t* Makefile.in: Regenerate.\n\n\t* doc/install.texi (COBOL-Specific Options): New.\n\n\n\tJakub", "diff": "--- libgcobol/configure.ac.jj\t2025-11-29 17:28:45.753139094 +0100\n+++ libgcobol/configure.ac\t2026-02-13 12:52:26.475053320 +0100\n@@ -233,14 +233,102 @@ libgcobol_have_cacosf128=no\n AC_SEARCH_LIBS([cacosf128], [c m], libgcobol_have_cacosf128=yes)\n \n # These are libxml2.\n-AC_CHECK_LIB(xml2, xmlSAXUserParseMemory,\n- [LIBS=\"-lxml2 $LIBS\"\n- AC_DEFINE(HAVE_SAX_XML_PARSER, 1,\n-\t [Define to 1 if you have the `xmlSAXUserParseMemory' function.])])\n-AC_CHECK_LIB(xml2, xmlParseChunk,\n- [LIBS=\"-lxml2 $LIBS\"\n- AC_DEFINE(HAVE_SAX_XML_PARSER, 1,\n-\t [Define to 1 if you have the `xmlParseChunk' function.])])\n+AC_ARG_WITH([target-libxml2],\n+[AS_HELP_STRING([--with-target-libxml2=PATHLIST],\n+\t\t[specify prefix directory for installed libxml2 package.\n+\t\t Equivalent to --with-target-libxml2-include=PATH/include\n+\t\t plus --with-target-libxml2-lib=PATH/lib])])\n+AC_ARG_WITH([target-libxml2-include],\n+[AS_HELP_STRING([--with-target-libxml2-include=PATHLIST],\n+\t\t[specify directories for installed libxml2 include files])])\n+AC_ARG_WITH([target-libxml2-lib],\n+[AS_HELP_STRING([--with-target-libxml2-lib=PATHLIST],\n+\t\t[specify directories for installed libxml2 library])])\n+\n+if test \"x$use_libgcobol\" = xyes && test \"x$libgcobol_cv_have_int128\" = xyes; then\n+ AC_MSG_CHECKING([for libxml2])\n+ if test \"x$with_target_libxml2$with_target_libxml2_include$with_target_libxml2_lib\" = x; then\n+ dnl no libxml2 options, assuming libxml2 in default locations\n+ LIBXML2_CPPFLAGS=\"-I /usr/include/libxml2\"\n+ LIBXML2_LIBS=\"-lxml2\"\n+ else\n+ dnl libxml2 options passed by configure flags\n+ if test \"x$with_target_libxml2_include\" = x && test \"x$with_target_libxml2_lib\" != x; then\n+ AC_MSG_ERROR([found --with-target-libxml2-lib but --with-target-libxml2-include missing])\n+ elif test \"x$with_target_libxml2_include\" != x && test \"x$with_target_libxml2_lib\" = x; then\n+ AC_MSG_ERROR([found --with-target-libxml2-include but --with-target-libxml2-lib missing])\n+ else\n+ AC_MSG_RESULT([using paths configured with --with-target-libxml2 options])\n+ fi\n+ mldir=`${CC-gcc} --print-multi-directory 2>/dev/null`\n+ libxml2_val=\n+ if test \"x$with_target_libxml2\" != x; then\n+ for i in `echo $with_target_libxml2 | tr ',' ' '`; do\n+ case \"$i\" in\n+ *=*) sd=${i%%=*}; d=${i#*=} ;;\n+ *) sd=.; d=$i ;;\n+ esac\n+ if test \"$mldir\" = \"$sd\"; then\n+ libxml2_val=$d\n+ fi\n+ done\n+ if test \"x$libxml2_val\" = x; then\n+ AC_MSG_ERROR([no multilib path ($mldir) found in --with-target-libxml2])\n+ fi\n+ libxml2_inc_dir=\"$libxml2_val/include\"\n+ libxml2_lib_dir=\"$libxml2_val/lib\"\n+ fi\n+ libxml2_val=\n+ if test \"x$with_target_libxml2_include\" != x; then\n+ for i in `echo $with_target_libxml2_include | tr ',' ' '`; do\n+ case \"$i\" in\n+ *=*) sd=${i%%=*}; d=${i#*=} ;;\n+ *) sd=.; d=$i; fallback=$i ;;\n+ esac\n+ if test \"$mldir\" = \"$sd\"; then\n+ libxml2_val=$d\n+ fi\n+ done\n+ if test \"x$libxml2_val\" = x && test \"x$libxml2_inc_dir\" = x && test \"x$fallback\" != x; then\n+ libxml2_inc_dir=\"$fallback\"\n+ elif test \"x$libxml2_val\" = x; then\n+ AC_MSG_ERROR([no multilib path ($mldir) found in --with-target-libxml2-include])\n+ else\n+ libxml2_inc_dir=\"$libxml2_val\"\n+ fi\n+ fi\n+ libxml2_val=\n+ if test \"x$with_target_libxml2_lib\" != x; then\n+ for i in `echo $with_target_libxml2_lib | tr ',' ' '`; do\n+ case \"$i\" in\n+ *=*) sd=${i%%=*}; d=${i#*=} ;;\n+ *) sd=.; d=$i ;;\n+ esac\n+ if test \"$mldir\" = \"$sd\"; then\n+ libxml2_val=$d\n+ fi\n+ done\n+ if test \"x$libxml2_val\" = x; then\n+ AC_MSG_ERROR([no multilib path ($mldir) found in --with-target-libxml2-lib])\n+ fi\n+ libxml2_lib_dir=\"$libxml2_val\"\n+ fi\n+ if test \"x$libxml2_inc_dir\" = x; then\n+ AC_MSG_ERROR([no multilib path ($mldir) found in --with-target-libxml2-include])\n+ fi\n+ if test \"x$libxml2_lib_dir\" = x; then\n+ AC_MSG_ERROR([no multilib path ($mldir) found in --with-target-libxml2-lib])\n+ fi\n+ LIBXML2_CPPFLAGS=\"-I$libxml2_inc_dir\"\n+ LIBXML2_LIBS=\"-L$libxml2_lib_dir -lxml2\"\n+ AC_MSG_RESULT([found])\n+ fi\n+else\n+ LIBXML2_CPPFLAGS=\n+ LIBXML2_LIBS=\n+fi\n+AC_SUBST(LIBXML2_CPPFLAGS)\n+AC_SUBST(LIBXML2_LIBS)\n \n # Copied from gcc/configure.ac. 2025-06-05 R.J.Dubner\n # At least for glibc, clock_gettime is in librt. But don't pull that\n--- libgcobol/Makefile.am.jj\t2026-02-13 10:32:21.503992411 +0100\n+++ libgcobol/Makefile.am\t2026-02-13 12:54:49.278640762 +0100\n@@ -85,7 +85,7 @@ nobase_libsubinclude_HEADERS =\t\t\t\\\n WARN_CFLAGS = -W -Wall -Wwrite-strings\n \n AM_CPPFLAGS = -I. -I posix/shim $(LIBQUADINCLUDE)\n-AM_CPPFLAGS += -I /usr/include/libxml2\n+AM_CPPFLAGS += $(LIBXML2_CPPFLAGS)\n \n AM_CFLAGS = $(XCFLAGS)\n AM_CXXFLAGS = $(XCFLAGS)\n@@ -103,7 +103,7 @@ endif\n libgcobol_la_LINK = $(CXXLINK) $(libgcobol_la_LDFLAGS)\n version_arg = -version-info $(LIBGCOBOL_VERSION)\n libgcobol_la_LDFLAGS = $(LTLDFLAGS) $(LIBQUADLIB) $(LTLIBICONV) \\\n-\t$(extra_ldflags_libgcobol) $(LIBS) $(version_arg)\n+\t$(extra_ldflags_libgcobol) $(LIBS) $(LIBXML2_LIBS) $(version_arg)\n libgcobol_la_DEPENDENCIES = libgcobol.spec $(LIBQUADLIB_DEP)\n \n endif BUILD_LIBGCOBOL\n--- libgcobol/configure.jj\t2025-12-29 13:59:51.122075881 +0100\n+++ libgcobol/configure\t2026-02-13 12:53:58.624496524 +0100\n@@ -644,6 +644,8 @@ LIBQUADINCLUDE\n LIBQUADLIB_DEP\n LIBQUADLIB\n LIBQUADSPEC\n+LIBXML2_LIBS\n+LIBXML2_CPPFLAGS\n extra_ldflags_libgcobol\n LIBGCOBOL_VERSION\n BUILD_LIBGCOBOL_FALSE\n@@ -803,6 +805,9 @@ with_toolexeclibdir\n enable_rpath\n with_libiconv_prefix\n with_libiconv_type\n+with_target_libxml2\n+with_target_libxml2_include\n+with_target_libxml2_lib\n enable_libquadmath\n with_gcc_major_version_only\n '\n@@ -1472,6 +1477,16 @@ Optional Packages:\n --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib\n --without-libiconv-prefix don't search for libiconv in includedir and libdir\n --with-libiconv-type=TYPE type of library to search for (auto/static/shared)\n+ --with-target-libxml2=PATHLIST\n+ specify prefix directory for installed libxml2\n+ package. Equivalent to\n+ --with-target-libxml2-include=PATH/include plus\n+ --with-target-libxml2-lib=PATH/lib\n+ --with-target-libxml2-include=PATHLIST\n+ specify directories for installed libxml2 include\n+ files\n+ --with-target-libxml2-lib=PATHLIST\n+ specify directories for installed libxml2 library\n --with-gcc-major-version-only\n use only GCC major number in filesystem paths\n \n@@ -12199,7 +12214,7 @@ else\n lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2\n lt_status=$lt_dlunknown\n cat > conftest.$ac_ext <<_LT_EOF\n-#line 12202 \"configure\"\n+#line 12217 \"configure\"\n #include \"confdefs.h\"\n \n #if HAVE_DLFCN_H\n@@ -12305,7 +12320,7 @@ else\n lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2\n lt_status=$lt_dlunknown\n cat > conftest.$ac_ext <<_LT_EOF\n-#line 12308 \"configure\"\n+#line 12323 \"configure\"\n #include \"confdefs.h\"\n \n #if HAVE_DLFCN_H\n@@ -17666,99 +17681,111 @@ fi\n \n \n # These are libxml2.\n-{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for xmlSAXUserParseMemory in -lxml2\" >&5\n-$as_echo_n \"checking for xmlSAXUserParseMemory in -lxml2... \" >&6; }\n-if ${ac_cv_lib_xml2_xmlSAXUserParseMemory+:} false; then :\n- $as_echo_n \"(cached) \" >&6\n-else\n- ac_check_lib_save_LIBS=$LIBS\n-LIBS=\"-lxml2 $LIBS\"\n-if test x$gcc_no_link = xyes; then\n- as_fn_error $? \"Link tests are not allowed after GCC_NO_EXECUTABLES.\" \"$LINENO\" 5\n-fi\n-cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n-/* end confdefs.h. */\n \n-/* Override any GCC internal prototype to avoid an error.\n- Use char because int might match the return type of a GCC\n- builtin and then its argument prototype would still apply. */\n-#ifdef __cplusplus\n-extern \"C\"\n-#endif\n-char xmlSAXUserParseMemory ();\n-int\n-main ()\n-{\n-return xmlSAXUserParseMemory ();\n- ;\n- return 0;\n-}\n-_ACEOF\n-if ac_fn_cxx_try_link \"$LINENO\"; then :\n- ac_cv_lib_xml2_xmlSAXUserParseMemory=yes\n-else\n- ac_cv_lib_xml2_xmlSAXUserParseMemory=no\n-fi\n-rm -f core conftest.err conftest.$ac_objext \\\n- conftest$ac_exeext conftest.$ac_ext\n-LIBS=$ac_check_lib_save_LIBS\n+# Check whether --with-target-libxml2 was given.\n+if test \"${with_target_libxml2+set}\" = set; then :\n+ withval=$with_target_libxml2;\n fi\n-{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSAXUserParseMemory\" >&5\n-$as_echo \"$ac_cv_lib_xml2_xmlSAXUserParseMemory\" >&6; }\n-if test \"x$ac_cv_lib_xml2_xmlSAXUserParseMemory\" = xyes; then :\n- LIBS=\"-lxml2 $LIBS\"\n \n-$as_echo \"#define HAVE_SAX_XML_PARSER 1\" >>confdefs.h\n \n+# Check whether --with-target-libxml2-include was given.\n+if test \"${with_target_libxml2_include+set}\" = set; then :\n+ withval=$with_target_libxml2_include;\n fi\n \n-{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for xmlParseChunk in -lxml2\" >&5\n-$as_echo_n \"checking for xmlParseChunk in -lxml2... \" >&6; }\n-if ${ac_cv_lib_xml2_xmlParseChunk+:} false; then :\n- $as_echo_n \"(cached) \" >&6\n-else\n- ac_check_lib_save_LIBS=$LIBS\n-LIBS=\"-lxml2 $LIBS\"\n-if test x$gcc_no_link = xyes; then\n- as_fn_error $? \"Link tests are not allowed after GCC_NO_EXECUTABLES.\" \"$LINENO\" 5\n-fi\n-cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n-/* end confdefs.h. */\n \n-/* Override any GCC internal prototype to avoid an error.\n- Use char because int might match the return type of a GCC\n- builtin and then its argument prototype would still apply. */\n-#ifdef __cplusplus\n-extern \"C\"\n-#endif\n-char xmlParseChunk ();\n-int\n-main ()\n-{\n-return xmlParseChunk ();\n- ;\n- return 0;\n-}\n-_ACEOF\n-if ac_fn_cxx_try_link \"$LINENO\"; then :\n- ac_cv_lib_xml2_xmlParseChunk=yes\n-else\n- ac_cv_lib_xml2_xmlParseChunk=no\n-fi\n-rm -f core conftest.err conftest.$ac_objext \\\n- conftest$ac_exeext conftest.$ac_ext\n-LIBS=$ac_check_lib_save_LIBS\n+# Check whether --with-target-libxml2-lib was given.\n+if test \"${with_target_libxml2_lib+set}\" = set; then :\n+ withval=$with_target_libxml2_lib;\n fi\n-{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlParseChunk\" >&5\n-$as_echo \"$ac_cv_lib_xml2_xmlParseChunk\" >&6; }\n-if test \"x$ac_cv_lib_xml2_xmlParseChunk\" = xyes; then :\n- LIBS=\"-lxml2 $LIBS\"\n \n-$as_echo \"#define HAVE_SAX_XML_PARSER 1\" >>confdefs.h\n \n+if test \"x$use_libgcobol\" = xyes && test \"x$libgcobol_cv_have_int128\" = xyes; then\n+ { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for libxml2\" >&5\n+$as_echo_n \"checking for libxml2... \" >&6; }\n+ if test \"x$with_target_libxml2$with_target_libxml2_include$with_target_libxml2_lib\" = x; then\n+ LIBXML2_CPPFLAGS=\"-I /usr/include/libxml2\"\n+ LIBXML2_LIBS=\"-lxml2\"\n+ else\n+ if test \"x$with_target_libxml2_include\" = x && test \"x$with_target_libxml2_lib\" != x; then\n+ as_fn_error $? \"found --with-target-libxml2-lib but --with-target-libxml2-include missing\" \"$LINENO\" 5\n+ elif test \"x$with_target_libxml2_include\" != x && test \"x$with_target_libxml2_lib\" = x; then\n+ as_fn_error $? \"found --with-target-libxml2-include but --with-target-libxml2-lib missing\" \"$LINENO\" 5\n+ else\n+ { $as_echo \"$as_me:${as_lineno-$LINENO}: result: using paths configured with --with-target-libxml2 options\" >&5\n+$as_echo \"using paths configured with --with-target-libxml2 options\" >&6; }\n+ fi\n+ mldir=`${CC-gcc} --print-multi-directory 2>/dev/null`\n+ libxml2_val=\n+ if test \"x$with_target_libxml2\" != x; then\n+ for i in `echo $with_target_libxml2 | tr ',' ' '`; do\n+ case \"$i\" in\n+ *=*) sd=${i%%=*}; d=${i#*=} ;;\n+ *) sd=.; d=$i ;;\n+ esac\n+ if test \"$mldir\" = \"$sd\"; then\n+ libxml2_val=$d\n+ fi\n+ done\n+ if test \"x$libxml2_val\" = x; then\n+ as_fn_error $? \"no multilib path ($mldir) found in --with-target-libxml2\" \"$LINENO\" 5\n+ fi\n+ libxml2_inc_dir=\"$libxml2_val/include\"\n+ libxml2_lib_dir=\"$libxml2_val/lib\"\n+ fi\n+ libxml2_val=\n+ if test \"x$with_target_libxml2_include\" != x; then\n+ for i in `echo $with_target_libxml2_include | tr ',' ' '`; do\n+ case \"$i\" in\n+ *=*) sd=${i%%=*}; d=${i#*=} ;;\n+ *) sd=.; d=$i; fallback=$i ;;\n+ esac\n+ if test \"$mldir\" = \"$sd\"; then\n+ libxml2_val=$d\n+ fi\n+ done\n+ if test \"x$libxml2_val\" = x && test \"x$libxml2_inc_dir\" = x && test \"x$fallback\" != x; then\n+ libxml2_inc_dir=\"$fallback\"\n+ elif test \"x$libxml2_val\" = x; then\n+ as_fn_error $? \"no multilib path ($mldir) found in --with-target-libxml2-include\" \"$LINENO\" 5\n+ else\n+ libxml2_inc_dir=\"$libxml2_val\"\n+ fi\n+ fi\n+ libxml2_val=\n+ if test \"x$with_target_libxml2_lib\" != x; then\n+ for i in `echo $with_target_libxml2_lib | tr ',' ' '`; do\n+ case \"$i\" in\n+ *=*) sd=${i%%=*}; d=${i#*=} ;;\n+ *) sd=.; d=$i ;;\n+ esac\n+ if test \"$mldir\" = \"$sd\"; then\n+ libxml2_val=$d\n+ fi\n+ done\n+ if test \"x$libxml2_val\" = x; then\n+ as_fn_error $? \"no multilib path ($mldir) found in --with-target-libxml2-lib\" \"$LINENO\" 5\n+ fi\n+ libxml2_lib_dir=\"$libxml2_val\"\n+ fi\n+ if test \"x$libxml2_inc_dir\" = x; then\n+ as_fn_error $? \"no multilib path ($mldir) found in --with-target-libxml2-include\" \"$LINENO\" 5\n+ fi\n+ if test \"x$libxml2_lib_dir\" = x; then\n+ as_fn_error $? \"no multilib path ($mldir) found in --with-target-libxml2-lib\" \"$LINENO\" 5\n+ fi\n+ LIBXML2_CPPFLAGS=\"-I$libxml2_inc_dir\"\n+ LIBXML2_LIBS=\"-L$libxml2_lib_dir -lxml2\"\n+ { $as_echo \"$as_me:${as_lineno-$LINENO}: result: found\" >&5\n+$as_echo \"found\" >&6; }\n+ fi\n+else\n+ LIBXML2_CPPFLAGS=\n+ LIBXML2_LIBS=\n fi\n \n \n+\n # Copied from gcc/configure.ac. 2025-06-05 R.J.Dubner\n # At least for glibc, clock_gettime is in librt. But don't pull that\n # in if it still doesn't give us the function we want.\n--- libgcobol/config.h.in.jj\t2025-11-14 11:00:36.950839386 +0100\n+++ libgcobol/config.h.in\t2026-02-13 12:54:05.029908657 +0100\n@@ -55,9 +55,6 @@\n /* Define to 1 if you have the `random_r' function. */\n #undef HAVE_RANDOM_R\n \n-/* Define to 1 if you have the `xmlParseChunk' function. */\n-#undef HAVE_SAX_XML_PARSER\n-\n /* Define to 1 if you have the `setstate_r' function. */\n #undef HAVE_SETSTATE_R\n \n--- libgcobol/Makefile.in.jj\t2026-02-13 10:32:21.503992411 +0100\n+++ libgcobol/Makefile.in\t2026-02-13 12:54:56.534641774 +0100\n@@ -312,6 +312,8 @@ LIBQUADLIB_DEP = @LIBQUADLIB_DEP@\n LIBQUADSPEC = @LIBQUADSPEC@\n LIBS = @LIBS@\n LIBTOOL = @LIBTOOL@\n+LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@\n+LIBXML2_LIBS = @LIBXML2_LIBS@\n LIPO = @LIPO@\n LLVM_CONFIG = @LLVM_CONFIG@\n LN_S = @LN_S@\n@@ -454,8 +456,7 @@ gcc_version := $(shell @get_gcc_base_ver\n \n @BUILD_LIBGCOBOL_TRUE@WARN_CFLAGS = -W -Wall -Wwrite-strings\n @BUILD_LIBGCOBOL_TRUE@AM_CPPFLAGS = -I. -I posix/shim \\\n-@BUILD_LIBGCOBOL_TRUE@\t$(LIBQUADINCLUDE) -I \\\n-@BUILD_LIBGCOBOL_TRUE@\t/usr/include/libxml2\n+@BUILD_LIBGCOBOL_TRUE@\t$(LIBQUADINCLUDE) $(LIBXML2_CPPFLAGS)\n @BUILD_LIBGCOBOL_TRUE@AM_CFLAGS = $(XCFLAGS)\n @BUILD_LIBGCOBOL_TRUE@AM_CXXFLAGS = $(XCFLAGS) $(WARN_CFLAGS) \\\n @BUILD_LIBGCOBOL_TRUE@\t-DIN_TARGET_LIBS -fstrict-aliasing \\\n@@ -465,7 +466,7 @@ gcc_version := $(shell @get_gcc_base_ver\n @BUILD_LIBGCOBOL_TRUE@libgcobol_la_LINK = $(CXXLINK) $(libgcobol_la_LDFLAGS)\n @BUILD_LIBGCOBOL_TRUE@version_arg = -version-info $(LIBGCOBOL_VERSION)\n @BUILD_LIBGCOBOL_TRUE@libgcobol_la_LDFLAGS = $(LTLDFLAGS) $(LIBQUADLIB) $(LTLIBICONV) \\\n-@BUILD_LIBGCOBOL_TRUE@\t$(extra_ldflags_libgcobol) $(LIBS) $(version_arg)\n+@BUILD_LIBGCOBOL_TRUE@\t$(extra_ldflags_libgcobol) $(LIBS) $(LIBXML2_LIBS) $(version_arg)\n \n @BUILD_LIBGCOBOL_TRUE@libgcobol_la_DEPENDENCIES = libgcobol.spec $(LIBQUADLIB_DEP)\n all: config.h\n--- gcc/doc/install.texi.jj\t2026-01-31 10:16:31.970164455 +0100\n+++ gcc/doc/install.texi\t2026-02-13 13:04:57.409374772 +0100\n@@ -3063,6 +3063,31 @@ to be available for each multilib varian\n @samp{zlib} is only used when the system installed library is not available.\n @end table\n \n+@subheading COBOL-Specific Options\n+\n+The following options apply to the build of the COBOL runtime library.\n+\n+@table @code\n+@item --with-target-libxml2=@var{list}\n+@itemx --with-target-libxml2-include=@var{list}\n+@itemx --with-target-libxml2-lib=@var{list}\n+Specify search directories for the libxml2 header files and\n+libraries. @var{list} is a comma separated list of key value pairs of the\n+form @samp{@var{multilibdir}=@var{path}}, where the default multilib key\n+is named as @samp{.} (dot), or is omitted (e.g.@:\n+@samp{--with-target-libxml2=/opt/libxml2,32=/opt-libxml2-32}).\n+\n+The options @option{--with-target-libxml2-include} and\n+@option{--with-target-libxml2-lib} must always be specified together\n+for each multilib variant and they take precedence over\n+@option{--with-target-libxml2}. If @option{--with-target-libxml2-include}\n+is missing values for a multilib, then the value for the default\n+multilib is used (e.g.@: @samp{--with-target-libxml2-include=/opt/libxml2/include}\n+@samp{--with-target-libxml2-lib=/opt/libxml2/lib64,32=/opt-libxml2/lib32}).\n+If none of these options are specified, the library is assumed in\n+default locations.\n+@end table\n+\n @html\n <hr />\n <p>\n", "prefixes": [] }