diff options
author | Iain Sandoe <iain@sandoe.co.uk> | 2023-10-17 11:58:52 +0100 |
---|---|---|
committer | Iain Sandoe <iain@sandoe.co.uk> | 2023-10-25 20:44:20 +0100 |
commit | 8f62ce10bc984855ca98483746ead2730eb36e2e (patch) | |
tree | 647ff9674ed485482a4c5a49bdeacd162f35ed0b /gcc | |
parent | 1aa9f1cc9887cde12ff6502358258d0bcf0db175 (diff) | |
download | gcc-8f62ce10bc984855ca98483746ead2730eb36e2e.zip gcc-8f62ce10bc984855ca98483746ead2730eb36e2e.tar.gz gcc-8f62ce10bc984855ca98483746ead2730eb36e2e.tar.bz2 |
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>
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config.gcc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/config.gcc b/gcc/config.gcc index 606d3a8..09a7fb1 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 |