Posted here: http://gcc.gnu.org/ml/gcc-patches/2012-08/msg01032.html This build failure is a likely result of the recent change to compile GCC with the C++ compiler during the first stage. 1. I have "." on $PATH. 2. In one build of the latest GCC trunk, I specify CC=/usr/bin/gcc and CXX=/usr/bin/g++ and everything works. 3. In another build, I don't specify CC or CXX. Therefore they default to 'gcc' and 'g++'. This fails: g++: error trying to exec 'cc1plus': execvp: No such file or directory If I remove "." from $PATH then the configuration in 3 will build. The problem is that there is a g++ executable under the built gcc directory, but cc1plus and other g++ component parts haven't been built yet.
This might be the reason why we create xgcc than gcc and then only do the namechange at install time. We need to do the same thing for g++ now.
I am going to take a stab at fixing this.
Created attachment 28693 [details] Patch which I am testing right now Once my testing finishes (including installing), I will submit this.
(In reply to comment #3) > Created attachment 28693 [details] > Patch which I am testing right now > > Once my testing finishes (including installing), I will submit this. It had an issue while doing libstdc++ testing. So fixing up that testsuite.
libmudflap has the similar issue.
(In reply to comment #5) > libmudflap has the similar issue. Actually the libmudflap is fixed by fixing libstdc++. Anyways I have a full fix now. I am retesting it again.
Author: pinskia Date: Wed Nov 28 22:11:29 2012 New Revision: 193910 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=193910 Log: 2012-11-28 Andrew Pinski <apinski@cavium.com> PR bootstrap/54279 * configure.ac (CXX_FOR_TARGET): Change over to use xg++. * configure: Regenerate. * Makefile.tpl (POSTSTAGE1_CXX_EXPORT): Change over to use xg++. * Makefile.in: Regenerate. 2012-11-28 Andrew Pinski <apinski@cavium.com> PR bootstrap/54279 * Makefile.in (${QMTEST_DIR}/context): Use xg++ instead of g++. 2012-11-28 Andrew Pinski <apinski@cavium.com> PR bootstrap/54279 * Make-lang.in (g++$(exeext)): Rename to (xg++$(exeext)): This. (g++-cross$(exeext)): Use xg++$(exeext) instead of g++$(exeext). (c++.start.encap): Likewise. (c++.install-common): Likewise. 2012-11-28 Andrew Pinski <apinski@cavium.com> PR bootstrap/54279 * lib/g++.exp (g++_init): Search for xg++ instead of g++ in the build directories. * lib/obj-c++.exp (obj-c++_init): Likewise. 2012-11-28 Andrew Pinski <apinski@cavium.com> PR bootstrap/54279 * scripts/testsuite_flags.in (--build-cxx): Use xg++ instead of g++. * testsuite/lib/libstdc++.exp (libstdc++_init): Likewise. Modified: trunk/ChangeLog trunk/Makefile.in trunk/Makefile.tpl trunk/configure trunk/configure.ac trunk/gcc/ChangeLog trunk/gcc/Makefile.in trunk/gcc/cp/ChangeLog trunk/gcc/cp/Make-lang.in trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/lib/g++.exp trunk/gcc/testsuite/lib/obj-c++.exp trunk/libstdc++-v3/ChangeLog trunk/libstdc++-v3/scripts/testsuite_flags.in trunk/libstdc++-v3/testsuite/lib/libstdc++.exp
Fixed. Thanks for your report.
(In reply to comment #8) > Fixed. Thanks for your report. Nice! Shouldn't we do the same for other tools/languages? Like ada, java?
(In reply to Karlson2k from comment #9) > (In reply to comment #8) > > Fixed. Thanks for your report. > > Nice! > Shouldn't we do the same for other tools/languages? Like ada, java? Java has seen been removed and was never affected. The problem only shows up while building of the front-ends only. I have to double check but I think ada is fine as they use xgcc as the driver while building the front-end and I think D might be ok too (it was recently moved over to compiling D code).