get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2233385,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2233385/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/ydd8q9xq7y5.fsf@CeBiTec.Uni-Bielefeld.DE/",
    "project": {
        "id": 17,
        "url": "http://patchwork.ozlabs.org/api/1.1/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
    },
    "msgid": "<ydd8q9xq7y5.fsf@CeBiTec.Uni-Bielefeld.DE>",
    "date": "2026-05-06T08:05:22",
    "name": "[-1/6] build: Introduce {as,ld}_flavor",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "6f9207911618e0f23db205b0c6bc3872a8c54cc9",
    "submitter": {
        "id": 4362,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/4362/?format=api",
        "name": "Rainer Orth",
        "email": "ro@CeBiTec.Uni-Bielefeld.DE"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/ydd8q9xq7y5.fsf@CeBiTec.Uni-Bielefeld.DE/mbox/",
    "series": [
        {
            "id": 502959,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/502959/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=502959",
            "date": "2026-05-06T08:05:22",
            "name": "[-1/6] build: Introduce {as,ld}_flavor",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/502959/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2233385/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2233385/checks/",
    "tags": {},
    "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 (2048-bit key;\n unprotected) header.d=cebitec.uni-bielefeld.de header.i=@cebitec.uni-bielefeld.de\n header.a=rsa-sha256 header.s=20200306 header.b=Xy4QiNoj;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=38.145.34.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 (2048-bit key,\n unprotected) header.d=cebitec.uni-bielefeld.de header.i=@cebitec.uni-bielefeld.de\n header.a=rsa-sha256 header.s=20200306 header.b=Xy4QiNoj",
            "sourceware.org; dmarc=none (p=none dis=none)\n header.from=CeBiTec.Uni-Bielefeld.DE",
            "sourceware.org;\n spf=pass smtp.mailfrom=cebitec.uni-bielefeld.de",
            "sourceware.org; arc=none smtp.remote-ip=129.70.160.84"
        ],
        "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 4g9X2Y0YcKz1yJV\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 06 May 2026 20:40:05 +1000 (AEST)",
            "from vm01.sourceware.org (localhost [IPv6:::1])\n\tby sourceware.org (Postfix) with ESMTP id 1073E4BA2E19\n\tfor <incoming@patchwork.ozlabs.org>; Wed,  6 May 2026 10:40:03 +0000 (GMT)",
            "from smtp.CeBiTec.Uni-Bielefeld.DE (smtp.CeBiTec.Uni-Bielefeld.DE\n [129.70.160.84])\n by sourceware.org (Postfix) with ESMTPS id D0AD14BA7981;\n Wed,  6 May 2026 08:05:29 +0000 (GMT)",
            "from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1])\n by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id AB8E3E30FF;\n Wed,  6 May 2026 10:05:28 +0200 (CEST)",
            "from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1])\n by localhost (smtp.cebitec.uni-bielefeld.de [127.0.0.1]) (amavisd-new,\n port 10026)\n with ESMTP id GlncnoOFd2po; Wed,  6 May 2026 10:05:23 +0200 (CEST)",
            "from manam.CeBiTec.Uni-Bielefeld.DE (p508551ea.dip0.t-ipconnect.de\n [80.133.81.234]) (Authenticated sender: ro)\n by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPSA id 5ECE7E30FE;\n Wed,  6 May 2026 10:05:23 +0200 (CEST)"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org 1073E4BA2E19",
            "OpenDKIM Filter v2.11.0 sourceware.org D0AD14BA7981"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org D0AD14BA7981",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org D0AD14BA7981",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1778054730; cv=none;\n b=hPl/azOZ1p+/mn+Z0D9BxLTSb5FrQBR7R04jDntFZhlZhHa0k5T6TaN5AqE/GfJWW8343TTZFyLMJHaoSKhCVdNYzfNc2i6kQUDgk1oNRUoFbvyD7vdqIQpnr7LP+8NvhBK+feCBUFMTGp+4RoJrDjKSyOearjj7D//Skm7GOmk=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1778054730; c=relaxed/simple;\n bh=VRsLYn3FqTLkTA/VTon1uBhJePLtxb9p5ozNvZUj+nQ=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=pRanplHOKgjiAQVZj7snBmirZ4MaqUtjBQ/ArLohtzB7mdLZae9oNjloYZEA+pffyrXUhxgZOz9BrSRIUIsLQMXanDGMNYXX7suB/rBemaalnoU9egFuTDi12yxH+5XGg2T52AVN4FzIPud03UKjIxAwwE+OjG8e31hz/r5cDWo=",
        "ARC-Authentication-Results": "i=1; sourceware.org;\n dkim=pass (2048-bit key, unprotected)\n header.d=cebitec.uni-bielefeld.de header.i=@cebitec.uni-bielefeld.de\n header.a=rsa-sha256 header.s=20200306 header.b=Xy4QiNoj",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=\n cebitec.uni-bielefeld.de; h=content-type:content-type\n :mime-version:user-agent:message-id:date:date:subject:subject\n :from:from:received:received; s=20200306; t=1778054723; bh=VRsLY\n n3FqTLkTA/VTon1uBhJePLtxb9p5ozNvZUj+nQ=; b=Xy4QiNojVJjhVxo/RUaML\n MXgxhUiawShbYLmPeP65Vruq6j9RNeGWbsO+qfZlRznCCd9pwgaJCh+V6Urd5PsW\n oU7SpDnpLtsk3Rtwa7PAMT71piGtkhSwZGqS05UD1BD3XEgAuzdyJzA3Ejgnu3rn\n aYEEAgnSgKWkNjyTFgBr0FaRcNtUgZ2no9NqNW36oYKdlbpGQkRjGmraAqZmVlH/\n aMiQ4a5etjjT66RAZVXmrYov3prjIGL6twoYXqrHPt06VoBsT/SHHmson+15a2wX\n p4fEGk1vqLkKDWQB8kDmdItg5OBkMQE6pAFYtxhm5nw8EEo+YVEqyoFRhZl0pXrF\n w==",
        "X-Virus-Scanned": "amavisd-new at cebitec.uni-bielefeld.de",
        "From": "Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>",
        "To": "gcc-patches@gcc.gnu.org",
        "Cc": "Alexandre Oliva <aoliva@gcc.gnu.org>,\n David Edelsohn <dje.gcc@gmail.com>, Iain Sandoe <iain@sandoe.co.uk>,\n John David Anglin <dave.anglin@bell.net>, Thomas Schwinge\n <tschwinge@baylibre.com>, Douglas Rupp <douglas.b.rupp@gmail.com>, Tristan\n Gingold <tgingold@free.fr>",
        "Subject": "[PATCH -1/6] build: Introduce {as,ld}_flavor",
        "Date": "Wed, 06 May 2026 10:05:22 +0200",
        "Message-ID": "<ydd8q9xq7y5.fsf@CeBiTec.Uni-Bielefeld.DE>",
        "User-Agent": "Gnus/5.13 (Gnus v5.13)",
        "MIME-Version": "1.0",
        "Content-Type": "multipart/mixed; boundary=\"=-=-=\"",
        "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": "When working to handle more vendor assemblers and linkers for the patch\nseries described in\n\n\t[PATCH 0/6] Remove HAVE_GNU_{AS,LD} etc.\n        https://gcc.gnu.org/pipermail/gcc-patches/2026-April/715161.html\n\nit turned out that the original plan to follow what I'd done for Solaris\nso far with the solaris_{as,ld} variables leads to code that is hard to\nunderstand.\n\nTherefore this patch uses a different approach: it introduces two new\nvariables, as_flavor, and ld_flavor.  They both default to gnu, i.e. the\nGNU Binutils toolchain or compatible assemblers and linkers.\n\nTo deal with incompatible vendor toolchains, those variables can take\nother values.  In addition to solaris, there are aix, darwin, hpux, and\nnvptx. More could be added as necessary.\n\nIn preparation for the patch series above, this patch switches existing\ncode from solaris_{as,ld} to {as,ld}_flavor=solaris.\n\nIt also checks the configured assembler and linker for the vendor\ntoolchains above.  If there's a choice between native and GNU toolchains\n(AIX, HP-UX, Solaris), the as and ld version outputs are examined.\nOtherwise (Darwin, NVPTX), the values are hardcoded and only used in\nconfigure messages.\n\nIn addition to {as,ld}_flavor, HAVE_<FLAVOR>_{AS,LD} macros are defined\nin cases they are actually needed, matching existing HAVE_SOLARIS_{AS,LD}.\n\nTested together with a reworked version of the patch series above on\nx86_64-pc-linux-gnu, powerpc-ibm-aix7.3.1.0 (as/ld and gas/gld),\nx86_64-apple-darwin17.7.0, i386-pc-solaris2.11 and sparc-sun-solaris2.11\n(as/ld, gas/ld, and gas/gld).  Also tested by Dave on HP-UX.\n\nFor the time being, I've ignored VMS which would also need handling: the\nsupport status of VMS support in GCC is completely unknown, AFAIK there\nare no public build systems and there's no information on the targets in\ninstall.texi.\n\nOk for trunk?\n\n\tRainer",
    "diff": "# HG changeset patch\n# Parent  c65b3c71fdc102d7e20cd47c766eea062ae5e991\nbuild: Introduce {as,ld}_flavor\n\ndiff --git a/gcc/acinclude.m4 b/gcc/acinclude.m4\n--- a/gcc/acinclude.m4\n+++ b/gcc/acinclude.m4\n@@ -308,8 +308,8 @@ int (*fp) (void) __attribute__ ((section\n \t    gcc_cv_initfini_array=yes\n \t  fi\n \telif test x\"$gcc_cv_as\" != x -a x\"$gcc_cv_ld\" != x -a x\"$gcc_cv_objdump\" != x ; then\n-\t  case $target:$solaris_as in\n-\t    i?86-*-solaris2*:yes | x86_64-*-solaris2*:yes)\n+\t  case $target:$as_flavor in\n+\t    i?86-*-solaris2*:solaris | x86_64-*-solaris2*:solaris)\n \t      sh_flags='\"a\"'\n \t      sh_type='@progbits'\n \t      ;;\n@@ -323,7 +323,7 @@ int (*fp) (void) __attribute__ ((section\n \t      sh_type='%progbits'\n \t      ;;\n \t  esac\n-\t  if test x$solaris_ld = xno; then\n+\t  if test x$ld_flavor = xgnu; then\n \t    cat > conftest.s <<EOF\n .section .dtors,$sh_flags,$sh_type\n .balign 4\ndiff --git a/gcc/config.in b/gcc/config.in\n--- a/gcc/config.in\n+++ b/gcc/config.in\n@@ -373,6 +373,12 @@\n #endif\n \n \n+/* Define to 1 if using the AIX assembler. */\n+#ifndef USED_FOR_TARGET\n+#undef HAVE_AIX_AS\n+#endif\n+\n+\n /* Define if your assembler supports LSX and SCQ for 16B atomic. */\n #ifndef USED_FOR_TARGET\n #undef HAVE_AS_16B_ATOMIC\ndiff --git a/gcc/configure b/gcc/configure\n--- a/gcc/configure\n+++ b/gcc/configure\n@@ -25498,24 +25498,52 @@ fi\n fi\n fi\n \n-{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking Solaris assembler\" >&5\n-$as_echo_n \"checking Solaris assembler... \" >&6; }\n+{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking assembler flavor\" >&5\n+$as_echo_n \"checking assembler flavor... \" >&6; }\n+as_flavor=gnu\n case $target in\n+  *-*-aix*)\n+    if $gcc_cv_as -v 2>&1 | grep '^as V' > /dev/null; then\n+      as_flavor=aix\n+      gas=no\n+    else\n+      gas=yes\n+    fi\n+    ;;\n+  *-*-darwin*)\n+    as_flavor=darwin\n+    gas=no\n+    ;;\n   *-*-solaris2*)\n     if $gcc_cv_as -V 2>&1 | grep 'Compiler Common.*SunOS' > /dev/null; then\n-      solaris_as=yes\n+      as_flavor=solaris\n       gas=no\n-    elif $gcc_cv_as --version 2>/dev/null | grep GNU > /dev/null; then\n+    else\n+      gas=yes\n+    fi\n+    ;;\n+  hppa*64*-*-hpux11*)\n+    if $gcc_cv_as -V 2>&1 | grep 'UX.11.*PA-RISC.*Assembler' > /dev/null; then\n+      as_flavor=hpux\n+      gas=no\n+    else\n       gas=yes\n     fi\n     ;;\n-  *)\n-    solaris_as=no\n-    ;;\n-esac\n-{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $solaris_as\" >&5\n-$as_echo \"$solaris_as\" >&6; }\n-solaris_as_bool=`if test $solaris_as = yes; then echo 1; else echo 0; fi`\n+  nvptx-*-*)\n+    as_flavor=nvptx\n+    gas=no\n+    ;;\n+esac\n+{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $as_flavor\" >&5\n+$as_echo \"$as_flavor\" >&6; }\n+aix_as_bool=`if test $as_flavor = aix; then echo 1; else echo 0; fi`\n+\n+cat >>confdefs.h <<_ACEOF\n+#define HAVE_AIX_AS $aix_as_bool\n+_ACEOF\n+\n+solaris_as_bool=`if test $as_flavor = solaris; then echo 1; else echo 0; fi`\n \n cat >>confdefs.h <<_ACEOF\n #define HAVE_SOLARIS_AS $solaris_as_bool\n@@ -25652,24 +25680,46 @@ fi\n fi\n fi\n \n-{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking Solaris linker\" >&5\n-$as_echo_n \"checking Solaris linker... \" >&6; }\n+{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking linker flavor\" >&5\n+$as_echo_n \"checking linker flavor... \" >&6; }\n+ld_flavor=gnu\n case $target in\n-  *-*-solaris2*)\n-    if $gcc_cv_ld -V 2>/dev/null | grep 'Solaris Link Editors' > /dev/null; then\n+  *-*-aix*)\n+    if $gcc_cv_ld -V 2>&1 | grep 'ld: LD ' > /dev/null; then\n+      ld_flavor=aix\n       gnu_ld=no\n-      solaris_ld=yes\n-    elif $gcc_cv_ld --version 2>/dev/null | grep GNU > /dev/null; then\n+    else\n       gnu_ld=yes\n     fi\n     ;;\n-  *)\n-    solaris_ld=no\n-    ;;\n-esac\n-{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $solaris_ld\" >&5\n-$as_echo \"$solaris_ld\" >&6; }\n-solaris_ld_bool=`if test $solaris_ld = yes; then echo 1; else echo 0; fi`\n+  *-*-darwin*)\n+    ld_flavor=darwin\n+    gnu_ld=no\n+    ;;\n+  *-*-solaris2*)\n+    if $gcc_cv_ld -V 2>&1 | grep 'Solaris Link Editors' > /dev/null; then\n+      ld_flavor=solaris\n+      gnu_ld=no\n+    else\n+      gnu_ld=yes\n+    fi\n+    ;;\n+  hppa*64*-*-hpux11*)\n+    if $gcc_cv_ld -V 2>&1 | grep 'linker command.*sgs.*ld PA64' > /dev/null; then\n+      ld_flavor=hpux\n+      gnu_ld=no\n+    else\n+      gnu_ld=yes\n+    fi\n+    ;;\n+  nvptx-*-*)\n+    ld_flavor=nvptx\n+    gnu_ld=no\n+    ;;\n+esac\n+{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ld_flavor\" >&5\n+$as_echo \"$ld_flavor\" >&6; }\n+solaris_ld_bool=`if test $ld_flavor = solaris; then echo 1; else echo 0; fi`\n \n cat >>confdefs.h <<_ACEOF\n #define HAVE_SOLARIS_LD $solaris_ld_bool\n@@ -25709,16 +25759,16 @@ if test -z \"$gnu_ld\"; then\n   fi\n fi\n \n-case \"$target:$gnu_ld\" in\n-  *-*-solaris2*:no)\n+case \"$target:$ld_flavor\" in\n+  *-*-solaris2*:solaris)\n     # While Solaris ld has -m32/-m64 it usually determines the ELF class\n     # from the input objects.\n     ;;\n-  i?86-*-solaris2*:yes | x86_64-*-solaris2*:yes)\n+  i?86-*-solaris2*:gnu | x86_64-*-solaris2*:gnu)\n     ld_32_opt=-melf_i386_sol2\n     ld_64_opt=-melf_x86_64_sol2\n     ;;\n-  i?86-*-*:yes | x86_64-*-*:yes)\n+  i?86-*-*:gnu | x86_64-*-*:gnu)\n     ld_32_opt=-melf_i386\n     ld_64_opt=-melf_x86_64\n     ;;\n@@ -26914,8 +26964,8 @@ fi\n \t    gcc_cv_initfini_array=yes\n \t  fi\n \telif test x\"$gcc_cv_as\" != x -a x\"$gcc_cv_ld\" != x -a x\"$gcc_cv_objdump\" != x ; then\n-\t  case $target:$solaris_as in\n-\t    i?86-*-solaris2*:yes | x86_64-*-solaris2*:yes)\n+\t  case $target:$as_flavor in\n+\t    i?86-*-solaris2*:solaris | x86_64-*-solaris2*:solaris)\n \t      sh_flags='\"a\"'\n \t      sh_type='@progbits'\n \t      ;;\n@@ -26929,7 +26979,7 @@ fi\n \t      sh_type='%progbits'\n \t      ;;\n \t  esac\n-\t  if test x$solaris_ld = xno; then\n+\t  if test x$ld_flavor = xgnu; then\n \t    cat > conftest.s <<EOF\n .section .dtors,$sh_flags,$sh_type\n .balign 4\n@@ -28097,7 +28147,7 @@ foo:\t.long\t25\n .word foo(tlsldo)'\n \t;;\n   i?86-*-* | x86_64-*-*)\n-    if test x$solaris_as = xyes; then\n+    if test x$as_flavor = xsolaris; then\n       tls_section_flag=t\n \n $as_echo \"#define TLS_SECTION_ASM_FLAG 't'\" >>confdefs.h\n@@ -28345,7 +28395,7 @@ foo:\t.long\t25\n \t.long\tfoo@TPOFF'\n \t;;\n   sparc*-*-*)\n-    if test x$solaris_as = xyes; then\n+    if test x$as_flavor = xsolaris; then\n       conftest_s='\n       .section \".tdata\",#alloc,#write,#tls'\n     else\n@@ -28522,7 +28572,7 @@ ld_version_script_option=''\n if test $in_tree_ld = yes || test x\"$gnu_ld\" = xyes; then\n   gcc_cv_ld_version_script=yes\n   ld_version_script_option='--version-script'\n-elif test x$solaris_ld = xyes; then\n+elif test x$ld_flavor = xsolaris; then\n   # Solaris 2 ld always supports -M.  It also supports a subset of\n   # --version-script since Solaris 11.4, but requires\n   # -z gnu-version-script-compat to activate.\n@@ -32973,7 +33023,7 @@ gcc_cv_ld_ctf=no\n # Check for Solaris ld 1.3315 introduced in Solaris 11.4 SRU 84.  ld -z ctf\n # already went in in SRU 81, but lacked GNU CTF to Solaris CTF conversion.\n if $gcc_cv_ld --help 2>&1 | grep -- '-z ctf' > /dev/null \\\n-  && test x$solaris_ld = xyes && test \"$ld_vers_minor\" -ge 3315; then\n+  && test x$ld_flavor = xsolaris && test \"$ld_vers_minor\" -ge 3315; then\n   gcc_cv_ld_ctf=yes\n \n $as_echo \"#define HAVE_LD_CTF 1\" >>confdefs.h\n@@ -33256,7 +33306,7 @@ elif test x$gcc_cv_ld != x; then\n       gcc_cv_ld_no_as_needed_option='--pop-state'\n     fi\n   fi\n-  if test x$solaris_ld = xyes; then\n+  if test x$ld_flavor = xsolaris; then\n     # Solaris 2 ld always supports -z ignore/-z record.  Prefer the native\n     # forms.\n     gcc_cv_ld_as_needed=yes\ndiff --git a/gcc/configure.ac b/gcc/configure.ac\n--- a/gcc/configure.ac\n+++ b/gcc/configure.ac\n@@ -2738,22 +2738,48 @@ else\n         AC_PATH_PROG(gcc_cv_as, $AS_FOR_TARGET)\n fi])\n \n-AC_MSG_CHECKING(Solaris assembler)\n+AC_MSG_CHECKING(assembler flavor)\n+as_flavor=gnu\n case $target in\n-  *-*-solaris2*)\n-    if $gcc_cv_as -V 2>&1 | grep 'Compiler Common.*SunOS' > /dev/null; then\n-      solaris_as=yes\n+  *-*-aix*)\n+    if $gcc_cv_as -v 2>&1 | grep '^as V' > /dev/null; then\n+      as_flavor=aix\n       gas=no\n-    elif $gcc_cv_as --version 2>/dev/null | grep GNU > /dev/null; then\n+    else\n       gas=yes\n     fi\n     ;;\n-  *)\n-    solaris_as=no\n+  *-*-darwin*)\n+    as_flavor=darwin\n+    gas=no\n+    ;;\n+  *-*-solaris2*)\n+    if $gcc_cv_as -V 2>&1 | grep 'Compiler Common.*SunOS' > /dev/null; then\n+      as_flavor=solaris\n+      gas=no\n+    else\n+      gas=yes\n+    fi\n+    ;;\n+  hppa*64*-*-hpux11*)\n+    if $gcc_cv_as -V 2>&1 | grep 'UX.11.*PA-RISC.*Assembler' > /dev/null; then\n+      as_flavor=hpux\n+      gas=no\n+    else\n+      gas=yes\n+    fi\n+    ;;\n+  nvptx-*-*)\n+    as_flavor=nvptx\n+    gas=no\n     ;;\n esac\n-AC_MSG_RESULT($solaris_as)\n-solaris_as_bool=`if test $solaris_as = yes; then echo 1; else echo 0; fi`\n+AC_MSG_RESULT($as_flavor)\n+dnl Don't define HAVE_GNU_AS, only HAVE_<FLAVOR>_AS when actually used.\n+aix_as_bool=`if test $as_flavor = aix; then echo 1; else echo 0; fi`\n+AC_DEFINE_UNQUOTED(HAVE_AIX_AS, $aix_as_bool,\n+\t[Define to 1 if using the AIX assembler.])\n+solaris_as_bool=`if test $as_flavor = solaris; then echo 1; else echo 0; fi`\n AC_DEFINE_UNQUOTED(HAVE_SOLARIS_AS, $solaris_as_bool,\n \t[Define to 1 if using the Solaris assembler.])\n \n@@ -2839,22 +2865,45 @@ else\n         AC_PATH_PROG(gcc_cv_ld, $LD_FOR_TARGET)\n fi])\n \n-AC_MSG_CHECKING(Solaris linker)\n+AC_MSG_CHECKING(linker flavor)\n+ld_flavor=gnu\n case $target in\n-  *-*-solaris2*)\n-    if $gcc_cv_ld -V 2>/dev/null | grep 'Solaris Link Editors' > /dev/null; then\n+  *-*-aix*)\n+    if $gcc_cv_ld -V 2>&1 | grep 'ld: LD ' > /dev/null; then\n+      ld_flavor=aix\n       gnu_ld=no\n-      solaris_ld=yes\n-    elif $gcc_cv_ld --version 2>/dev/null | grep GNU > /dev/null; then\n+    else\n       gnu_ld=yes\n     fi\n     ;;\n-  *)\n-    solaris_ld=no\n+  *-*-darwin*)\n+    ld_flavor=darwin\n+    gnu_ld=no\n+    ;;\n+  *-*-solaris2*)\n+    if $gcc_cv_ld -V 2>&1 | grep 'Solaris Link Editors' > /dev/null; then\n+      ld_flavor=solaris\n+      gnu_ld=no\n+    else\n+      gnu_ld=yes\n+    fi\n+    ;;\n+  hppa*64*-*-hpux11*)\n+    if $gcc_cv_ld -V 2>&1 | grep 'linker command.*sgs.*ld PA64' > /dev/null; then\n+      ld_flavor=hpux\n+      gnu_ld=no\n+    else\n+      gnu_ld=yes\n+    fi\n+    ;;\n+  nvptx-*-*)\n+    ld_flavor=nvptx\n+    gnu_ld=no\n     ;;\n esac\n-AC_MSG_RESULT($solaris_ld)\n-solaris_ld_bool=`if test $solaris_ld = yes; then echo 1; else echo 0; fi`\n+AC_MSG_RESULT($ld_flavor)\n+dnl Don't define HAVE_GNU_LD, only HAVE_<FLAVOR>_LD when actually used.\n+solaris_ld_bool=`if test $ld_flavor = solaris; then echo 1; else echo 0; fi`\n AC_DEFINE_UNQUOTED(HAVE_SOLARIS_LD, $solaris_ld_bool,\n \t[Define to 1 if using the Solaris linker.])\n \n@@ -2884,16 +2933,16 @@ if test -z \"$gnu_ld\"; then\n   fi\n fi\n \n-case \"$target:$gnu_ld\" in\n-  *-*-solaris2*:no)\n+case \"$target:$ld_flavor\" in\n+  *-*-solaris2*:solaris)\n     # While Solaris ld has -m32/-m64 it usually determines the ELF class\n     # from the input objects.\n     ;;\n-  i?86-*-solaris2*:yes | x86_64-*-solaris2*:yes)\n+  i?86-*-solaris2*:gnu | x86_64-*-solaris2*:gnu)\n     ld_32_opt=-melf_i386_sol2\n     ld_64_opt=-melf_x86_64_sol2\n     ;;\n-  i?86-*-*:yes | x86_64-*-*:yes)\n+  i?86-*-*:gnu | x86_64-*-*:gnu)\n     ld_32_opt=-melf_i386\n     ld_64_opt=-melf_x86_64\n     ;;\n@@ -3993,7 +4042,7 @@ foo:\t.long\t25\n .word foo(tlsldo)'\n \t;;\n   i?86-*-* | x86_64-*-*)\n-    if test x$solaris_as = xyes; then\n+    if test x$as_flavor = xsolaris; then\n       tls_section_flag=t\n changequote([,])dnl\n       AC_DEFINE(TLS_SECTION_ASM_FLAG, 't',\n@@ -4242,7 +4291,7 @@ foo:\t.long\t25\n \t.long\tfoo@TPOFF'\n \t;;\n   sparc*-*-*)\n-    if test x$solaris_as = xyes; then\n+    if test x$as_flavor = xsolaris; then\n       conftest_s='\n       .section \".tdata\",#alloc,#write,#tls'\n     else\n@@ -4383,7 +4432,7 @@ ld_version_script_option=''\n if test $in_tree_ld = yes || test x\"$gnu_ld\" = xyes; then\n   gcc_cv_ld_version_script=yes\n   ld_version_script_option='--version-script'\n-elif test x$solaris_ld = xyes; then\n+elif test x$ld_flavor = xsolaris; then\n   # Solaris 2 ld always supports -M.  It also supports a subset of\n   # --version-script since Solaris 11.4, but requires\n   # -z gnu-version-script-compat to activate.\n@@ -6337,7 +6386,7 @@ gcc_cv_ld_ctf=no\n # Check for Solaris ld 1.3315 introduced in Solaris 11.4 SRU 84.  ld -z ctf\n # already went in in SRU 81, but lacked GNU CTF to Solaris CTF conversion.\n if $gcc_cv_ld --help 2>&1 | grep -- '-z ctf' > /dev/null \\\n-  && test x$solaris_ld = xyes && test \"$ld_vers_minor\" -ge 3315; then\n+  && test x$ld_flavor = xsolaris && test \"$ld_vers_minor\" -ge 3315; then\n   gcc_cv_ld_ctf=yes\n   AC_DEFINE(HAVE_LD_CTF, 1, [Define if your linker supports -z ctf.])\n fi\n@@ -6570,7 +6619,7 @@ elif test x$gcc_cv_ld != x; then\n       gcc_cv_ld_no_as_needed_option='--pop-state'\n     fi\n   fi\n-  if test x$solaris_ld = xyes; then\n+  if test x$ld_flavor = xsolaris; then\n     # Solaris 2 ld always supports -z ignore/-z record.  Prefer the native\n     # forms.\n     gcc_cv_ld_as_needed=yes\n",
    "prefixes": [
        "-1/6"
    ]
}