From 3274332f90b562961cbfdd833fe2a6ed5f340b72 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 10 Oct 1996 18:15:03 +0000 Subject: [PATCH] * configure: Don't get confused by CPU-VENDOR-linux-gnu. --- ChangeLog | 2 ++ configure | 24 ++++++++++++------------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index ccf96c93934..edd830bf986 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,8 @@ Thu Oct 10 10:37:17 1996 Stan Shebs Thu Oct 10 12:30:54 1996 Ian Lance Taylor + * configure: Don't get confused by CPU-VENDOR-linux-gnu. + * configure: Rework yesterday's sed script patch. * config.sub: Merge with FSF. diff --git a/configure b/configure index 0af67edb987..83a3bf9d908 100755 --- a/configure +++ b/configure @@ -573,9 +573,9 @@ esac case "${build_alias}" in "") if result=`${config_shell} ${configsub} ${host_alias}` ; then - build_cpu=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` - build_vendor=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` - build_os=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` + build_cpu=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` + build_vendor=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` + build_os=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` build=${build_cpu}-${build_vendor}-${build_os} build_alias=${host_alias} fi @@ -583,9 +583,9 @@ case "${build_alias}" in *) if result=`${config_shell} ${configsub} ${build_alias}` ; then buildopt="--build=${build_alias}" - build_cpu=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` - build_vendor=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` - build_os=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` + build_cpu=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` + build_vendor=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` + build_os=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` build=${build_cpu}-${build_vendor}-${build_os} else echo "Unrecognized build system name ${build_alias}." 1>&2 @@ -600,9 +600,9 @@ else echo "Unrecognized host system name ${host_alias}." 1>&2 exit 1 fi -host_cpu=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` -host_vendor=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` -host_os=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` +host_cpu=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` host=${host_cpu}-${host_vendor}-${host_os} . ${tmpfile}.hst @@ -613,9 +613,9 @@ else echo "Unrecognized target system name ${target_alias}." 1>&2 exit 1 fi -target_cpu=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` -target_vendor=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` -target_os=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` +target_cpu=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +target_vendor=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +target_os=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` target=${target_cpu}-${target_vendor}-${target_os} . ${tmpfile}.tgt -- 2.30.2