[gcc(refs/vendors/ARM/heads/morello)] Avoid defining MULTILIB_REUSE rule when no purecap multilib
Matthew Malcomson
matmal01@gcc.gnu.org
Mon Feb 28 12:09:41 GMT 2022
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
More information about the Gcc-cvs
mailing list