--- gdb-6.1/bfd/config.bfd.uclibc 2004-03-13 13:37:09.000000000 +0100 +++ gdb-6.1/bfd/config.bfd 2004-05-11 17:59:12.000000000 +0200 @@ -121,7 +121,7 @@ case "${targ}" in targ_defvec=ecoffalpha_little_vec targ_selvecs=bfd_elf64_alpha_vec ;; - alpha*-*-linux-gnu* | alpha*-*-elf*) + alpha*-*-linux-gnu* | alpha*-*-linux-uclibc* | alpha*-*-elf*) targ_defvec=bfd_elf64_alpha_vec targ_selvecs=ecoffalpha_little_vec ;; @@ -131,7 +131,7 @@ case "${targ}" in alpha*-*-*) targ_defvec=ecoffalpha_little_vec ;; - ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu) + ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu | ia64*-*-linux-uclibc*) targ_defvec=bfd_elf64_ia64_little_vec targ_selvecs="bfd_elf64_ia64_big_vec bfd_efi_app_ia64_vec" ;; @@ -208,7 +208,7 @@ case "${targ}" in targ_defvec=bfd_elf32_littlearm_vec targ_selvecs=bfd_elf32_bigarm_vec ;; - armeb-*-elf | arm*b-*-linux-gnu*) + armeb-*-elf | arm*b-*-linux-gnu* | arm*b-*-linux-uclibc*) targ_defvec=bfd_elf32_bigarm_vec targ_selvecs=bfd_elf32_littlearm_vec ;; @@ -350,7 +350,7 @@ case "${targ}" in ;; #ifdef BFD64 - hppa*64*-*-linux-gnu*) + hppa*64*-*-linux-gnu* | hppa*64*-*-linux-uclibc*) targ_defvec=bfd_elf64_hppa_linux_vec targ_selvecs=bfd_elf64_hppa_vec ;; @@ -361,7 +361,7 @@ case "${targ}" in ;; #endif - hppa*-*-linux-gnu* | hppa*-*-netbsd*) + hppa*-*-linux-gnu* | hppa*-*-netbsd* | hppa*-*-linux-uclibc*) targ_defvec=bfd_elf32_hppa_linux_vec targ_selvecs=bfd_elf32_hppa_vec ;; @@ -483,7 +483,7 @@ case "${targ}" in targ_selvecs=bfd_elf32_i386_vec targ_underscore=yes ;; - i[3-7]86-*-linux-gnu*) + i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*) targ_defvec=bfd_elf32_i386_vec targ_selvecs="i386linux_vec bfd_efi_app_ia32_vec" targ64_selvecs=bfd_elf64_x86_64_vec @@ -497,7 +497,7 @@ case "${targ}" in targ_defvec=bfd_elf64_x86_64_vec targ_selvecs="bfd_elf32_i386_vec i386netbsd_vec i386coff_vec bfd_efi_app_ia32_vec" ;; - x86_64-*-linux-gnu*) + x86_64-*-linux-gnu* | x86_64-*-linux-uclibc*) targ_defvec=bfd_elf64_x86_64_vec targ_selvecs="bfd_elf32_i386_vec i386linux_vec bfd_efi_app_ia32_vec" ;; @@ -667,7 +667,7 @@ case "${targ}" in targ_defvec=hp300hpux_vec targ_underscore=yes ;; - m68*-*-linux*aout*) + m68*-*-linux*aout* | m68*-*-linux-uclibc*) targ_defvec=m68klinux_vec targ_selvecs=bfd_elf32_m68k_vec targ_underscore=yes @@ -952,8 +952,8 @@ case "${targ}" in ;; #endif powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \ - powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-rtems* | \ - powerpc-*-chorus* | powerpc-*-vxworks* | powerpc-*-windiss*) + powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-linux-uclibc* | powerpc-*-rtems* | \ + powerpc-*-chorus* | powerpc-*-vxworks* | powerpc-*-windiss* ) targ_defvec=bfd_elf32_powerpc_vec targ_selvecs="rs6000coff_vec bfd_elf32_powerpcle_vec ppcboot_vec" targ64_selvecs="bfd_elf64_powerpc_vec bfd_elf64_powerpcle_vec" @@ -984,8 +984,8 @@ case "${targ}" in targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec" ;; powerpcle-*-elf* | powerpcle-*-sysv4* | powerpcle-*-eabi* | \ - powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-vxworks* |\ - powerpcle-*-rtems*) + powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-linux-uclibc* | \ + powerpcle-*-vxworks* | powerpcle-*-rtems*) targ_defvec=bfd_elf32_powerpcle_vec targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec" targ64_selvecs="bfd_elf64_powerpc_vec bfd_elf64_powerpcle_vec" @@ -1141,7 +1141,7 @@ case "${targ}" in targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec" targ_underscore=yes ;; - sparc-*-linux-gnu*) + sparc-*-linux-gnu* | sparc-*-linux-uclibc*) targ_defvec=bfd_elf32_sparc_vec targ_selvecs="sparclinux_vec bfd_elf64_sparc_vec sunos_big_vec" ;; @@ -1188,7 +1188,7 @@ case "${targ}" in targ_defvec=sunos_big_vec targ_underscore=yes ;; - sparc64-*-linux-gnu*) + sparc64-*-linux-gnu* | sparc64-*-linux-uclibc*) targ_defvec=bfd_elf64_sparc_vec targ_selvecs="bfd_elf32_sparc_vec sparclinux_vec sunos_big_vec" ;; --- gdb-6.1/bfd/configure.in.uclibc 2004-05-11 18:15:15.000000000 +0200 +++ gdb-6.1/bfd/configure.in 2004-05-11 18:17:30.000000000 +0200 @@ -178,7 +178,7 @@ if test "${target}" = "${host}"; then alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu) COREFILE='' ;; - alpha*-*-linux-gnu*) + alpha*-*-linux-gnu*|alpha*-*-linux-uclibc*) COREFILE=trad-core.lo TRAD_HEADER='"hosts/alphalinux.h"' ;; @@ -259,7 +259,7 @@ changequote([,])dnl TRAD_HEADER='"hosts/i386mach3.h"' ;; changequote(,)dnl - i[3-7]86-*-linux-gnu*) + i[3-7]86-*-linux-gnu*|i[3-7]86-*-linux-uclibc*) changequote([,])dnl COREFILE=trad-core.lo TRAD_HEADER='"hosts/i386linux.h"' --- gdb-6.1/bfd/configure.uclibc 2004-05-11 18:17:55.000000000 +0200 +++ gdb-6.1/bfd/configure 2004-05-11 18:19:36.000000000 +0200 @@ -1710,6 +1710,11 @@ linux-gnu*) lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` ;; +linux-uclibc*) + lt_cv_deplibs_check_method=pass_all + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` + ;; + netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' @@ -5276,7 +5281,7 @@ if test "${target}" = "${host}"; then alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu) COREFILE='' ;; - alpha*-*-linux-gnu*) + alpha*-*-linux-gnu*|alpha*-*-linux-uclibc*) COREFILE=trad-core.lo TRAD_HEADER='"hosts/alphalinux.h"' ;; @@ -5336,7 +5341,7 @@ if test "${target}" = "${host}"; then COREFILE=trad-core.lo TRAD_HEADER='"hosts/i386mach3.h"' ;; - i[3-7]86-*-linux-gnu*) + i[3-7]86-*-linux-gnu*|i[3-7]86-*-linux-uclibc*) COREFILE=trad-core.lo TRAD_HEADER='"hosts/i386linux.h"' ;; --- gdb-6.1/opcodes/configure.uclibc 2004-05-11 18:21:03.000000000 +0200 +++ gdb-6.1/opcodes/configure 2004-05-11 18:22:08.000000000 +0200 @@ -1700,6 +1700,11 @@ linux-gnu*) lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` ;; +linux-uclibc*) + lt_cv_deplibs_check_method=pass_all + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` + ;; + netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' --- gdb-6.1/readline/support/config.guess.uclibc 2004-05-11 18:02:30.000000000 +0200 +++ gdb-6.1/readline/support/config.guess 2004-05-11 18:02:50.000000000 +0200 @@ -3,7 +3,7 @@ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -timestamp='2004-02-16' +timestamp='2004-03-03' # 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 @@ -136,6 +136,19 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` | UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown +# Detect uclibc systems. + +LIBC="gnu" +if [ -f /usr/include/bits/uClibc_config.h ] +then + LIBC=uclibc + if [[ -n `grep "#define __UCLIBC_CONFIG_VERSION__" /usr/include/bits/uClibc_config.h` ]] + then + UCLIBC_SUBVER=`sed -n "/#define __UCLIBC_CONFIG_VERSION__ /s///p" /usr/include/bits/uClibc_config.h` + LIBC=$LIBC$UCLIBC_SUBVER + fi +fi + # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in @@ -255,9 +268,14 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit 0 ;; alpha:OSF1:*:*) - if test $UNAME_RELEASE = "V4.0"; then + case $UNAME_RELEASE in + *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - fi + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU @@ -295,11 +313,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac + # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; Alpha*:OpenVMS:*:*) echo alpha-hp-vms @@ -839,16 +858,16 @@ EOF echo ${UNAME_MACHINE}-pc-minix exit 0 ;; arm*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit 0 ;; cris:Linux:*:*) - echo cris-axis-linux-gnu + echo cris-axis-linux-${LIBC} exit 0 ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit 0 ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit 0 ;; mips:Linux:*:*) eval $set_cc_for_build @@ -867,7 +886,7 @@ EOF #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` - test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + test x"${CPU}" != x && echo "${CPU}-unknown-linux-${LIBC}" && exit 0 ;; mips64:Linux:*:*) eval $set_cc_for_build @@ -886,13 +905,13 @@ EOF #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` - test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + test x"${CPU}" != x && echo "${CPU}-unknown-linux-${LIBC}" && exit 0 ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu + echo powerpc-unknown-linux-${LIBC} exit 0 ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu + echo powerpc64-unknown-linux-${LIBC} exit 0 ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in @@ -905,34 +924,34 @@ EOF EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit 0 ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; esac exit 0 ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + echo hppa64-unknown-linux-${LIBC} exit 0 ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit 0 ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit 0 ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit 0 ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit 0 ;; x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu + echo x86_64-unknown-linux-${LIBC} exit 0 ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so @@ -947,20 +966,21 @@ EOF p'` case "$ld_supported_targets" in elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + TENTATIVE="${UNAME_MACHINE}-pc-linux-${LIBC}" ;; a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" + echo "${UNAME_MACHINE}-pc-linux-${LIBC}aout" exit 0 ;; coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" + echo "${UNAME_MACHINE}-pc-linux-${LIBC}coff" exit 0 ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + echo "${UNAME_MACHINE}-pc-linux-${LIBC}oldld" exit 0 ;; esac + if [ $LIBC != "gnu" -o $LIBC != "gnulibc1" ];then echo "$TENTATIVE" && exit 0; fi # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c --- gdb-6.1/readline/support/config.sub.uclibc 2004-05-11 18:02:42.000000000 +0200 +++ gdb-6.1/readline/support/config.sub 2004-05-11 18:02:55.000000000 +0200 @@ -3,7 +3,7 @@ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -timestamp='2004-02-16' +timestamp='2004-02-23' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -455,6 +455,10 @@ case $basic_machine in cris | cris-* | etrax*) basic_machine=cris-axis ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; da30 | da30-*) basic_machine=m68k-da30 ;; @@ -1190,6 +1194,9 @@ case $os in -linux-dietlibc) os=-linux-dietlibc ;; + -linux-uclibc*) + os=-linux-uclibc + ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; --- gdb-6.1/configure.uclibc 2004-02-11 18:52:06.000000000 +0100 +++ gdb-6.1/configure 2004-05-11 17:59:12.000000000 +0200 @@ -1056,6 +1056,10 @@ case "${host}" in *-*-cygwin*) noconfigdirs="$noconfigdirs autoconf automake send-pr rcs guile perl" ;; + linux-uclibc*) + lt_cv_deplibs_check_method=pass_all + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` + ;; *-*-netbsd*) noconfigdirs="$noconfigdirs rcs" ;; --- gdb-6.1/config.guess.uclibc 2004-05-11 17:59:37.000000000 +0200 +++ gdb-6.1/config.guess 2004-05-11 17:59:46.000000000 +0200 @@ -3,7 +3,7 @@ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -timestamp='2004-02-16' +timestamp='2004-03-03' # 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 @@ -136,6 +136,19 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` | UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown +# Detect uclibc systems. + +LIBC="gnu" +if [ -f /usr/include/bits/uClibc_config.h ] +then + LIBC=uclibc + if [[ -n `grep "#define __UCLIBC_CONFIG_VERSION__" /usr/include/bits/uClibc_config.h` ]] + then + UCLIBC_SUBVER=`sed -n "/#define __UCLIBC_CONFIG_VERSION__ /s///p" /usr/include/bits/uClibc_config.h` + LIBC=$LIBC$UCLIBC_SUBVER + fi +fi + # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in @@ -255,9 +268,14 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit 0 ;; alpha:OSF1:*:*) - if test $UNAME_RELEASE = "V4.0"; then + case $UNAME_RELEASE in + *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - fi + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU @@ -295,11 +313,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac + # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; Alpha*:OpenVMS:*:*) echo alpha-hp-vms @@ -839,16 +858,16 @@ EOF echo ${UNAME_MACHINE}-pc-minix exit 0 ;; arm*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit 0 ;; cris:Linux:*:*) - echo cris-axis-linux-gnu + echo cris-axis-linux-${LIBC} exit 0 ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit 0 ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit 0 ;; mips:Linux:*:*) eval $set_cc_for_build @@ -867,7 +886,7 @@ EOF #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` - test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + test x"${CPU}" != x && echo "${CPU}-unknown-linux-${LIBC}" && exit 0 ;; mips64:Linux:*:*) eval $set_cc_for_build @@ -886,13 +905,13 @@ EOF #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` - test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + test x"${CPU}" != x && echo "${CPU}-unknown-linux-${LIBC}" && exit 0 ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu + echo powerpc-unknown-linux-${LIBC} exit 0 ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu + echo powerpc64-unknown-linux-${LIBC} exit 0 ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in @@ -905,34 +924,34 @@ EOF EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit 0 ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; esac exit 0 ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + echo hppa64-unknown-linux-${LIBC} exit 0 ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit 0 ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit 0 ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit 0 ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit 0 ;; x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu + echo x86_64-unknown-linux-${LIBC} exit 0 ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so @@ -947,20 +966,21 @@ EOF p'` case "$ld_supported_targets" in elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + TENTATIVE="${UNAME_MACHINE}-pc-linux-${LIBC}" ;; a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" + echo "${UNAME_MACHINE}-pc-linux-${LIBC}aout" exit 0 ;; coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" + echo "${UNAME_MACHINE}-pc-linux-${LIBC}coff" exit 0 ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + echo "${UNAME_MACHINE}-pc-linux-${LIBC}oldld" exit 0 ;; esac + if [ $LIBC != "gnu" -o $LIBC != "gnulibc1" ];then echo "$TENTATIVE" && exit 0; fi # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c --- gdb-6.1/config.sub.uclibc 2004-05-11 17:59:56.000000000 +0200 +++ gdb-6.1/config.sub 2004-05-11 18:00:00.000000000 +0200 @@ -3,7 +3,7 @@ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -timestamp='2004-02-16' +timestamp='2004-02-23' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -455,6 +455,10 @@ case $basic_machine in cris | cris-* | etrax*) basic_machine=cris-axis ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; da30 | da30-*) basic_machine=m68k-da30 ;; @@ -1190,6 +1194,9 @@ case $os in -linux-dietlibc) os=-linux-dietlibc ;; + -linux-uclibc*) + os=-linux-uclibc + ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; --- gdb-6.1/libtool.m4.uclibc 2004-05-11 18:03:37.000000000 +0200 +++ gdb-6.1/libtool.m4 2004-05-11 18:05:59.000000000 +0200 @@ -645,6 +645,11 @@ linux-gnu*) lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` ;; +linux-uclibc*) + lt_cv_deplibs_check_method=pass_all + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` + ;; + netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'] --- gdb-6.1/ltconfig.uclibc 2004-05-11 18:07:29.000000000 +0200 +++ gdb-6.1/ltconfig 2004-05-11 18:11:59.000000000 +0200 @@ -602,7 +602,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)- # Transform linux* to *-*-linux-gnu*, to support old configure scripts. case $host_os in -linux-gnu*) ;; +linux-gnu*|linux-uclibc*) ;; linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` esac @@ -1259,6 +1259,24 @@ linux-gnu*) dynamic_linker='GNU/Linux ld.so' ;; +linux-uclibc*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + soname_spec='${libname}${release}.so$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + # Note: copied from linux-gnu, and may not be appropriate. + hardcode_into_libs=yes + # Assume using the uClibc dynamic linker. + dynamic_linker="uClibc ld.so" + ;; + netbsd*) need_lib_prefix=no need_version=no