public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Kyrill Tkachov <kyrylo.tkachov@foss.arm.com>
To: Tamar Christina <Tamar.Christina@arm.com>,
	"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Cc: nd <nd@arm.com>, James Greenhalgh <James.Greenhalgh@arm.com>,
	Richard Earnshaw <Richard.Earnshaw@arm.com>,
	Marcus Shawcroft <Marcus.Shawcroft@arm.com>
Subject: Re: [PATCH][GCC][AArch64] Make processing less fragile in config.gcc
Date: Fri, 24 May 2019 16:23:00 -0000	[thread overview]
Message-ID: <0f7d9eaf-ad81-25ad-9c8e-616c791f3168@foss.arm.com> (raw)
In-Reply-To: <20190521170022.GA10685@arm.com>

Hi Tamar,

On 5/21/19 6:00 PM, Tamar Christina wrote:
> Hi All,
>
> Due to config.gcc all the options need to be on one line because of 
> the grep
> lines which would select only the first line of the option.
>
> This causes it not to select the right bits on options that are spread 
> over
> multiple lines when the --with-arch configure option is used.  The 
> issue happens
> silently and you just get a compiler with an incorrect set of default 
> flags.
>
> The current rules are quite rigid:
>
>    1) No space between the AARCH64_OPT_EXTENSION and the opening (.
>    2) No space between the opening ( and the extension name.
>    3) No space after the extension name before the ,.
>    4) Spaces are only allowed after a , and around |.
>
> This patch makes this a lot less fragile by using the C pre-processor 
> to flatten
> the list and then provides much more flexible regex using group 
> matching to
> process the options instead of string replacement.  This removes all the
> restrictions above and makes the code a bit more readable.
>
> Bootstrapped Regtested on aarch64-none-linux-gnu and no issues.
>
> Ok for trunk? and for eventual backport?
>
> Thanks,
> Tamar
>
> gcc/ChangeLog:
>
> 2019-05-21  Tamar Christina  <tamar.christina@arm.com>
>
>         PR target/89517
>         * config.gcc: Relax parsing of AARCH64_OPT_EXTENSION.
>         * config/aarch64/aarch64-option-extensions.def: Add new comments
>         and restore easier to read options.

LGTM FWIW, but I'm afraid you'll need to rebase it over the recent 
addition of sve2 family to the extensions.

Thanks,

Kyrill



>
> -- 

  reply	other threads:[~2019-05-24 16:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-21 17:00 Tamar Christina
2019-05-24 16:23 ` Kyrill Tkachov [this message]
2019-06-25  8:30 ` Tamar Christina
2019-07-08 17:04   ` James Greenhalgh

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=0f7d9eaf-ad81-25ad-9c8e-616c791f3168@foss.arm.com \
    --to=kyrylo.tkachov@foss.arm.com \
    --cc=James.Greenhalgh@arm.com \
    --cc=Marcus.Shawcroft@arm.com \
    --cc=Richard.Earnshaw@arm.com \
    --cc=Tamar.Christina@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=nd@arm.com \
    /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).