From bb562af3ececb75d81472b83747cfac7c72121ab Mon Sep 17 00:00:00 2001
From: Jim Pryor <dubiousjim@gmail.com>
Date: Wed, 24 Apr 2013 10:32:17 +1000
Subject: [PATCH]        * config.guess (x86_64:Linux:*:*): Test for uClibc.

Signed-off-by: Ben Elliston <bje@gnu.org>
---
 ChangeLog    | 4 ++++
 config.guess | 6 ++++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 0e49c17..6bf3f93 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-04-24  Jim Pryor  <dubiousjim@gmail.com>
+
+       * config.guess (x86_64:Linux:*:*): Test for uClibc.
+
 2013-02-12  Christian Svensson  <blue@cmd.nu>
 
 	* config.guess (or1k:Linux:*:*): New.
diff --git a/config.guess b/config.guess
index f475ceb..36bcfcd 100755
--- a/config.guess
+++ b/config.guess
@@ -2,7 +2,7 @@
 # Attempt to guess a canonical system name.
 #   Copyright 1992-2013 Free Software Foundation, Inc.
 
-timestamp='2013-02-12'
+timestamp='2013-04-24'
 
 # 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
@@ -998,7 +998,9 @@ EOF
 	echo ${UNAME_MACHINE}-dec-linux-gnu
 	exit ;;
     x86_64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	LIBC=gnu
+	test -r /lib/libc.so && od -An -S13 /lib/libc.so | grep -q __uClibc_main && LIBC=uclibc
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     xtensa*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu