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)] Make GCC build a purecap libgcc as a multilib
Date: Tue, 21 Sep 2021 09:13:29 +0000 (GMT)	[thread overview]
Message-ID: <20210921091329.D24013858C3A@sourceware.org> (raw)

https://gcc.gnu.org/g:1f949c3d085a8994cd7579250b77197c23db435a

commit 1f949c3d085a8994cd7579250b77197c23db435a
Author: Matthew Malcomson <matthew.malcomson@arm.com>
Date:   Mon Aug 9 10:52:40 2021 +0100

    Make GCC build a purecap libgcc as a multilib
    
    This means we can simply build an aarch64-none-elf cross compiler and
    have it generate the -march=morello+c64 -mabi=purecap libgcc as
    necessary.
    
    Note that this means we need the Morello binutils in our path whenever
    compiling an aarch64-none-elf toolchain unless we specifically request
    to avoid making the purecap multilib.
    
    Have enabled using --with-multilib-list=purecap but not added that
    multilib to the default list on aarch64-none-linux-gnu.  We can't build
    these purecap libraries on aarch64 linux since there are other blockers
    (like enabling GCC in total so we can build glibc).  Hence this is not
    getting tested at the moment (have tested that attempting to build
    libgcc purecap multilib at least gets past the configure stage, but we
    fail on having the relevant glibc headers in a purecap multilib
    subdirectory).

Diff:
---
 gcc/config.gcc               | 6 +++---
 gcc/config/aarch64/t-aarch64 | 5 ++++-
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/gcc/config.gcc b/gcc/config.gcc
index 23703681deb..bcc9a94d79f 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -1056,12 +1056,12 @@ aarch64*-*-elf | aarch64*-*-fuchsia* | aarch64*-*-rtems*)
 	esac
 	aarch64_multilibs="${with_multilib_list}"
 	if test "$aarch64_multilibs" = "default"; then
-		aarch64_multilibs="lp64,ilp32"
+		aarch64_multilibs="lp64,ilp32,purecap"
 	fi
 	aarch64_multilibs=`echo $aarch64_multilibs | sed -e 's/,/ /g'`
 	for aarch64_multilib in ${aarch64_multilibs}; do
 		case ${aarch64_multilib} in
-		ilp32 | lp64 )
+		ilp32 | lp64 | purecap )
 			TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${aarch64_multilib}"
 			;;
 		*)
@@ -1102,7 +1102,7 @@ aarch64*-*-linux*)
 	aarch64_multilibs=`echo $aarch64_multilibs | sed -e 's/,/ /g'`
 	for aarch64_multilib in ${aarch64_multilibs}; do
 		case ${aarch64_multilib} in
-		ilp32 | lp64 )
+		ilp32 | lp64 | purecap )
 			TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${aarch64_multilib}"
 			;;
 		*)
diff --git a/gcc/config/aarch64/t-aarch64 b/gcc/config/aarch64/t-aarch64
index 11d20b7be14..a05eecd129d 100644
--- a/gcc/config/aarch64/t-aarch64
+++ b/gcc/config/aarch64/t-aarch64
@@ -159,7 +159,10 @@ aarch64-bti-insert.o: $(srcdir)/config/aarch64/aarch64-bti-insert.c \
 		$(srcdir)/config/aarch64/aarch64-bti-insert.c
 
 comma=,
-MULTILIB_OPTIONS    = $(subst $(comma),/, $(patsubst %, mabi=%, $(subst $(comma),$(comma)mabi=,$(TM_MULTILIB_CONFIG))))
+MULTILIB_OPTIONS    = $(subst $(comma),/, $(patsubst %, mabi=%, $(subst $(comma),$(comma)mabi=,$(TM_MULTILIB_CONFIG)))) march=morello+c64
+MULTILIB_EXCEPTIONS = mabi=*lp*/march=morello+c64
+MULTILIB_EXCEPTIONS += mabi=purecap
+MULTILIB_EXCEPTIONS += march=morello+c64
 MULTILIB_DIRNAMES   = $(subst $(comma), ,$(TM_MULTILIB_CONFIG))
 
 insn-conditions.md: s-check-sve-md


                 reply	other threads:[~2021-09-21  9:13 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=20210921091329.D24013858C3A@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).