From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2049) id D24013858C3A; Tue, 21 Sep 2021 09:13:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D24013858C3A Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Matthew Malcomson To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/vendors/ARM/heads/morello)] Make GCC build a purecap libgcc as a multilib X-Act-Checkin: gcc X-Git-Author: Matthew Malcomson X-Git-Refname: refs/vendors/ARM/heads/morello X-Git-Oldrev: 148fe1c3bc53e7adad23a6e102611b640fe97149 X-Git-Newrev: 1f949c3d085a8994cd7579250b77197c23db435a Message-Id: <20210921091329.D24013858C3A@sourceware.org> Date: Tue, 21 Sep 2021 09:13:29 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Sep 2021 09:13:29 -0000 https://gcc.gnu.org/g:1f949c3d085a8994cd7579250b77197c23db435a commit 1f949c3d085a8994cd7579250b77197c23db435a Author: Matthew Malcomson 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