From: Georg-Johann Lay <avr@gjlay.de>
To: gcc-patches <gcc-patches@gcc.gnu.org>
Cc: Denis Chertykov <chertykov@gmail.com>
Subject: Re: [patch,avr] Simplify genmultilib.awk
Date: Tue, 23 May 2017 08:25:00 -0000 [thread overview]
Message-ID: <5be5a85c-f0aa-1780-2ebb-57b88f9e1715@gjlay.de> (raw)
In-Reply-To: <CADOs=zYpQJ2N6erG8KZn8y1RtCOgQn0SLBKa0ecsPQXY2T2k=Q@mail.gmail.com>
On 22.05.2017 13:47, Denis Chertykov wrote:
> 2017-05-22 15:37 GMT+04:00 Georg-Johann Lay <avr@gjlay.de>:
>> This patch simplifies genmultilib.awk so that it generates
>> MULTILIB_REQUIRED instead of the complement, MULTILIB_EXCEPTIONS.
>>
>> The current awk script dates back to the days when we mapped
>> all the > 200 devices to the mmcu core and also parts of
>> --help=target to list all devices were generated from avr-mmcus.
>> That code rot is also cleaned up. Moreover, the structure now allows
>> for simpler addition of new multilib options which are likely to come
>> in the near future.
>>
>> The result of -print-multi-lib is:
>>
>> .;
>> avr25;@mmcu=avr25
>> avr3;@mmcu=avr3
>> avr31;@mmcu=avr31
>> avr35;@mmcu=avr35
>> avr4;@mmcu=avr4
>> avr5;@mmcu=avr5
>> avr51;@mmcu=avr51
>> avr6;@mmcu=avr6
>> avrxmega2;@mmcu=avrxmega2
>> avrxmega4;@mmcu=avrxmega4
>> avrxmega5;@mmcu=avrxmega5
>> avrxmega6;@mmcu=avrxmega6
>> avrxmega7;@mmcu=avrxmega7
>> avrtiny;@mmcu=avrtiny
>> tiny-stack;@msp8
>> avr25/tiny-stack;@mmcu=avr25@msp8
>>
>> hence unchanged.
>>
>> Ok for trunk?
>>
>> Johann
>>
>>
>> * config/avr/t-avr (AWK) [t-multilib]: Remove "-v FORMAT=Makefile"
>> command option from $(AWK) call.
>> * config/avr/genmultilib.awk: Simplify and rewrite so that it
>> generates MULTILIB_REQUIRED instead of MULTILIB_EXCEPTIONS.
>> [FORMAT]: Remove handling of variable.
>> * config/avr/t-multilib: Regenerate.
>
> Approved.
> Please commit.
Also committed the following change to make it work with less common
awk implementations:
https://gcc.gnu.org/r248357
Johann
Index: config/avr/genmultilib.awk
===================================================================
--- config/avr/genmultilib.awk (revision 248332)
+++ config/avr/genmultilib.awk (working copy)
@@ -123,7 +123,7 @@ BEGIN {
have[opts] = 1
# Some special handling for the default mmcu: Remove a
# leading "mmcu=avr2/" in order not to confuse genmultilib.
- opts = gensub (/mmcu=avr2\//, "", 1, opts)
+ gsub (/^mmcu=avr2\//, "", opts)
if (opts != "mmcu=avr2")
m_required = m_required " \\\n\t" opts
}
prev parent reply other threads:[~2017-05-23 7:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-22 11:48 Georg-Johann Lay
2017-05-22 11:50 ` Denis Chertykov
2017-05-23 8:25 ` Georg-Johann Lay [this message]
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=5be5a85c-f0aa-1780-2ebb-57b88f9e1715@gjlay.de \
--to=avr@gjlay.de \
--cc=chertykov@gmail.com \
--cc=gcc-patches@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).