This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

Patch: Re: Blanket replacement of "xgcc" in libstdc++-v3/testsuite/Makefile.am


Propose a patch for testsuite_flags.in and testsuite/Makefile.am, and post it on libstdc++ at gcc dot gnu dot org

Here's my attempt at this patch Ben (others: please see the latter half of this mail for the background):

(Note the extra space in the quoted variable whose value
is echoed, the space after "xgcc" in the sed pattern and
the removal of the "g"(lobal) command to sed.)

---------------------------- 8< ----------------------------
Index: ChangeLog
from  Ranjit Mathew  <rmathew at hotmail dot com>

	* testsuite_flags.in: Guard against the possibility
	of having "xgcc" as a part of a folder name in the
	path to the GCC build folder.

* testsuite/Makefile.am: Likewise.

* testsuite/Makefile.in: Regenerated.

Index: testsuite/Makefile.am
===================================================================
--- testsuite/Makefile.am	Fri Apr 25 16:46:15 2003
+++ testsuite/Makefile.am	Fri Apr 25 16:51:18 2003
@@ -40,5 +40,5 @@
## Do the same thing as `testsuite_flags --build-cxx`
CXX_fake = @glibcpp_CXX@
-CXX=`echo $(CXX_fake) | sed 's/xgcc/g++/g'`
+CXX=`echo "$(CXX_fake) " | sed 's/xgcc /g++/'`
CXXLINK = \
	LD_RUN_PATH=${LD_RUN_PATH:+$LD_RUN_PATH:}${glibcpp_builddir}/src/.libs\
Index: testsuite_flags.in
===================================================================
--- testsuite_flags.in	Fri Apr 25 16:44:57 2003
+++ testsuite_flags.in	Fri Apr 25 16:49:58 2003
@@ -46,5 +46,5 @@
      PCHFLAGS="-include bits/stdc++.h"
      CC_build="@glibcpp_CXX@ ${PCHFLAGS}"
-      CXX=`echo $CC_build | sed 's/xgcc/g++/g'`
+      CXX=`echo "$CC_build " | sed 's/xgcc /g++/'`
      echo ${CXX}
      ;;
---------------------------- 8< ----------------------------

Ranjit.

>     I am sending this mail to you for no other
>reason than the fact that you seem to be the most
>active person hacking this particular file.
>
>I have been compiling GCC 3.3 snapshots for MinGW
>for a while now and in recent times have been hit
>by a "bug" in "libstdc++-v3/testsuite/Makefile.am",
>which though is very easy to work around but is an
>irritant nevertheless - none of my folders can have
>"xgcc" in their names!
>
>For some background, I compile a (crossed) native
>GCJ for Windows using a two-stage approach as
>outlined in:
>
>http://ranjitmathew.tripod.com/phartz/gcj/bldgcj.html
>
>viz on Linux build a cross compiler first and then
>a crossed native compiler using this compiler.
>
>So it is most natural for me to build the cross
>compiler in "build_xgcc" and install it into
>"/extra/xgcc" and so on, but this "bug" now prevents
>me from doing it.
>
>The problem comes from the following lines:
>------------------------- 8< --------------------------
>## CXX is actually a "C" compiler. These are real C++ programs.
>## Do the same thing as `testsuite_flags --build-cxx`
>CXX_fake = @glibcpp_CXX@
>CXX=`echo $(CXX_fake) | sed 's/xgcc/g++/g'`
>------------------------- 8< --------------------------
>
>The blanket replacement of "xgcc" SNAFUs up the path
>and breaks the builds - for some reason, this has
>started happening only in recent 3.3 snapshots and
>was not a problem earlier. (By "recent" I mean a
>couple of months.)
>
>If nothing, a quick hack like:
>
>CXX=`echo $(CXX_fake) | sed 's/xgcc /g++/g'`
>
>(note the space after "xgcc")
>
>should do the job.
>
>Ranjit.
>
>--
>Ranjit Mathew          Email: rmathew AT hotmail DOT com
>
>Bangalore, INDIA.      Web: http://ranjitmathew.tripod.com/
>


_________________________________________________________________
Taureans! See what's in store. http://server1.msn.co.in/features/taurus/index.asp Have a great year!



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