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)] Temporary step to get multilib using a bit better Date: Mon, 28 Feb 2022 12:09:36 +0000 (GMT) [thread overview] Message-ID: <20220228120936.267CE3858015@sourceware.org> (raw) https://gcc.gnu.org/g:951e27d6191b20b18c0a1b948cbf9bbb9fecee79 commit 951e27d6191b20b18c0a1b948cbf9bbb9fecee79 Author: Matthew Malcomson <matthew.malcomson@arm.com> Date: Fri Feb 25 12:11:08 2022 +0000 Temporary step to get multilib using a bit better This is a hack for the moment. The approach we should use is to create a canonicalised version of the architecture string for choosing multilibs (similar to commit f58d03b5d did for arm). What we're doing here is artificially handling the particular architecture combination that glibc uses to build specially by linking that to the standard C64 multilib. N.b. we also need to update the `genmultilib` script. This script turned a description of names into a pathname. However, because we wanted to include a multilib option without it forming a directory path (we did not want the -march=morello+c64 option to be included as part of the path) a temporary in this script had multiple `/`s at the end of a directory and only removed one of them. The reason we only want `purecap` as a directory name is that the `purecap` part defines the ABI while the other architecture options are not the determining factor (we can have purecap with many different architecture options). This change removes all trailing `/`s, which stops a break in the glibc build scripts when using multilibs. Diff: --- gcc/config/aarch64/t-aarch64 | 19 +++++++++++++++---- gcc/genmultilib | 2 +- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/gcc/config/aarch64/t-aarch64 b/gcc/config/aarch64/t-aarch64 index a05eecd129d..a4b8ad86dda 100644 --- a/gcc/config/aarch64/t-aarch64 +++ b/gcc/config/aarch64/t-aarch64 @@ -159,10 +159,21 @@ 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)))) march=morello+c64 -MULTILIB_EXCEPTIONS = mabi=*lp*/march=morello+c64 -MULTILIB_EXCEPTIONS += mabi=purecap -MULTILIB_EXCEPTIONS += march=morello+c64 +MULTILIB_OPTIONS = $(subst $(comma),/, $(patsubst %, mabi=%, $(subst $(comma),$(comma)mabi=,$(TM_MULTILIB_CONFIG)))) march=morello+c64 march=morello+c64+nolse +MULTILIB_REQUIRED = mabi=ilp32 +MULTILIB_REQUIRED += mabi=lp64 +MULTILIB_REQUIRED += mabi=purecap/march=morello+c64 +# MORELLO TODO This is a bit of an ugly approach. We want to say "ignore any +# extra architecture extensions other than the +c64 extension when deciding +# which multilib to use". This statement below says "the option +# `march=morello+c64+nolse` is the same as the option `march=morello+c64`". +# Those statements are not the same. +# +# The approach I expect would be best would be to add something like Srinaths +# 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. +MULTILIB_REUSE = mabi.purecap/march.morello+c64=mabi.purecap/march.morello+c64+nolse MULTILIB_DIRNAMES = $(subst $(comma), ,$(TM_MULTILIB_CONFIG)) insn-conditions.md: s-check-sve-md diff --git a/gcc/genmultilib b/gcc/genmultilib old mode 100644 new mode 100755 index 292ecc4e20d..36fbd3bb880 --- a/gcc/genmultilib +++ b/gcc/genmultilib @@ -382,7 +382,7 @@ else dirout=`echo ${combo} | sed -e 's/=/-/g'` fi # Remove the leading and trailing slashes. -dirout=`echo ${dirout} | sed -e 's|^/||' -e 's|/*:/*|:|' -e 's|/$||g'` +dirout=`echo ${dirout} | sed -e 's|^/*||' -e 's|/*:/*|:|' -e 's|/*$||g'` # Use the OS directory names rather than the option names. if [ -n "${toosdirnames}" ]; then
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=20220228120936.267CE3858015@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: linkBe 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).