get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2217419/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2217419,
    "url": "http://patchwork.ozlabs.org/api/patches/2217419/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20260328174154.168103-1-me@manueljacob.de/",
    "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": "<20260328174154.168103-1-me@manueljacob.de>",
    "list_archive_url": null,
    "date": "2026-03-28T17:41:54",
    "name": "build: Preserve all *_FOR_TARGET environment variables if already set.",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "5f9cdd9c75739d523a5f75a66c6d3ea86012107a",
    "submitter": {
        "id": 92972,
        "url": "http://patchwork.ozlabs.org/api/people/92972/?format=api",
        "name": "Manuel Jacob",
        "email": "me@manueljacob.de"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20260328174154.168103-1-me@manueljacob.de/mbox/",
    "series": [
        {
            "id": 497886,
            "url": "http://patchwork.ozlabs.org/api/series/497886/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=497886",
            "date": "2026-03-28T17:41:54",
            "name": "build: Preserve all *_FOR_TARGET environment variables if already set.",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/497886/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2217419/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2217419/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 (4096-bit key;\n unprotected) header.d=manueljacob.de header.i=@manueljacob.de\n header.a=rsa-sha256 header.s=uberspace header.b=XwM09A0g;\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 (4096-bit key,\n unprotected) header.d=manueljacob.de header.i=@manueljacob.de\n header.a=rsa-sha256 header.s=uberspace header.b=XwM09A0g",
            "sourceware.org; dmarc=none (p=none dis=none)\n header.from=manueljacob.de",
            "sourceware.org; spf=pass smtp.mailfrom=manueljacob.de",
            "server2.sourceware.org;\n arc=none smtp.remote-ip=185.26.156.114",
            "adrastea.uberspace.de;\n\tauth=pass (plain)"
        ],
        "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 4fjlGS52tHz1y1x\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 29 Mar 2026 04:42:55 +1100 (AEDT)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 1D0404BA900B\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 28 Mar 2026 17:42:53 +0000 (GMT)",
            "from mailgate02.uberspace.is (mailgate02.uberspace.is\n [185.26.156.114])\n by sourceware.org (Postfix) with ESMTPS id 5F6FB4BA23D3\n for <gcc-patches@gcc.gnu.org>; Sat, 28 Mar 2026 17:42:07 +0000 (GMT)",
            "from adrastea.uberspace.de (adrastea.uberspace.de [185.26.156.139])\n by mailgate02.uberspace.is (Postfix) with ESMTPS id 5A782182DB6\n for <gcc-patches@gcc.gnu.org>; Sat, 28 Mar 2026 18:42:06 +0100 (CET)",
            "(qmail 19340 invoked by uid 990); 28 Mar 2026 17:42:06 -0000",
            "from unknown (HELO unkown) (::1)\n by adrastea.uberspace.de (Haraka/3.1.1) with ESMTPSA;\n Sat, 28 Mar 2026 18:42:05 +0100"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org 1D0404BA900B",
            "OpenDKIM Filter v2.11.0 sourceware.org 5F6FB4BA23D3"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 5F6FB4BA23D3",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 5F6FB4BA23D3",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1774719727; cv=none;\n b=c6k389lNh3Rc3wEsVO51HI8dPGazEQPn1bbup+xR2/8cpV0YNSk5XcY1WrxTgVLdVgAo+TRQFv/TqiZqIzRdHNk/TKiXbDA0z7weLHzTRysqtY3hfBtgy0ksZg6zR1xlcPpR/JwvQDoMzIKSGBOlmX4I5/utas0sg3voQ0ia1vI=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1774719727; c=relaxed/simple;\n bh=SbNNRdiLVOlgiNfEu1gSx/ZL+tppeXwEIntiIEwaQGU=;\n h=From:To:Subject:Date:Message-ID:MIME-Version:DKIM-Signature;\n b=ODZ3k542II0HBYFbLwOE9kc1osAybQUa88w6E7g9Ui8UNfOLz5pog5PT/2cIxydzUtzZQJLqYF3i7esVUG3E3dO+Ffyc9MDWm1fTGR6rBNOUaeno5N8X//1xFlvm8TfJuAUVWO9L2CiWfzVrT9TxfMu0rUcnPuMj7nG04hI8PwM=",
        "ARC-Authentication-Results": "i=1; server2.sourceware.org",
        "From": "Manuel Jacob <me@manueljacob.de>",
        "To": "gcc-patches@gcc.gnu.org",
        "Cc": "Manuel Jacob <me@manueljacob.de>",
        "Subject": "[PATCH] build: Preserve all *_FOR_TARGET environment variables if\n already set.",
        "Date": "Sat, 28 Mar 2026 18:41:54 +0100",
        "Message-ID": "<20260328174154.168103-1-me@manueljacob.de>",
        "X-Mailer": "git-send-email 2.53.0",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "X-Rspamd-Bar": "--",
        "X-Rspamd-Report": "MID_CONTAINS_FROM(1) BAYES_HAM(-3) MIME_GOOD(-0.1)",
        "X-Rspamd-Score": "-2.1",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=manueljacob.de; s=uberspace; h=from:to:cc:subject:date;\n bh=SbNNRdiLVOlgiNfEu1gSx/ZL+tppeXwEIntiIEwaQGU=;\n b=XwM09A0g3X9Pi1f9sRpPrxZ4WIbPktmJDlRGWf0TuEnH4qkuQ2oFmkzMTBYvuCQsqn+FrnOLyB\n fPmEHXsXzjAZ7WOaV4p/3gMb9fp0cNCgivDeemtqvz27gGV5Wxez/dtTVd5EMuXcry7YAopdLwJH\n SC4/3VxxEkf5FLxg3MCsj6w0F6oV0hmchcyClwgwNmrzboUS3JSNbDey/KZlR5AnRG/G97eMAvSO\n YYKJ8GTC/hmPnEPDLpvj6BzLZN2aPgiP78j31v2alKI57RJk8Cjw8hRfgxKnwOTgGkZtQOynQRde\n xsjF8g2Mxb5r3aG+HFGxI8yYmNrG6O/pdYYb/QYr7ok80XPU6Wy+qOSxL4pRSBtZSPziIu/gG9BL\n 6hYknGnfK2ULz9Fn8RFfkQjw1xnumlf24shHWKbxYbdh6lziO+s14ybER4m9GHgpwpU8wQKoMK6O\n pUUT6i5PhDu+FAMVTCwAtaiZ6xQxlANztZLPXrdvjsbs2PxwIlvel1e74dk2R3u8a5XBE+Onv9eG\n mu450nLiUx107vUDLMPc+waqprFsW1toG9tuQH4QxFGmSXplWoy7iHomf18xqrx9gq4khPC3ToX7\n Vf+553I/sSEgfY1/0x7qk23fHTROVxn8V9RODYP460WykJTjwg2HRH0ZySZCqhp32RXN2TyfzRc/\n s=",
        "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>",
        "Errors-To": "gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org"
    },
    "content": "Some of the *_FOR_TARGET environment variables (e.g. CC_FOR_TARGET) were already preserved because they use the NCN_STRICT_CHECK_TARGET_TOOLS macro directly. Other *_FOR_TARGET environment variables (e.g. AS_FOR_TARGET) use the ACX_CHECK_INSTALLED_TARGET_TOOL macro, which falls back to NCN_STRICT_CHECK_TARGET_TOOLS but overwrote the environment variable in some cases before that. E.g. in the case `$build != $host`, the environment variable was not preserved.\n\nWith this patch, each of the *_FOR_TARGET environment variables and their unsuffixed (“for host”) correspondents are handled consistently in the sense that a non-empty value takes precedence over:\n\n- cached values\n- values inferred by checking for a suitable program in PATH\n- tools in the directory passed to --with-build-time-tools (applies only to *_FOR_TARGET)\n\nSigned-off-by: Manuel Jacob <me@manueljacob.de>\n---\n config/acx.m4 |  5 ++++\n configure     | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++\n 2 files changed, 80 insertions(+)",
    "diff": "diff --git a/config/acx.m4 b/config/acx.m4\nindex 7304d7b82ad..91083126c9d 100644\n--- a/config/acx.m4\n+++ b/config/acx.m4\n@@ -340,6 +340,11 @@ rm conftest.c\n AC_DEFUN([ACX_CHECK_INSTALLED_TARGET_TOOL], [\n AC_REQUIRE([ACX_TOOL_DIRS])\n AC_REQUIRE([ACX_HAVE_GCC_FOR_TARGET])\n+if test -n \"[$]$1\"; then\n+  ac_cv_path_$1=[$]$1\n+elif test -n \"$ac_cv_path_$1\"; then\n+  $1=$ac_cv_path_$1\n+fi\n if test -z \"$ac_cv_path_$1\" ; then\n   if test -n \"$with_build_time_tools\"; then\n     AC_MSG_CHECKING([for $2 in $with_build_time_tools])\ndiff --git a/configure b/configure\nindex 083e8823d2b..b9a036adb60 100755\n--- a/configure\n+++ b/configure\n@@ -16502,6 +16502,11 @@ rm conftest.c\n \n \n \n+if test -n \"$AR_FOR_TARGET\"; then\n+  ac_cv_path_AR_FOR_TARGET=$AR_FOR_TARGET\n+elif test -n \"$ac_cv_path_AR_FOR_TARGET\"; then\n+  AR_FOR_TARGET=$ac_cv_path_AR_FOR_TARGET\n+fi\n if test -z \"$ac_cv_path_AR_FOR_TARGET\" ; then\n   if test -n \"$with_build_time_tools\"; then\n     { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for ar in $with_build_time_tools\" >&5\n@@ -16732,6 +16737,11 @@ fi\n \n \n \n+if test -n \"$AS_FOR_TARGET\"; then\n+  ac_cv_path_AS_FOR_TARGET=$AS_FOR_TARGET\n+elif test -n \"$ac_cv_path_AS_FOR_TARGET\"; then\n+  AS_FOR_TARGET=$ac_cv_path_AS_FOR_TARGET\n+fi\n if test -z \"$ac_cv_path_AS_FOR_TARGET\" ; then\n   if test -n \"$with_build_time_tools\"; then\n     { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for as in $with_build_time_tools\" >&5\n@@ -16962,6 +16972,11 @@ fi\n \n \n \n+if test -n \"$DLLTOOL_FOR_TARGET\"; then\n+  ac_cv_path_DLLTOOL_FOR_TARGET=$DLLTOOL_FOR_TARGET\n+elif test -n \"$ac_cv_path_DLLTOOL_FOR_TARGET\"; then\n+  DLLTOOL_FOR_TARGET=$ac_cv_path_DLLTOOL_FOR_TARGET\n+fi\n if test -z \"$ac_cv_path_DLLTOOL_FOR_TARGET\" ; then\n   if test -n \"$with_build_time_tools\"; then\n     { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for dlltool in $with_build_time_tools\" >&5\n@@ -17192,6 +17207,11 @@ fi\n \n \n \n+if test -n \"$DSYMUTIL_FOR_TARGET\"; then\n+  ac_cv_path_DSYMUTIL_FOR_TARGET=$DSYMUTIL_FOR_TARGET\n+elif test -n \"$ac_cv_path_DSYMUTIL_FOR_TARGET\"; then\n+  DSYMUTIL_FOR_TARGET=$ac_cv_path_DSYMUTIL_FOR_TARGET\n+fi\n if test -z \"$ac_cv_path_DSYMUTIL_FOR_TARGET\" ; then\n   if test -n \"$with_build_time_tools\"; then\n     { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for dsymutil in $with_build_time_tools\" >&5\n@@ -17422,6 +17442,11 @@ fi\n \n \n \n+if test -n \"$LD_FOR_TARGET\"; then\n+  ac_cv_path_LD_FOR_TARGET=$LD_FOR_TARGET\n+elif test -n \"$ac_cv_path_LD_FOR_TARGET\"; then\n+  LD_FOR_TARGET=$ac_cv_path_LD_FOR_TARGET\n+fi\n if test -z \"$ac_cv_path_LD_FOR_TARGET\" ; then\n   if test -n \"$with_build_time_tools\"; then\n     { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for ld in $with_build_time_tools\" >&5\n@@ -17652,6 +17677,11 @@ fi\n \n \n \n+if test -n \"$LIPO_FOR_TARGET\"; then\n+  ac_cv_path_LIPO_FOR_TARGET=$LIPO_FOR_TARGET\n+elif test -n \"$ac_cv_path_LIPO_FOR_TARGET\"; then\n+  LIPO_FOR_TARGET=$ac_cv_path_LIPO_FOR_TARGET\n+fi\n if test -z \"$ac_cv_path_LIPO_FOR_TARGET\" ; then\n   if test -n \"$with_build_time_tools\"; then\n     { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for lipo in $with_build_time_tools\" >&5\n@@ -17882,6 +17912,11 @@ fi\n \n \n \n+if test -n \"$NM_FOR_TARGET\"; then\n+  ac_cv_path_NM_FOR_TARGET=$NM_FOR_TARGET\n+elif test -n \"$ac_cv_path_NM_FOR_TARGET\"; then\n+  NM_FOR_TARGET=$ac_cv_path_NM_FOR_TARGET\n+fi\n if test -z \"$ac_cv_path_NM_FOR_TARGET\" ; then\n   if test -n \"$with_build_time_tools\"; then\n     { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for nm in $with_build_time_tools\" >&5\n@@ -18112,6 +18147,11 @@ fi\n \n \n \n+if test -n \"$OBJCOPY_FOR_TARGET\"; then\n+  ac_cv_path_OBJCOPY_FOR_TARGET=$OBJCOPY_FOR_TARGET\n+elif test -n \"$ac_cv_path_OBJCOPY_FOR_TARGET\"; then\n+  OBJCOPY_FOR_TARGET=$ac_cv_path_OBJCOPY_FOR_TARGET\n+fi\n if test -z \"$ac_cv_path_OBJCOPY_FOR_TARGET\" ; then\n   if test -n \"$with_build_time_tools\"; then\n     { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for objcopy in $with_build_time_tools\" >&5\n@@ -18342,6 +18382,11 @@ fi\n \n \n \n+if test -n \"$OBJDUMP_FOR_TARGET\"; then\n+  ac_cv_path_OBJDUMP_FOR_TARGET=$OBJDUMP_FOR_TARGET\n+elif test -n \"$ac_cv_path_OBJDUMP_FOR_TARGET\"; then\n+  OBJDUMP_FOR_TARGET=$ac_cv_path_OBJDUMP_FOR_TARGET\n+fi\n if test -z \"$ac_cv_path_OBJDUMP_FOR_TARGET\" ; then\n   if test -n \"$with_build_time_tools\"; then\n     { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for objdump in $with_build_time_tools\" >&5\n@@ -18572,6 +18617,11 @@ fi\n \n \n \n+if test -n \"$OTOOL_FOR_TARGET\"; then\n+  ac_cv_path_OTOOL_FOR_TARGET=$OTOOL_FOR_TARGET\n+elif test -n \"$ac_cv_path_OTOOL_FOR_TARGET\"; then\n+  OTOOL_FOR_TARGET=$ac_cv_path_OTOOL_FOR_TARGET\n+fi\n if test -z \"$ac_cv_path_OTOOL_FOR_TARGET\" ; then\n   if test -n \"$with_build_time_tools\"; then\n     { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for otool in $with_build_time_tools\" >&5\n@@ -18802,6 +18852,11 @@ fi\n \n \n \n+if test -n \"$RANLIB_FOR_TARGET\"; then\n+  ac_cv_path_RANLIB_FOR_TARGET=$RANLIB_FOR_TARGET\n+elif test -n \"$ac_cv_path_RANLIB_FOR_TARGET\"; then\n+  RANLIB_FOR_TARGET=$ac_cv_path_RANLIB_FOR_TARGET\n+fi\n if test -z \"$ac_cv_path_RANLIB_FOR_TARGET\" ; then\n   if test -n \"$with_build_time_tools\"; then\n     { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for ranlib in $with_build_time_tools\" >&5\n@@ -19032,6 +19087,11 @@ fi\n \n \n \n+if test -n \"$READELF_FOR_TARGET\"; then\n+  ac_cv_path_READELF_FOR_TARGET=$READELF_FOR_TARGET\n+elif test -n \"$ac_cv_path_READELF_FOR_TARGET\"; then\n+  READELF_FOR_TARGET=$ac_cv_path_READELF_FOR_TARGET\n+fi\n if test -z \"$ac_cv_path_READELF_FOR_TARGET\" ; then\n   if test -n \"$with_build_time_tools\"; then\n     { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for readelf in $with_build_time_tools\" >&5\n@@ -19262,6 +19322,11 @@ fi\n \n \n \n+if test -n \"$STRIP_FOR_TARGET\"; then\n+  ac_cv_path_STRIP_FOR_TARGET=$STRIP_FOR_TARGET\n+elif test -n \"$ac_cv_path_STRIP_FOR_TARGET\"; then\n+  STRIP_FOR_TARGET=$ac_cv_path_STRIP_FOR_TARGET\n+fi\n if test -z \"$ac_cv_path_STRIP_FOR_TARGET\" ; then\n   if test -n \"$with_build_time_tools\"; then\n     { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for strip in $with_build_time_tools\" >&5\n@@ -19492,6 +19557,11 @@ fi\n \n \n \n+if test -n \"$WINDRES_FOR_TARGET\"; then\n+  ac_cv_path_WINDRES_FOR_TARGET=$WINDRES_FOR_TARGET\n+elif test -n \"$ac_cv_path_WINDRES_FOR_TARGET\"; then\n+  WINDRES_FOR_TARGET=$ac_cv_path_WINDRES_FOR_TARGET\n+fi\n if test -z \"$ac_cv_path_WINDRES_FOR_TARGET\" ; then\n   if test -n \"$with_build_time_tools\"; then\n     { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for windres in $with_build_time_tools\" >&5\n@@ -19722,6 +19792,11 @@ fi\n \n \n \n+if test -n \"$WINDMC_FOR_TARGET\"; then\n+  ac_cv_path_WINDMC_FOR_TARGET=$WINDMC_FOR_TARGET\n+elif test -n \"$ac_cv_path_WINDMC_FOR_TARGET\"; then\n+  WINDMC_FOR_TARGET=$ac_cv_path_WINDMC_FOR_TARGET\n+fi\n if test -z \"$ac_cv_path_WINDMC_FOR_TARGET\" ; then\n   if test -n \"$with_build_time_tools\"; then\n     { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for windmc in $with_build_time_tools\" >&5\n",
    "prefixes": []
}