public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-4932] config, aarch64: Use a more compatible sed invocation.
@ 2023-10-25 19:46 Iain D Sandoe
  0 siblings, 0 replies; only message in thread
From: Iain D Sandoe @ 2023-10-25 19:46 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:8f62ce10bc984855ca98483746ead2730eb36e2e

commit r14-4932-g8f62ce10bc984855ca98483746ead2730eb36e2e
Author: Iain Sandoe <iain@sandoe.co.uk>
Date:   Tue Oct 17 11:58:52 2023 +0100

    config, aarch64: Use a more compatible sed invocation.
    
    Currently, the sed command used to parse --with-{cpu,tune,arch} are
    using GNU-specific extension (automatically recognising extended regex).
    
    This is failing on Darwin, which defualts to Posix behaviour.
    However '-E' is accepted to indicate an extended RE.  Strictly, this
    is also not really sufficient, since we should only require a Posix
    sed.
    
    gcc/ChangeLog:
    
            * config.gcc: Use -E to to sed to indicate that we are using
            extended REs.
    
    Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>

Diff:
---
 gcc/config.gcc | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/gcc/config.gcc b/gcc/config.gcc
index 606d3a8513ea..09a7fb13da12 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -4199,8 +4199,8 @@ case "${target}" in
 		fi
 		for which in cpu arch tune; do
 			eval "val=\$with_$which"
-			base_val=`echo $val | sed -e 's/\+.*//'`
-			ext_val=`echo $val | sed -e 's/[a-z0-9.-]\+//'`
+			base_val=`echo $val | sed -E -e 's/\+.*//'`
+			ext_val=`echo $val | sed -E -e 's/[a-z0-9.-]+//'`
 
 			if [ $which = arch ]; then
 			  def=aarch64-arches.def
@@ -4232,9 +4232,9 @@ case "${target}" in
 
 			  while [ x"$ext_val" != x ]
 			  do
-				ext_val=`echo $ext_val | sed -e 's/\+//'`
-				ext=`echo $ext_val | sed -e 's/\+.*//'`
-				base_ext=`echo $ext | sed -e 's/^no//'`
+				ext_val=`echo $ext_val | sed -E -e 's/\+//'`
+				ext=`echo $ext_val | sed -E -e 's/\+.*//'`
+				base_ext=`echo $ext | sed -E -e 's/^no//'`
 				opt_line=`echo -e "$options_parsed" | \
 					grep "^\"$base_ext\""`
 
@@ -4245,7 +4245,7 @@ case "${target}" in
 				  echo "Unknown extension used in --with-$which=$val" 1>&2
 				  exit 1
 				fi
-				ext_val=`echo $ext_val | sed -e 's/[a-z0-9]\+//'`
+				ext_val=`echo $ext_val | sed -E -e 's/[a-z0-9]+//'`
 			  done
 
 			  true

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-10-25 19:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-25 19:46 [gcc r14-4932] config, aarch64: Use a more compatible sed invocation Iain D Sandoe

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).