This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [AArch64] --with-arch in config.gcc support "."


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]