public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Richard Earnshaw <rearnsha@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r10-10054] arm: ensure the arch_name is always set for the build target
Date: Mon, 23 Aug 2021 14:31:45 +0000 (GMT)	[thread overview]
Message-ID: <20210823143145.64748385742E@sourceware.org> (raw)

https://gcc.gnu.org/g:a28ddcce5ce7b58a8edbb8c7b62efae981974f52

commit r10-10054-ga28ddcce5ce7b58a8edbb8c7b62efae981974f52
Author: Richard Earnshaw <rearnsha@arm.com>
Date:   Mon Jul 26 17:07:14 2021 +0100

    arm: ensure the arch_name is always set for the build target
    
    This should never happen now if GCC is invoked by the driver, but in
    the unusual case of calling cc1 (or its ilk) directly from the command
    line the build target's arch_name string can remain NULL.  This can
    complicate later processing meaning that we need to check for this
    case explicitly in some circumstances.  Nothing should rely on this
    behaviour, so it's simpler to always set the arch_name when
    configuring the build target and be done with it.
    
    gcc:
    
            * config/arm/arm.c (arm_configure_build_target): Ensure the target's
            arch_name is always set.
    
    (cherry picked from commit 62e66c6a6cc52dc0e014141d369cff52757cd7ae)

Diff:
---
 gcc/config/arm/arm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index ac06424df7e..24313962067 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -3427,6 +3427,8 @@ arm_configure_build_target (struct arm_build_target *target,
   const cpu_tune *tune_data = &all_tunes[arm_selected_tune - all_cores];
 
   /* Finish initializing the target structure.  */
+  if (!target->arch_name)
+    target->arch_name = arm_selected_arch->common.name;
   target->arch_pp_name = arm_selected_arch->arch;
   target->base_arch = arm_selected_arch->base_arch;
   target->profile = arm_selected_arch->profile;


                 reply	other threads:[~2021-08-23 14:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210823143145.64748385742E@sourceware.org \
    --to=rearnsha@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).