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

3.1 PATCH: Avoid automounter pathnames in

For a long time, when running the libstdc++ testsuite with -m64 on
sparc-sun-solaris2.8, all tests failed for me:

libstdc++.log shows that the tests fail to link with `-lstdc++ not found'.
This happened since during the configure run for the sparcv9 libstdc++
multilib the correct multilib flag (-m64) was appended to glibcpp_CXX, but
the -L flag in that variable remained at it's default, i.e. pointing to the
32-bit default multilib, which the linker ignored during the -m64 link:
i.e. the sparcv9 libstdc++-v3 Makefile glibcpp_CXX contained


instead of the correct


The same (incorrect) values are substituted in testsuite_flags, and the
testsuite uses the output of testsuite_flags --build-cxx to determine the
compiler to test.

This substitution of a non-default multilib in -L flags should be performed
by the toplevel, but in my case failed because of an bad
interaction of the amd automounter and /bin/sh's built-in pwd: is to substitute the output of pwd in
$blddir/sparc-sun-solaris2.8 with it's corresponding multilib subdir,
i.e. $blddir/sparc-sun-solaris2.8.  In my case, the Makefile had a logical
pathname for $blddir (i.e. /vol/gcc/obj/gcc-3.1), but /bin/sh's pwd returns
the underlying physical pathname instead (something like
/amnt/figaro/volumes/obj-gcc/gcc/obj.sol2/gcc-3.1).  Obviously they don't
match and the substitution does not occur, leading to the observed broken
testsuite results.  Once the problem had been analysed, the fix is simple:
allow for the use of a automounter-aware pwd command instead of the
hardcoded pwd, just as was done e.g. in the thread starting at

and finally resolved by

The trivial patch below does this and allowed me to get good -m64 libstdc++
testsuite results:

I fear I'll really have to check the whole tree for dubious uses of that
`cd $dir && pwd` construct and apply corresponding patches ;-(

Fully bootstrapped without regressions on sparc-sun-solaris2.8.  Ok for
branch and trunk?


Thu May  2 21:31:04 2002  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	* Allow for PWDCMD to determine ML_POPDIR.

RCS file: /cvs/gcc/gcc/,v
retrieving revision 1.19
diff -u -p -r1.19
---	13 Jun 2001 02:12:07 -0000	1.19
+++	2 May 2002 20:13:19 -0000
@@ -756,7 +756,7 @@ if [ -n "${multidirs}" ] && [ -z "${ml_n
     # FIXME: POPDIR=${PWD=`pwd`} doesn't work here.
-    ML_POPDIR=`pwd`
+    ML_POPDIR=`${PWDCMD-pwd}`
     cd ${ml_dir}/${ml_libdir}
     if [ -f ${ml_newsrcdir}/configure ]; then

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