This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [AArch64] --with-arch in config.gcc support "."
- From: James Greenhalgh <james dot greenhalgh at arm dot com>
- To: Jiong Wang <jiong dot wang at arm dot com>
- Cc: Andreas Schwab <schwab at suse dot de>, gcc-patches at gcc dot gnu dot org, Marcus Shawcroft <Marcus dot Shawcroft at arm dot com>
- Date: Thu, 15 Oct 2015 10:04:23 +0100
- Subject: Re: [AArch64] --with-arch in config.gcc support "."
- Authentication-results: sourceware.org; auth=none
- References: <n99zizljy7r dot fsf at arm dot com> <mvmoag1tqvf dot fsf at hawking dot suse dot de> <561F6A6D dot 6060307 at arm dot com>
On Thu, Oct 15, 2015 at 09:57:17AM +0100, Jiong Wang wrote:
> On 14/10/15 16:24, Andreas Schwab wrote:
> >Jiong Wang <jiong.wang@arm.com> writes:
> >
> >>diff --git a/gcc/config.gcc b/gcc/config.gcc
> >>index 5818663..215ad9a 100644
> >>--- a/gcc/config.gcc
> >>+++ b/gcc/config.gcc
> >>@@ -3544,7 +3544,7 @@ case "${target}" in
> >> eval "val=\$with_$which"
> >> base_val=`echo $val | sed -e 's/\+.*//'`
> >>- ext_val=`echo $val | sed -e 's/[a-z0-9\-]\+//'`
> >>+ ext_val=`echo $val | sed -e 's/[a-z0-9\.\-]\+//'`
> >Neither backslash is needed inside bracket expressions (in fact, the
> >backslash is taken literally here) as the set of special characters is
> >completely different there.
> >
> >
> Thanks for pointing this out.
>
> I am surprised "-" doesn't need escape as it serve as range operator. Maybe
> sed will make it an operator when it's following number or alphabetic.
>
> Anyway, I tested below patch, which still parse the extension correctly.
>
> OK for trunk?
OK.
'-' does not have special meaning if it is the first or last character
inside a [list]. See
https://www.gnu.org/software/sed/manual/sed.html#Regular-Expressions for
more details (or the manual for your favourite sed).
Thanks,
James
> 2015-10-15 Jiong Wang <jiong.wang@arm.com>
>
> gcc/
> * config.gcc: Recognize "." in architecture base name for AArch64.
>
>
> diff --git a/gcc/config.gcc b/gcc/config.gcc
> index 5818663..215ad9a 100644
> --- a/gcc/config.gcc
> +++ b/gcc/config.gcc
> @@ -3544,7 +3544,7 @@ case "${target}" in
>
> eval "val=\$with_$which"
> base_val=`echo $val | sed -e 's/\+.*//'`
> - ext_val=`echo $val | sed -e 's/[a-z0-9\-]\+//'`
> + ext_val=`echo $val | sed -e 's/[a-z0-9.-]\+//'`
>
> if [ $which = arch ]; then
> def=aarch64-arches.def