public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/vendors/ARM/heads/morello)] Avoid defining MULTILIB_REUSE rule when no purecap multilib
@ 2022-02-28 12:09 Matthew Malcomson
  0 siblings, 0 replies; only message in thread
From: Matthew Malcomson @ 2022-02-28 12:09 UTC (permalink / raw)
  To: gcc-cvs

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-02-28 12:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-28 12:09 [gcc(refs/vendors/ARM/heads/morello)] Avoid defining MULTILIB_REUSE rule when no purecap multilib Matthew Malcomson

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).