A new libg++ for egcs

H.J. Lu hjl@lucon.org
Sat Oct 25 17:04:00 GMT 1997


> 
> On Fri, 24 Oct 1997, H.J. Lu wrote:
> > I have made a libg++ for egcs just in case someone wants it. It
> > is very close to the one in libg++ 2.8.0b6.
> [...]
> > This libg++ and librx are tested with egcs 971023 on linux/x86/libc 5,
> > linux/x86/glibc 2.1 and linux/alpha/glibc 2.0.5c. Just put libg++ and
> > librx under the egcs source directory, i.e.,
> 
> It doesn't work with at least linux/x86/glibc 2.05c (RedHat 4.9.1) on my
> machine, which AFAIK is the latest released version.
> 
> 
> The relevant part from the build log is:
> 
> Configuring in libraries/libg++
> [ ... Informations about links being created ... ]
> checking for ranlib
> Appending ./config/linux.mt to target-mkfrag
> Created "Makefile" in /usr/src/egcs-971023/libraries/libg++ using "target-m=
> kfrag"
> *** /usr/src/egcs-971023/configure: cannot create a link "rx.h",
> *** since the file ".//usr/include/regex.h" does not exist.
> Configure in /usr/src/egcs-971023/libraries/libg++/src failed, exiting.
> make[1]: *** [configure-target-libg++] Error 1
> 
> 
> I looked at libg++/src/configure.in and with some testing I verified that
> it should have set "files" to /usr/include/regex.h and "links" to rx.h
> 
> Later, "configure" (from egcs-971023) tries to link with=20
> ${srcdir}/${file}, which of course won't work when ${file) is an absolute
> path...
> 
> 
> There are at least two relevant questions here:
> 
> 1. Is libg++ supposed to find and try to use /usr/include/regex.h on
> Linux? It looks like it's hardcoded to use "../../librx/rx.h" on all other
> platforms.

Yes.

> 
> 2. Is the main configure script supposed to support absolute paths?
> 

No. I have a patch for it. See below.

> 
> I made some minor modifications to configure so that it also supports
> absolute paths, but I'm not sure if that's the right way to do it.
> 


Ooops. Here is a old patch.

H.J.
---
Sun Sep  7 14:27:56 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
	
	* configure.in (alpha-*-linux*): Treat alpha-*-linux* as
	alpha-*-linux* and alpha-*-*.

Mon Aug 25 17:31:49 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)

	* cconfigure: When making link, also check the current
	directory. The configure scripts may create one.

Index: configure.in
===================================================================
RCS file: /home/work/cvs/gnu/egcs/configure.in,v
retrieving revision 1.1.1.4
diff -u -r1.1.1.4 configure.in
--- configure.in	1997/09/17 20:09:19	1.1.1.4
+++ configure.in	1997/10/23 00:01:53
@@ -416,6 +507,12 @@
   alpha*-*-*vms*)
     noconfigdirs="$noconfigdirs gdb ld target-newlib target-libgloss"
     ;;
+  alpha-*-linux*)
+    # newlib is not 64 bit ready
+    noconfigdirs="$noconfigdirs target-newlib target-libgloss"
+    # linux has rx in libc
+    skipdirs="$skipdirs target-librx"
+    ;;
   alpha*-*-*)
     # newlib is not 64 bit ready
     noconfigdirs="$noconfigdirs target-newlib target-libgloss"
Index: configure
===================================================================
RCS file: /home/work/cvs/gnu/egcs/configure,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 configure
--- configure	1997/09/17 20:09:18	1.1.1.2
+++ configure	1997/09/17 20:22:21
@@ -992,27 +1006,34 @@
                 set ${links}; link=$1; shift; links=$*
 
                 if [ ! -r ${srcdir}/${file} ] ; then
+                  if [ ! -r ${file} ] ; then
+		    
                         echo '***' "${progname}: cannot create a link \"${link}\"," 1>&2
                         echo '***' "since the file \"${srcdir}/${file}\" does not exist." 1>&2
                         exit 1
+		  else
+			srcfile=${file}
+		  fi
+		else
+			srcfile=${srcdir}/${file}
                 fi
 
                 ${remove} -f ${link}
 		# Make a symlink if possible, otherwise try a hard link
-		if ${symbolic_link} ${srcdir}/${file} ${link} >/dev/null 2>&1 ; then
+		if ${symbolic_link} ${srcfile} ${link} >/dev/null 2>&1 ; then
 			true
 		else
 			# We need to re-remove the file because Lynx leaves a 
 			# very strange directory there when it fails an NFS symlink.
 			${remove} -r -f ${link}
-			${hard_link} ${srcdir}/${file} ${link}
+			${hard_link} ${srcfile} ${link}
 		fi
                 if [ ! -r ${link} ] ; then
-                        echo '***' "${progname}: unable to link \"${link}\" to \"${srcdir}/${file}\"." 1>&2
+                        echo '***' "${progname}: unable to link \"${link}\" to \"${srcfile}\"." 1>&2
                         exit 1
                 fi
 
-                echo "Linked \"${link}\" to \"${srcdir}/${file}\"."
+                echo "Linked \"${link}\" to \"${srcfile}\"."
         done
 
         # Create a .gdbinit file which runs the one in srcdir



More information about the Gcc mailing list