aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1994-06-02 04:40:34 +0000
committerIan Lance Taylor <ian@airs.com>1994-06-02 04:40:34 +0000
commit9402894306d94786feebe623da6fa004edfa7dc6 (patch)
tree2f11c84d16b4d8ba3656bae2b35b2ea2a397a00c
parenta0de4c4d9ced7c8b512609df8def912e6829a420 (diff)
downloadfsf-binutils-gdb-9402894306d94786feebe623da6fa004edfa7dc6.zip
fsf-binutils-gdb-9402894306d94786feebe623da6fa004edfa7dc6.tar.gz
fsf-binutils-gdb-9402894306d94786feebe623da6fa004edfa7dc6.tar.bz2
* configure: If config.guess result is a prefix of the user
specified target, assume a native build and use the user specified target as the host alias. Remove SunOS patch suffix removal hack. * configure.in: Remove SunOS patch suffix removal hack.
-rw-r--r--ChangeLog5
-rwxr-xr-xconfigure36
-rw-r--r--configure.in8
3 files changed, 33 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog
index ce68a1a..5d0beec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
Thu Jun 2 00:12:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+ * configure: If config.guess result is a prefix of the user
+ specified target, assume a native build and use the user specified
+ target as the host alias. Remove SunOS patch suffix removal hack.
+ * configure.in: Remove SunOS patch suffix removal hack.
+
* Makefile.in (CROSS_CHECK_MODULES): Remove check-flex, since it's
in NATIVE_CHECK_MODULES.
diff --git a/configure b/configure
index bdc1db8..e80df82 100755
--- a/configure
+++ b/configure
@@ -328,6 +328,30 @@ case "${fatal}" in
guesssys=`echo ${progname} | sed 's/configure$/config.guess/'`
if host_alias=`${guesssys}`
then
+ # If the string we are going to use for
+ # the target is a prefix of the string
+ # we just guessed for the host, then
+ # assume we are running native, and force
+ # the same string for both target and host.
+ case $target_alias in
+ NOTARGET)
+ case $undefs in
+ NOUNDEFS) ;;
+ *)
+ if expr $host_alias : $undefs >/dev/null
+ then
+ host_alias=$undefs
+ fi
+ ;;
+ esac
+ ;;
+ *)
+ if expr $host_alias : $target_alias >/dev/null
+ then
+ host_alias=$target_alias
+ fi
+ ;;
+ esac
echo "Configuring for a ${host_alias} host." 1>&2
arguments="--host=$host_alias $arguments"
else
@@ -755,11 +779,6 @@ EOF
# real copy now in ${subdir}/Makefile.tem
- # Remove patch suffixes from host name.
- # See similar code in configure.in.
- # Example: 'sparc-sun-sunos4.1.3_U1'
- host_osnop=`echo ${host_os} | sed '/sunos/s/_U1//'`
-
# prepend warning about editting, and a bunch of variables.
rm -f ${Makefile}
cat > ${Makefile} <<EOF
@@ -770,7 +789,7 @@ host_alias = ${host_alias}
host_cpu = ${host_cpu}
host_vendor = ${host_vendor}
host_os = ${host_os}
-host_canonical = ${host_cpu}-${host_vendor}-${host_osnop}
+host_canonical = ${host_cpu}-${host_vendor}-${host_os}
target_alias = ${target_alias}
target_cpu = ${target_cpu}
target_vendor = ${target_vendor}
@@ -779,13 +798,12 @@ target_canonical = ${target_cpu}-${target_vendor}-${target_os}
EOF
case "${build}" in
"") ;;
- *) build_osnop=`echo ${build_os} | sed '/sunos/s/_U1//'`
- cat >> ${Makefile} << EOF
+ *) cat >> ${Makefile} << EOF
build_alias = ${build_alias}
build_cpu = ${build_cpu}
build_vendor = ${build_vendor}
build_os = ${build_os}
-build_canonical = ${build_cpu}-${build_vendor}-${build_osnop}
+build_canonical = ${build_cpu}-${build_vendor}-${build_os}
EOF
esac
diff --git a/configure.in b/configure.in
index 932cc25..1ed4555 100644
--- a/configure.in
+++ b/configure.in
@@ -149,13 +149,7 @@ esac
is_cross_compiler=
-# Remove patch suffixes from host and target names.
-# Example: 'sparc-sun-sunos4.1.3_U1'
-# See similar code in configure.
-hostnop=`echo ${host} | sed '/sun-sunos/s/_U1//'`
-targetnop=`echo ${target} | sed '/sun-sunos/s/_U1//'`
-
-if [ x"${hostnop}" = x"${targetnop}" ] ; then
+if [ x"${host}" = x"${target}" ] ; then
# when doing a native toolchain, don't build the targets
# that are in the 'cross only' list
for i in ${cross_only} ; do