Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2195759/?format=api
{ "id": 2195759, "url": "http://patchwork.ozlabs.org/api/patches/2195759/?format=api", "web_url": "http://patchwork.ozlabs.org/project/glibc/patch/20260211191928.988805-4-adhemerval.zanella@linaro.org/", "project": { "id": 41, "url": "http://patchwork.ozlabs.org/api/projects/41/?format=api", "name": "GNU C Library", "link_name": "glibc", "list_id": "libc-alpha.sourceware.org", "list_email": "libc-alpha@sourceware.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260211191928.988805-4-adhemerval.zanella@linaro.org>", "list_archive_url": null, "date": "2026-02-11T18:55:30", "name": "[3/5] configure: Repurpose have-cc-with-libunwind for clang support", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "3853732e8f62c3b5637f8b5e504fbeeb49c90085", "submitter": { "id": 66065, "url": "http://patchwork.ozlabs.org/api/people/66065/?format=api", "name": "Adhemerval Zanella", "email": "adhemerval.zanella@linaro.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/glibc/patch/20260211191928.988805-4-adhemerval.zanella@linaro.org/mbox/", "series": [ { "id": 491898, "url": "http://patchwork.ozlabs.org/api/series/491898/?format=api", "web_url": "http://patchwork.ozlabs.org/project/glibc/list/?series=491898", "date": "2026-02-11T18:55:31", "name": "Enable glibc build with LLVM compiler-rt and libunwind", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/491898/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2195759/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2195759/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "libc-alpha@sourceware.org" ], "Delivered-To": [ "patchwork-incoming@legolas.ozlabs.org", "libc-alpha@sourceware.org" ], "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256\n header.s=google header.b=iWH4t66g;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org\n (client-ip=38.145.34.32; helo=vm01.sourceware.org;\n envelope-from=libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org;\n receiver=patchwork.ozlabs.org)", "sourceware.org;\n\tdkim=pass (2048-bit key,\n unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256\n header.s=google header.b=iWH4t66g", "sourceware.org;\n dmarc=pass (p=none dis=none) header.from=linaro.org", "sourceware.org; spf=pass smtp.mailfrom=linaro.org", "server2.sourceware.org;\n arc=none smtp.remote-ip=2607:f8b0:4864:20::b131" ], "Received": [ "from vm01.sourceware.org (vm01.sourceware.org [38.145.34.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 4fB7ZQ5Pl0z1xpY\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 12 Feb 2026 06:21:02 +1100 (AEDT)", "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id C6E464BA23D1\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 11 Feb 2026 19:21:00 +0000 (GMT)", "from mail-yx1-xb131.google.com (mail-yx1-xb131.google.com\n [IPv6:2607:f8b0:4864:20::b131])\n by sourceware.org (Postfix) with ESMTPS id 58D394BA23C6\n for <libc-alpha@sourceware.org>; Wed, 11 Feb 2026 19:19:42 +0000 (GMT)", "by mail-yx1-xb131.google.com with SMTP id\n 956f58d0204a3-64acd19e1dfso5084892d50.0\n for <libc-alpha@sourceware.org>; Wed, 11 Feb 2026 11:19:42 -0800 (PST)", "from mandiga.. ([2804:1b3:a7c2:42d3:8bd2:a06b:9b74:4887])\n by smtp.gmail.com with ESMTPSA id\n 956f58d0204a3-64afc9b5932sm2786042d50.21.2026.02.11.11.19.39\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 11 Feb 2026 11:19:40 -0800 (PST)" ], "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 sourceware.org C6E464BA23D1", "OpenDKIM Filter v2.11.0 sourceware.org 58D394BA23C6" ], "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 58D394BA23C6", "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 58D394BA23C6", "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1770837582; cv=none;\n b=Uv6jOps9NEsj3DFpzETT4HvRTn39s36w0irYJh7q3dkmeb1chPalSooWG1hRd3W4KLULNqqgCYbKgfBw4wc15C2RH2rHxQsSagjjDRw0GBFEcxWnsiTPiOlxT5vvSlmqRLCB1PGcC92orWOz9n6zXb5sM6/gm65ajpoVkDXD3ws=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1770837582; c=relaxed/simple;\n bh=fVAC7FueF0cRYdtdePNnR1PULC70mOdMr+8B9LUF+jw=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=o5cw1sV2bGJ8LyB2QmSBtymUBdSS86fRCcntqFjz3nMdXO/md3qZ9Qh6Erzz+u4NXUdCS7/SYUyuyuRhpFyKp/BV9te8fhfSihpJArg6zPZqleyn3135roNXto/lP5fCDMWvTvxIr/Keq3j9tSDAxaIm3QFAwwDpbuUBVVFehgM=", "ARC-Authentication-Results": "i=1; server2.sourceware.org", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1770837581; x=1771442381; darn=sourceware.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=5Rxo8meWfHRHpcucjXirpsApfLMEN4LUWn9psc8Yeaw=;\n b=iWH4t66gDj/g+uuCLeiVV5Im8ska9UWeIC3ZTy+OBMZmdYC14hy9vysenJwLyDXQdj\n Dm1xZARmNUIgK5AteIXwQnMu+Hq2kFqtzo6jFfPSWevljdSJ1DcaG56Ak+qeV9xgz3Gd\n lklsko4MrjIX/6I0/q1LxGQhiGMVCROqE+3HHcNax/lfg4bjcitiHtRv0djnV+L4uFWz\n BNTQvHgdpXMBxHzIVLfQa2Fi55EMs33ov/UxCz4ybQ25+FwsJKthd/IYNVdnXgm6gtOL\n Wyd3jBsMlDd3jeK2gdJ1xQ9XgzBsSw217c205ebk92hIaJiHRJbez2mgqRH5VmcAYS5G\n gSnA==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1770837581; x=1771442381;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=5Rxo8meWfHRHpcucjXirpsApfLMEN4LUWn9psc8Yeaw=;\n b=dE8oixfKU/xiWHGF2u7CMfiEjS+seVdCkCP57bWbSpXk9CX+U+3Y1RUEoSAAwHx+cc\n nBNPsJ7ct3BubQP9oWCJVJwlv4k2eANcbdcq6SZCG5R7Qed2WGy5aJ5n+N04O54C2ciz\n x89J5zeXBSHbX387A5xrgQ2V4PBHRmZUDmXqm2dtnP1jEveBQjPOQ/qOqa9KfBahcJTF\n k2JTS+/emxRbcyOBi336aILXEtJcrcLVV/yYz7lW90AWqstfpaCmIjKtEKv39zBUBGOn\n 9REffhwyqnj/DIY4WgrTHpB93Mv54qqvSTFBKoBJ0NsmzVg46aLRP+e1nmI4Tp1QcvPt\n NZFg==", "X-Gm-Message-State": "AOJu0YxCxF432i44n/hJs/TrcQizXVijPZdCRkPPUVGyRfjO5SNj68DU\n VSb5CK0vYwt/FUMx9dk08uVa9wkuJ6NWyeEJN6puXwezV/lPfzYC5qkZYxX8hXD+kQN1GCGfAjI\n eUEC61fQ=", "X-Gm-Gg": "AZuq6aIZu+lRG/uxEZ1MdnXrzQlo9Cp7uwLM/8L5gBapy3ff+dO5QFfm1riFIbDIm8+\n Pma8DbPTmG0ArPUAnUWEsWAtE812uTsCXuM029U85dqqeaAEHx7zBz/fbFo3hfQnAmn8xgjZErM\n bK25AXnc19Ohq8nsSZkjyavvmJizSVCSFWx2e4itYCYs2YmG/XYd8suCUwvGh+QmAQ2gapkE/si\n YEkfklbe5FS2LvRQzpT10Pwc6kss93eBf/cJyIo4ZJjiUYMBrkgmPCRqKzZUh5EBp02aaYdFQPa\n +sGqoj40OnLJydiROAunyvDN3xpnltrZCIlFyxfZaSl8iyjjplEKO9ygRddBcYdnrqghdHdv7wS\n R6COB16DIj9TCJTwatnmmYDd1P9dv8j55kC8pJPrJYDZKu2D91opNLh15U3pynZZedKW6ntf0Xl\n I9nh7G8/h2nkdLvGlzSIRrXzBdJQylP0Y5yGo=", "X-Received": "by 2002:a05:690e:1284:b0:649:d200:a7ff with SMTP id\n 956f58d0204a3-64bbaae042fmr352724d50.63.1770837581063;\n Wed, 11 Feb 2026 11:19:41 -0800 (PST)", "From": "Adhemerval Zanella <adhemerval.zanella@linaro.org>", "To": "libc-alpha@sourceware.org", "Cc": "Sam James <sam@gentoo.org>, Collin Funk <collin.funk1@gmail.com>,\n \"H . J . Lu\" <hjl.tools@gmail.com>", "Subject": "[PATCH 3/5] configure: Repurpose have-cc-with-libunwind for clang\n support", "Date": "Wed, 11 Feb 2026 15:55:30 -0300", "Message-ID": "<20260211191928.988805-4-adhemerval.zanella@linaro.org>", "X-Mailer": "git-send-email 2.43.0", "In-Reply-To": "<20260211191928.988805-1-adhemerval.zanella@linaro.org>", "References": "<20260211191928.988805-1-adhemerval.zanella@linaro.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "libc-alpha@sourceware.org", "X-Mailman-Version": "2.1.30", "Precedence": "list", "List-Id": "Libc-alpha mailing list <libc-alpha.sourceware.org>", "List-Unsubscribe": "<https://sourceware.org/mailman/options/libc-alpha>,\n <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe>", "List-Archive": "<https://sourceware.org/pipermail/libc-alpha/>", "List-Post": "<mailto:libc-alpha@sourceware.org>", "List-Help": "<mailto:libc-alpha-request@sourceware.org?subject=help>", "List-Subscribe": "<https://sourceware.org/mailman/listinfo/libc-alpha>,\n <mailto:libc-alpha-request@sourceware.org?subject=subscribe>", "Errors-To": "libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org" }, "content": "The `have-cc-with-libunwind` check (and its corresponding macro\nHAVE_CC_WITH_LIBUNWIND) was historically specific to IA64, intended\nto supplement libgcc with libunwind. Since this logic is unused in\ncurrent GCC configurations, this patch repurposes it to support\nclang-based toolchains that utilize LLVM's libunwind instead of\nlibgcc_s.\n\nThe configure script now detects if the compiler natively supports\nunwinding via `-lunwind`.\n\nAdditionally, when this mode is enabled, `-lclang_rt.builtins` is\nexplicitly added to the `libgcc_eh` definition. This is necessary\nbecause `links-dso-program` otherwise fails to link due to a missing\n`__gcc_personality_v0` symbol. It appears that clang does not\nautomatically link the builtins providing this personality routine\nwhen `rlink-path` is actively used during the build.\n---\n Makeconfig | 6 ++++--\n Makerules | 3 ++-\n config.make.in | 1 -\n configure | 24 +++++++++++-------------\n configure.ac | 21 ++++++++++-----------\n support/Makefile | 2 +-\n 6 files changed, 28 insertions(+), 29 deletions(-)", "diff": "diff --git a/Makeconfig b/Makeconfig\nindex 6a05e1d973..ea509dd3bc 100644\n--- a/Makeconfig\n+++ b/Makeconfig\n@@ -711,10 +711,12 @@ link-libc-static-tests = -Wl,--start-group $(common-objpfx)libc.a $(static-gnuli\n ifndef gnulib\n ifneq ($(have-cc-with-libunwind),yes)\n libunwind =\n+ libgcc_s = -lgcc_s\n else\n- libunwind = -lunwind\n+ libunwind = -lunwind $(libgcc-name)\n+ libgcc_s = $(libunwind)\n endif\n-libgcc_eh := -Wl,--as-needed -lgcc_s $(libunwind) -Wl,--no-as-needed\n+libgcc_eh := -Wl,--as-needed $(libgcc_s) -Wl,--no-as-needed\n gnulib-arch =\n gnulib = $(libgcc-name) $(gnulib-arch)\n gnulib-tests := $(libgcc-name) $(libgcc_eh)\ndiff --git a/Makerules b/Makerules\nindex 30c3559a28..180cbee251 100644\n--- a/Makerules\n+++ b/Makerules\n@@ -565,7 +565,8 @@ $(LINK.o) -shared -static-libgcc $(sysdep-LDFLAGS) $(rtld-LDFLAGS) \\\n \t -B$(csu-objpfx) $(load-map-file) \\\n \t $(LDFLAGS.so) $(LDFLAGS-$(@F:%.so=%).so) \\\n \t $(link-test-modules-rpath-link) \\\n-\t -L$(subst :, -L,$(rpath-link)) -Wl,-rpath-link=$(rpath-link)\n+\t -L$(subst :, -L,$(rpath-link)) -Wl,-rpath-link=$(rpath-link) \\\n+\t $(libgcc_eh)\n endef\n \n # This macro is similar to build-shlib but it does not define a soname\ndiff --git a/config.make.in b/config.make.in\nindex fca75ab5d3..42889716e4 100644\n--- a/config.make.in\n+++ b/config.make.in\n@@ -69,7 +69,6 @@ no-fortify-source = @no_fortify_source@\n have-selinux = @have_selinux@\n have-libaudit = @have_libaudit@\n have-libcap = @have_libcap@\n-have-cc-with-libunwind = @libc_cv_cc_with_libunwind@\n bind-now = @bindnow@\n have-cxx-thread_local = @libc_cv_cxx_thread_local@\n have-loop-to-function = @libc_cv_cc_loop_to_function@\ndiff --git a/configure b/configure\nindex 60103b8068..07445c7d95 100755\n--- a/configure\n+++ b/configure\n@@ -661,7 +661,6 @@ libc_cv_test_static_pie\n libc_cv_z_execstack\n libc_cv_test_no_error_execstack\n ASFLAGS_config\n-libc_cv_cc_with_libunwind\n libc_cv_insert\n libc_cv_protected_data\n INSTALL_INFO\n@@ -7069,32 +7068,31 @@ if test $libc_cv_have_sdata_section = yes; then\n \n fi\n \n-{ printf \"%s\\n\" \"$as_me:${as_lineno-$LINENO}: checking for libunwind-support in compiler\" >&5\n-printf %s \"checking for libunwind-support in compiler... \" >&6; }\n+{ printf \"%s\\n\" \"$as_me:${as_lineno-$LINENO}: checking whether the compiler links with libunwind\" >&5\n+printf %s \"checking whether the compiler links with libunwind... \" >&6; }\n if test ${libc_cv_cc_with_libunwind+y}\n then :\n printf %s \"(cached) \" >&6\n else case e in #(\n- e)\n- cat > conftest.c <<EOF\n+ e) cat > conftest.c <<EOF\n int main (void) { return 0; }\n EOF\n- if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -static -o conftest \\\n- conftest.c -v 2>&1 >/dev/null | grep ' -lunwind ' >/dev/null; then\n- libc_cv_cc_with_libunwind=yes\n- else\n- libc_cv_cc_with_libunwind=no\n- fi\n- rm -f conftest* ;;\n+libc_cv_cc_with_libunwind=no\n+if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -static -o conftest \\\n+ conftest.c -v 2>&1 | grep -e '-lunwind' -e 'libunwind' >/dev/null; then\n+ libc_cv_cc_with_libunwind=yes\n+fi\n+rm -f conftest* ;;\n esac\n fi\n { printf \"%s\\n\" \"$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_with_libunwind\" >&5\n printf \"%s\\n\" \"$libc_cv_cc_with_libunwind\" >&6; }\n-\n if test $libc_cv_cc_with_libunwind = yes; then\n printf \"%s\\n\" \"#define HAVE_CC_WITH_LIBUNWIND 1\" >>confdefs.h\n \n fi\n+config_vars=\"$config_vars\n+have-cc-with-libunwind = $libc_cv_cc_with_libunwind\"\n \n ASFLAGS_config=\n { printf \"%s\\n\" \"$as_me:${as_lineno-$LINENO}: checking whether --noexecstack is desirable for .S files\" >&5\ndiff --git a/configure.ac b/configure.ac\nindex add61dd826..4e138e09a1 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -1289,22 +1289,21 @@ if test $libc_cv_have_sdata_section = yes; then\n AC_DEFINE(HAVE_SDATA_SECTION)\n fi\n \n-AC_CACHE_CHECK(for libunwind-support in compiler,\n-\t libc_cv_cc_with_libunwind, [\n- cat > conftest.c <<EOF\n+AC_CACHE_CHECK(whether the compiler links with libunwind,\n+\t libc_cv_cc_with_libunwind, [dnl\n+cat > conftest.c <<EOF\n int main (void) { return 0; }\n EOF\n- if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -static -o conftest \\\n- conftest.c -v 2>&1 >/dev/null | grep ' -lunwind ' >/dev/null; then\n- libc_cv_cc_with_libunwind=yes\n- else\n- libc_cv_cc_with_libunwind=no\n- fi\n- rm -f conftest*])\n-AC_SUBST(libc_cv_cc_with_libunwind)\n+libc_cv_cc_with_libunwind=no\n+if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -static -o conftest \\\n+ conftest.c -v 2>&1 | grep -e '-lunwind' -e 'libunwind' >/dev/null; then\n+ libc_cv_cc_with_libunwind=yes\n+fi\n+rm -f conftest*])\n if test $libc_cv_cc_with_libunwind = yes; then\n AC_DEFINE(HAVE_CC_WITH_LIBUNWIND)\n fi\n+LIBC_CONFIG_VAR([have-cc-with-libunwind], [$libc_cv_cc_with_libunwind])\n \n ASFLAGS_config=\n AC_CACHE_CHECK(whether --noexecstack is desirable for .S files,\ndiff --git a/support/Makefile b/support/Makefile\nindex 4c36f45129..ea6f2880aa 100644\n--- a/support/Makefile\n+++ b/support/Makefile\n@@ -299,7 +299,7 @@ LINKS_DSO_PROGRAM = links-dso-program-c\n LDLIBS-links-dso-program-c = $(gnulib)\n ifeq ($(have-libgcc_s),yes)\n CFLAGS-links-dso-program-c.c += -fexceptions\n-LDLIBS-links-dso-program-c += -lgcc_s $(libunwind)\n+LDLIBS-links-dso-program-c += $(libgcc_s) $(libunwind)\n endif\n else\n LINKS_DSO_PROGRAM = links-dso-program\n", "prefixes": [ "3/5" ] }