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]

Re: [v3] testsuite_flags absolute path fix


> I think a proper solution should look like this:
> 
> * don't try to canonicalize absolute pathnames at all
> 
> * otherwise, give the user the ability (via environment, make variables
>   during configure, configure option?) to specify an alternative pwd
>   command: there are several that are amd-aware and manage to return proper
>   pathnames, not containing amd's temporary mount points.  pawd (long
>   distributed with amd) or (in recent amd distributions) amq -w come to
>   mind, and there are almost certainly others.

I think we all agree on this, but so far there's not been a patch that 
meets everybody's requirements.

> Something like this could work:
> 
> dir=`case $dir in /*) echo $dir ;; *) echo \`cd $dir; ${PWDCMD:-pwd}\` ;; esac`

This works for me: is this what you intended? 

Index: acinclude.m4
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/acinclude.m4,v
retrieving revision 1.147
diff -c -p -r1.147 acinclude.m4
*** acinclude.m4	2001/05/19 20:27:34	1.147
--- acinclude.m4	2001/05/23 23:30:50
*************** glibcpp_toolexecdir=no
*** 1580,1589 ****
  glibcpp_toolexeclibdir=no
  
  # Export build and source directories.
! # These need to be absolute paths, thus the use of pwd.
  glibcpp_builddir=`pwd`
! glibcpp_srcdir=`cd ${srcdir} && pwd`
! glibcpp_prefixdir=`cd ${prefix} && pwd`
  
  AC_MSG_CHECKING([for interface version number])
  libstdcxx_interface=$INTERFACE
--- 1580,1591 ----
  glibcpp_toolexeclibdir=no
  
  # Export build and source directories.
! # These need to be absolute paths, yet at the same time need to
! # canonicalize only relative paths, because then amd will not unmount
! # drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using 
amd.
  glibcpp_builddir=`pwd`
! glibcpp_srcdir=`case ${srcdir} in /*) echo ${srcdir} ;; *) echo \`cd 
${srcdir}; ${PWDCMD:-pwd}\` ;; esac`
! glibcpp_prefixdir=${prefix}
  
  AC_MSG_CHECKING([for interface version number])
  libstdcxx_interface=$INTERFACE


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