This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: config.if for glibc 2.2
- To: "H . J . Lu" <hjl at lucon dot org>
- Subject: Re: PATCH: config.if for glibc 2.2
- From: Mark Kettenis <kettenis at science dot uva dot nl>
- Date: 15 May 2001 10:55:15 +0200
- Cc: binutils at sourceware dot cygnus dot com, gcc-patches at gcc dot gnu dot org
- References: <20010514094530.A23690@lucon.org>
"H . J . Lu" <hjl@lucon.org> writes:
> FYI, I checked in this patch.
>
>
> H.J.
> ----
> 2001-05-14 H.J. Lu <hjl@gnu.org>
>
> * config.if (libc_interface): Set to -libc6.2- for cross
> compiling to Linux/glibc 2.2.
>
This patch serves no purpose at all (except perhaps on the
gcc-2_95-branch in the GCC repository). libc_interface isn't used
anymore by GCC, and I believe it has never been used by binutils at
all. Moreover, the idea was broken in the first place, see
http://gcc.gnu.org/ml/gcc-patches/2000-12/msg00951.html
Therefore the attached patch seems more appropriate.
Mark
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* config.if: Remove bits to set libc_interface.
Index: config.if
===================================================================
RCS file: /cvs/src/src/config.if,v
retrieving revision 1.2
diff -u -r1.2 config.if
--- config.if 2000/07/22 08:20:10 1.2
+++ config.if 2001/05/15 08:45:35
@@ -4,7 +4,6 @@
#
# 1. libstcxx_interface: the interface name for libstdc++.
# 2. cxx_interface: the interface name for c++.
-# 3. libc_interface: the interface name for libc.
#
# Get the top level src dir.
@@ -39,55 +38,4 @@
cxx_interface=`grep "^INTERFACE" ${if_topsrcdir}/gcc/cp/Makefile.in | sed 's/INTERFACE[ ]*=[ ]*\(.*\)/\1/'`
else
cxx_interface=
-fi
-
-# The trickiest part is libc_interface.
-if [ -z "${libc_interface}" ]
-then
- case ${target_os} in
- *linux*libc1*|*linux*libc5*)
- case ${target_alias} in
- *alpha*|*powerpc*)
- libc_interface=-libc5.9-
- ;;
- *)
- libc_interface=-libc5-
- ;;
- esac
- ;;
- *linux*gnu*)
- # We have to work harder to figure it out.
- if [ ${target_alias} = ${build_alias} ]
- then
- dummy=if$$
- cat >$dummy.c <<EOF
-#include <features.h>
-main(argc, argv)
- int argc;
- char *argv[];
-{
- printf("%d\n", __GLIBC_MINOR__);
- return 0;
-}
-EOF
- ${CC-cc} $dummy.c -o $dummy 2>/dev/null
- if [ "$?" = 0 ]
- then
- libc_interface=-libc6.`./$dummy`-
- rm -f $dummy.c $dummy
- else
- # It should never happen.
- echo "Cannot find the GNU C library minor version number." >&2
- rm -f $dummy.c $dummy
- exit 1
- fi
- else
- # Cross compiling. Assume glibc 2.1.
- libc_interface=-libc6.1-
- fi
- ;;
- *)
- libc_interface=-
- ;;
- esac
fi