summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/config.guess
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>1999-07-10 23:03:59 +0000
committerobrien <obrien@FreeBSD.org>1999-07-10 23:03:59 +0000
commitd4db5fb866b7ad5216abd5047774a3973b9901a9 (patch)
treeedca008aa0e9cdfae2ef7478f9109ca7f3a2a028 /contrib/gcc/config.guess
parentb822db150531f5b7067d4d970080b7358e07ae89 (diff)
downloadFreeBSD-src-d4db5fb866b7ad5216abd5047774a3973b9901a9.zip
FreeBSD-src-d4db5fb866b7ad5216abd5047774a3973b9901a9.tar.gz
Virgin import of GCC 2.7.2.3
Diffstat (limited to 'contrib/gcc/config.guess')
-rwxr-xr-xcontrib/gcc/config.guess24
1 files changed, 17 insertions, 7 deletions
diff --git a/contrib/gcc/config.guess b/contrib/gcc/config.guess
index 2ff0eba..5508638 100755
--- a/contrib/gcc/config.guess
+++ b/contrib/gcc/config.guess
@@ -319,9 +319,9 @@ EOF
# The BFD linker knows what the default object file format is, so
# first see if it will tell us.
ld_help_string=`ld --help 2>&1`
- if echo $ld_help_string | grep >/dev/null 2>&1 "supported emulations: elf_i[345]86"; then
- echo "${UNAME_MACHINE}-unknown-linux" ; exit 0
- elif echo $ld_help_string | grep >/dev/null 2>&1 "supported emulations: i[345]86linux"; then
+# if echo $ld_help_string | grep >/dev/null 2>&1 "supported emulations: elf_i[345]86"; then
+# echo "${UNAME_MACHINE}-unknown-linux" ; exit 0
+ if echo $ld_help_string | grep >/dev/null 2>&1 "supported emulations: i[345]86linux"; then
echo "${UNAME_MACHINE}-unknown-linuxaout" ; exit 0
elif echo $ld_help_string | grep >/dev/null 2>&1 "supported emulations: i[345]86coff"; then
echo "${UNAME_MACHINE}-unknown-linuxcoff" ; exit 0
@@ -329,17 +329,27 @@ EOF
echo alpha-unknown-linux ; exit 0
else
# Either a pre-BFD a.out linker (linuxoldld) or one that does not give us
- # useful --help. Gcc wants to distinguish between linuxoldld and linuxaout.
- test ! -d /usr/lib/ldscripts/. \
- && echo "${UNAME_MACHINE}-unknown-linuxoldld" && exit 0
+ # useful --help. Gcc wants to distinguish between linuxoldld and linuxaout,
+ # and between different C library versions.
+ echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
+ test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
# Determine whether the default compiler is a.out or elf
cat >dummy.c <<EOF
+#include <features.h>
main(argc, argv)
int argc;
char *argv[];
{
#ifdef __ELF__
- printf ("%s-unknown-linux\n", argv[1]);
+# ifdef __GLIBC__
+# if __GLIBC__ >= 2
+ printf ("%s-unknown-linux\n", argv[1]);
+# else
+ printf ("%s-unknown-linux-gnulibc1\n", argv[1]);
+# endif
+# else
+ printf ("%s-unknown-linux-gnulibc1\n", argv[1]);
+# endif
#else
printf ("%s-unknown-linuxaout\n", argv[1]);
#endif
OpenPOWER on IntegriCloud