Please consider this patch against:

http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD

The version I retrieved began with timestamp='2013-02-12'.

The effect of the patch is to detect when the libc is uClibc rather than
glibc (as you presently do sometimes for dietlibc). On my Linux distro
(Alpine Linux), we have both our x86 and x86_64 systems based on uClibc.
I had an issue where I couldn't package clang properly except by hacking
the config.guess file they included.

You say "Please send patches with a ChangeLog entry to
config-patches@gnu.org." Here's a ChangeLog entry:

2013-04-22  Jim Pryor  <dubious...@gmail.com>

       * config.guess (x86,x86_64:Linux:*:*): Test for uClibc.


--- config.guess.orig   2013-04-22 22:21:29.409239504 -0400
+++ config.guess        2013-04-22 22:25:10.537043561 -0400
@@ -917,12 +917,16 @@
     i*86:Linux:*:*)
        LIBC=gnu
        eval $set_cc_for_build
        sed 's/^        //' << EOF >$dummy.c
        #ifdef __dietlibc__
        LIBC=dietlibc
+       #else
+       #ifdef __UCLIBC__
+       LIBC=uclibc
+       #endif
        #endif
 EOF
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
        echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
        exit ;;
     ia64:Linux:*:*)
@@ -995,13 +999,21 @@
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
     vax:Linux:*:*)
        echo ${UNAME_MACHINE}-dec-linux-gnu
        exit ;;
     x86_64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       LIBC=gnu
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #ifdef __UCLIBC__
+       LIBC=uclibc
+       #endif
+EOF
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+       echo "${UNAME_MACHINE}-unknown-linux-${LIBC}"
        exit ;;
     xtensa*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
     i*86:DYNIX/ptx:4*:*)
        # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.

-- 
dubious...@gmail.com


_______________________________________________
config-patches mailing list
config-patches@gnu.org
https://lists.gnu.org/mailman/listinfo/config-patches

Reply via email to