This is the mail archive of the gcc@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]

Re: libg++ (again) - patch and rationale included.


On Fri, 13 March 1998, 13:42:57, law@cygnus.com wrote:

 > 
 >   In message <13576.55644.732642.790993@slsvhmt>you write:
 >   > As H.J. tried this several times now with no luck, perhaps it might
 >   > help to tell you, this patch is _really necessary_ and _fixes a real
 >   > bug_ in the configure mechanism.
 > It's just blocked behind egcs-1.0.2 stuff.  That's been my primary
 > egcs concern for the last several weeks.
 > 
 > You might submit the patch as well as the rationale behind the patch again --
 > Jim may be able to take care of it while I work on 1.0.2 stuff.

I know it's late (perhaps too late), but I guess H.J. wanted this
patch to be put into the release as well (me too).

OK, here's the rationale:

On Sun, 1 February 1998, 15:04:40, hjl@lucon.org wrote:

 > > 
 > > I don't understand why we need the second patch.  I've configured
 > > and used egcs with absolute pathnames for a long time without
 > > running into these kinds of problems.
 > > 
 > 
 > That is because some systems use the system regex.h/rx.h instead of
 > the one included in librx. But configure.in doesn't know how to
 > make a symlink to /usr/include/foo.h since it assumes symlink pathname
 > is always relative.
 > 
 > -- 
 > H.J. Lu (hjl@gnu.org)

And here's the patch:

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

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

diff -rcp -x CVS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-1.0.2.orig/configure egcs-1.0.2/configure
*** egcs-1.0.2.orig/configure	Wed Dec  3 16:54:34 1997
--- egcs-1.0.2/configure	Sat Mar  7 19:56:34 1998
*************** for subdir in . ${subdirs} ; do
*** 992,1018 ****
                  set ${links}; link=$1; shift; links=$*
  
                  if [ ! -r ${srcdir}/${file} ] ; then
                          echo '***' "${progname}: cannot create a link \"${link}\"," 1>&2
                          echo '***' "since the file \"${srcdir}/${file}\" does not exist." 1>&2
                          exit 1
                  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
  			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}
  		fi
                  if [ ! -r ${link} ] ; then
!                         echo '***' "${progname}: unable to link \"${link}\" to \"${srcdir}/${file}\"." 1>&2
                          exit 1
                  fi
  
!                 echo "Linked \"${link}\" to \"${srcdir}/${file}\"."
          done
  
          # Create a .gdbinit file which runs the one in srcdir
--- 993,1026 ----
                  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} ${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} ${srcfile} ${link}
  		fi
                  if [ ! -r ${link} ] ; then
!                         echo '***' "${progname}: unable to link \"${link}\" to \"${srcfile}\"." 1>&2
                          exit 1
                  fi
  
!                 echo "Linked \"${link}\" to \"${srcfile}\"."
          done
  
          # Create a .gdbinit file which runs the one in srcdir


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