Hi All, This is an update to the patch rebased to after the SVE2 options have been merged. Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Ok for trunk? Thanks, Tamar > -----Original Message----- > From: gcc-patches-owner@gcc.gnu.org > On Behalf Of Tamar Christina > Sent: Tuesday, May 21, 2019 18:00 > To: gcc-patches@gcc.gnu.org > Cc: nd ; James Greenhalgh ; > Richard Earnshaw ; Marcus Shawcroft > > Subject: [PATCH][GCC][AArch64] Make processing less fragile in config.gcc > > 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 > > 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. > > --