* A daring, but much needed change to clean up some of this mess.

2001-06-01  Ben Elliston  <bje@redhat.com>

	* config.guess (i*86:Linux:*:*): Examine the list of supported
	targets, not the list of supported emulations when capturing
	the output of "ld --help".  This causes problems on systems
	where GNU ld is built with support for all targets. Adjust
	cases in the switch accordingly.

	* config.guess: Other small Linux cleanups. Remove unnecessary
	logic for setting $VENDOR, since UNAME_MACHINE will always be
	i*86 in this case.
This commit is contained in:
Ben Elliston 2001-06-01 03:08:29 +00:00
parent ed88539147
commit caefff9ec1
2 changed files with 32 additions and 31 deletions

View File

@ -1,3 +1,15 @@
2001-06-01 Ben Elliston <bje@redhat.com>
* config.guess (i*86:Linux:*:*): Examine the list of supported
targets, not the list of supported emulations when capturing
the output of "ld --help". This causes problems on systems
where GNU ld is built with support for all targets. Adjust
cases in the switch accordingly.
* config.guess: Other small Linux cleanups. Remove unnecessary
logic for setting $VENDOR, since UNAME_MACHINE will always be
i*86 in this case.
2001-05-30 Mo DeJong <mdejong@redhat.com> 2001-05-30 Mo DeJong <mdejong@redhat.com>
* config.sub: Handle windows32 and runtimes. * config.sub: Handle windows32 and runtimes.

51
config.guess vendored
View File

@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc. # Free Software Foundation, Inc.
timestamp='2001-04-20' timestamp='2001-06-01'
# This file is free software; you can redistribute it and/or modify it # This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by # under the terms of the GNU General Public License as published by
@ -883,38 +883,27 @@ EOF
# The BFD linker knows what the default object file format is, so # The BFD linker knows what the default object file format is, so
# first see if it will tell us. cd to the root directory to prevent # first see if it will tell us. cd to the root directory to prevent
# problems with other programs or directories called `ld' in the path. # problems with other programs or directories called `ld' in the path.
ld_supported_emulations=`cd /; ld --help 2>&1 \ ld_supported_targets=`cd /; ld --help 2>&1 \
| sed -ne '/supported emulations:/!d | sed -ne '/supported targets:/!d
s/[ ][ ]*/ /g s/[ ][ ]*/ /g
s/.*supported emulations: *// s/.*supported targets: *//
s/ .*// s/ .*//
p'` p'`
case "$ld_supported_emulations" in case "$ld_supported_targets" in
i*86linux) elf32-i386)
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
exit 0
;;
elf_i*86)
TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
;; ;;
i*86coff) a.out-i386-linux)
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
exit 0 ;;
coff-i386)
echo "${UNAME_MACHINE}-pc-linux-gnucoff" echo "${UNAME_MACHINE}-pc-linux-gnucoff"
exit 0 exit 0 ;;
;; "")
esac # Either a pre-BFD a.out linker (linux-gnuoldld) or
# Either a pre-BFD a.out linker (linux-gnuoldld) # one that does not give us useful --help.
# or one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
# GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. exit 0 ;;
# If ld does not provide *any* "supported emulations:"
# that means it is gnuoldld.
test -z "$ld_supported_emulations" && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
case "${UNAME_MACHINE}" in
i*86)
VENDOR=pc;
;;
*)
VENDOR=unknown;
;;
esac esac
# Determine whether the default compiler is a.out or elf # Determine whether the default compiler is a.out or elf
cat >$dummy.c <<EOF cat >$dummy.c <<EOF
@ -928,15 +917,15 @@ EOF
#ifdef __ELF__ #ifdef __ELF__
# ifdef __GLIBC__ # ifdef __GLIBC__
# if __GLIBC__ >= 2 # if __GLIBC__ >= 2
printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); printf ("%s-pc-linux-gnu\n", argv[1]);
# else # else
printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); printf ("%s-pc-linux-gnulibc1\n", argv[1]);
# endif # endif
# else # else
printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); printf ("%s-pc-linux-gnulibc1\n", argv[1]);
# endif # endif
#else #else
printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); printf ("%s-pc-linux-gnuaout\n", argv[1]);
#endif #endif
return 0; return 0;
} }