* [PATCH] build: Implement --with-multilib-list for avr target
@ 2021-06-07 7:30 Matt Jacobson
2021-07-05 23:09 ` Matt Jacobson
2021-12-03 2:54 ` Jeff Law
0 siblings, 2 replies; 4+ messages in thread
From: Matt Jacobson @ 2021-06-07 7:30 UTC (permalink / raw)
To: gcc-patches
The AVR target builds a lot of multilib variants of target libraries by default,
and I found myself wanting to use the --with-multilib-list argument to limit
what I was building, to shorten build times. This patch implements that option
for the AVR target.
Tested by configuring and building an AVR compiler and target libs on macOS.
I don't have commit access, so if this patch is suitable, I'd need someone else
to commit it for me. Thanks.
gcc/ChangeLog:
2020-06-07 Matt Jacobson <mhjacobson@me.com>
* config.gcc: For the AVR target, populate TM_MULTILIB_CONFIG.
* config/avr/genmultilib.awk: Add ability to filter generated multilib
list.
* config/avr/t-avr: Pass TM_MULTILIB_CONFIG to genmultilib.awk.
* configure.ac: Update help string for --with-multilib-list.
* configure: Regenerate.
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 6a349965c..fd83996a4 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -4201,6 +4201,13 @@ case "${target}" in
fi
;;
+ avr-*-*)
+ # Handle --with-multilib-list.
+ if test "x${with_multilib_list}" != xdefault; then
+ TM_MULTILIB_CONFIG="${with_multilib_list}"
+ fi
+ ;;
+
csky-*-*)
supported_defaults="cpu endian float"
;;
diff --git a/gcc/config/avr/genmultilib.awk b/gcc/config/avr/genmultilib.awk
index 2d07c0e53..ad8814602 100644
--- a/gcc/config/avr/genmultilib.awk
+++ b/gcc/config/avr/genmultilib.awk
@@ -67,6 +67,16 @@ BEGIN {
dir_long_double = "long-double" (96 - with_long_double)
opt_long_double = "mlong-double=" (96 - with_long_double)
+
+ if (with_multilib_list != "")
+ {
+ split(with_multilib_list, multilib_list, ",")
+
+ for (i in multilib_list)
+ {
+ multilibs[multilib_list[i]] = 1
+ }
+ }
}
##################################################################
@@ -137,6 +147,9 @@ BEGIN {
if (core == "avr1")
next
+ if (with_multilib_list != "" && !(core in multilibs))
+ next
+
option[core] = "mmcu=" core
m_options = m_options m_sep option[core]
@@ -150,6 +163,9 @@ BEGIN {
if (core == "avr1")
next
+ if (with_multilib_list != "" && !(core in multilibs))
+ next
+
opts = option[core]
# split device specific feature list
diff --git a/gcc/config/avr/t-avr b/gcc/config/avr/t-avr
index 3e1a1ba68..7d20c6107 100644
--- a/gcc/config/avr/t-avr
+++ b/gcc/config/avr/t-avr
@@ -127,6 +127,7 @@ t-multilib-avr: $(srcdir)/config/avr/genmultilib.awk \
-v HAVE_LONG_DOUBLE64=$(HAVE_LONG_DOUBLE64) \
-v with_double=$(WITH_DOUBLE) \
-v with_long_double=$(WITH_LONG_DOUBLE) \
+ -v with_multilib_list=$(TM_MULTILIB_CONFIG) \
-f $< $< $(AVR_MCUS) > $@
include t-multilib-avr
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 715fcba04..c3ed65df7 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -1106,7 +1106,7 @@ if test x"$enable_hsa" = x1 ; then
fi
AC_ARG_WITH(multilib-list,
-[AS_HELP_STRING([--with-multilib-list], [select multilibs (AArch64, SH and x86-64 only)])],
+[AS_HELP_STRING([--with-multilib-list], [select multilibs (AArch64, AVR, i386, or1k, RISC-V, SH, and x86-64 only)])],
:,
with_multilib_list=default)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] build: Implement --with-multilib-list for avr target
2021-06-07 7:30 [PATCH] build: Implement --with-multilib-list for avr target Matt Jacobson
@ 2021-07-05 23:09 ` Matt Jacobson
2021-07-19 20:44 ` Matt Jacobson
2021-12-03 2:54 ` Jeff Law
1 sibling, 1 reply; 4+ messages in thread
From: Matt Jacobson @ 2021-07-05 23:09 UTC (permalink / raw)
To: gcc-patches
> On Jun 7, 2021, at 3:30 AM, Matt Jacobson <mhjacobson@me.com> wrote:
>
> The AVR target builds a lot of multilib variants of target libraries by default,
> and I found myself wanting to use the --with-multilib-list argument to limit
> what I was building, to shorten build times. This patch implements that option
> for the AVR target.
>
> Tested by configuring and building an AVR compiler and target libs on macOS.
>
> I don't have commit access, so if this patch is suitable, I'd need someone else
> to commit it for me. Thanks.
Ping. (Please let me know if I’ve made some process error here; this is my
first change to GCC.)
Original mail:
<https://gcc.gnu.org/pipermail/gcc-patches/2021-June/572041.html>
Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] build: Implement --with-multilib-list for avr target
2021-07-05 23:09 ` Matt Jacobson
@ 2021-07-19 20:44 ` Matt Jacobson
0 siblings, 0 replies; 4+ messages in thread
From: Matt Jacobson @ 2021-07-19 20:44 UTC (permalink / raw)
To: gcc-patches
> On Jul 5, 2021, at 7:09 PM, Matt Jacobson <mhjacobson@me.com> wrote:
>
>> On Jun 7, 2021, at 3:30 AM, Matt Jacobson <mhjacobson@me.com> wrote:
>>
>> The AVR target builds a lot of multilib variants of target libraries by default,
>> and I found myself wanting to use the --with-multilib-list argument to limit
>> what I was building, to shorten build times. This patch implements that option
>> for the AVR target.
>>
>> Tested by configuring and building an AVR compiler and target libs on macOS.
>>
>> I don't have commit access, so if this patch is suitable, I'd need someone else
>> to commit it for me. Thanks.
>
> Ping. (Please let me know if I’ve made some process error here; this is my
> first change to GCC.)
Ping again. Thanks!
Original mail:
<https://gcc.gnu.org/pipermail/gcc-patches/2021-June/572041.html>
Matt
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] build: Implement --with-multilib-list for avr target
2021-06-07 7:30 [PATCH] build: Implement --with-multilib-list for avr target Matt Jacobson
2021-07-05 23:09 ` Matt Jacobson
@ 2021-12-03 2:54 ` Jeff Law
1 sibling, 0 replies; 4+ messages in thread
From: Jeff Law @ 2021-12-03 2:54 UTC (permalink / raw)
To: Matt Jacobson, gcc-patches
On 6/7/2021 1:30 AM, Matt Jacobson via Gcc-patches wrote:
> gcc/ChangeLog:
>
> 2020-06-07 Matt Jacobson<mhjacobson@me.com>
>
> * config.gcc: For the AVR target, populate TM_MULTILIB_CONFIG.
> * config/avr/genmultilib.awk: Add ability to filter generated multilib
> list.
> * config/avr/t-avr: Pass TM_MULTILIB_CONFIG to genmultilib.awk.
> * configure.ac: Update help string for --with-multilib-list.
> * configure: Regenerate.
>
THanks. I've pushed this to the trunk. Sorry about the long wait.
jeff
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-12-03 2:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-07 7:30 [PATCH] build: Implement --with-multilib-list for avr target Matt Jacobson
2021-07-05 23:09 ` Matt Jacobson
2021-07-19 20:44 ` Matt Jacobson
2021-12-03 2:54 ` Jeff Law
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).