public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Matthew Malcomson <matmal01@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/vendors/ARM/heads/morello)] Avoid defining MULTILIB_REUSE rule when no purecap multilib
Date: Mon, 28 Feb 2022 12:09:41 +0000 (GMT)	[thread overview]
Message-ID: <20220228120941.351383858437@sourceware.org> (raw)

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

commit bdcb489bdaa102bf4e6f5dc773c94db5e7c596b1
Author: Matthew Malcomson <matthew.malcomson@arm.com>
Date:   Mon Feb 28 11:41:30 2022 +0000

    Avoid defining MULTILIB_REUSE rule when no purecap multilib
    
    This MULTILIB_REUSE rule is there as a temporary measure to ensure that
    if someone uses the arguments `-mabi=purecap -march=morello+c64+nolse`
    that links to the same multilib as `-mabi=purecap -march=morello+c64`.
    
    This is a temporary step, and we plan to make a proper fix following the
    same mechanism as was used for CDE arguments in the arm backend.
    
    Unconditionally using the MULTILIB_REUSE variable breaks building when
    the purecap multilib is not being built.  This is because the
    genmultilib script requires all multilib reuse targets to exist.
    
    This patch puts a condition on defining the variable so it is not
    defined when we are not building a purecap multilib.

Diff:
---
 gcc/config/aarch64/t-aarch64 | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/gcc/config/aarch64/t-aarch64 b/gcc/config/aarch64/t-aarch64
index a4b8ad86dda..276765e1b0d 100644
--- a/gcc/config/aarch64/t-aarch64
+++ b/gcc/config/aarch64/t-aarch64
@@ -173,7 +173,17 @@ MULTILIB_REQUIRED   += mabi=purecap/march=morello+c64
 # patch for Arm to ignore the `cdecp` arguments (see commit f58d03b5d).  That
 # would take a while and we're still working out the building stuff so we're
 # leaving it for now.
+#
+# The genmultilib script disallows reuse rules going to a multilib that is not
+# getting built.  In this case if the purecap multilib is not getting built,
+# then the purecap + nolse options can't be used either and it seems best to
+# ensure they have the same error as the base purecap multilib.
+# Hence we can just avoid defining the re-use rule in that case and those
+# otions will use the lp64 object files just like the other purecap options.
+ifeq ($(findstring purecap,$(MULTILIB_OPTIONS)), purecap)
 MULTILIB_REUSE      = mabi.purecap/march.morello+c64=mabi.purecap/march.morello+c64+nolse
+endif
+
 MULTILIB_DIRNAMES   = $(subst $(comma), ,$(TM_MULTILIB_CONFIG))
 
 insn-conditions.md: s-check-sve-md


                 reply	other threads:[~2022-02-28 12:09 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=20220228120941.351383858437@sourceware.org \
    --to=matmal01@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).