This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Unreviewed patch for PR 2236 [toplevel config.if]


libc_interface is no longer used. It was used by v2 libstdc++ as a string appended to the library name. Probably before we had symbol versioning in the linker. v3 libstdc++ does not use it at all. v2 libstdc++ looks like it won't work because other stuff for it is missing, so we should just delete all of the libc_interface code.

Also, I noticed that the libstdcxx_incdir comment was wrong. It claimed it was the library interface version, but that was the comment for the old libstdcxx_interface variable which no longer exists. So I changed it to be more accurate.

Considering that config.if only does one thing now, it might be reasonable to eliminate the file and merge it into configure.in, but that is more shell hackery than I care to do.

I haven't tested this patch yet.

2003-07-10  James E Wilson  <wilson@tuliptree.org>

	* config.if: Fix libstdcxx_incdir comment.
	(libc_interface): Delete code to compute it.

Index: config.if
===================================================================
RCS file: /cvs/gcc/gcc/config.if,v
retrieving revision 1.9
diff -p -r1.9 config.if
*** config.if	30 Jan 2003 11:52:51 -0000	1.9
--- config.if	10 Jul 2003 09:35:44 -0000
***************
*** 2,9 ****
  # Don't call it directly. This shell script fragment is called to
  # determine:
  #
! #	1. libstcxx_incdir: the interface name for libstdc++.
! #	2. libc_interface: the interface name for libc.
  #
  
  # Get the top level src dir.
--- 2,8 ----
  # Don't call it directly. This shell script fragment is called to
  # determine:
  #
! #	1. libstcxx_incdir: versioned C++ header
  #
  
  # Get the top level src dir.
*************** if test -z "$gcc_version"; then
*** 35,88 ****
    gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
  fi
  libstdcxx_incdir=c++/${gcc_version}
- 
- # 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
--- 34,36 ----

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]