Re: PATCH RFA: Build stages 2 and 3 with C++

2011-11-22 Thread Gary Funck
A comment on the documentation: Index: gcc/doc/install.texi === --- gcc/doc/install.texi (revision 176348) +++ gcc/doc/install.texi (working copy) @@ -1286,6 +1286,13 @@ will try to guess whether the @code{.ini Build

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-11-22 Thread Ian Lance Taylor
Gary Funck g...@intrepid.com writes: A comment on the documentation: Index: gcc/doc/install.texi === --- gcc/doc/install.texi (revision 176348) +++ gcc/doc/install.texi (working copy) @@ -1286,6 +1286,13 @@ will try

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-11-22 Thread Gary Funck
On 07/15/11 23:52:46, Ian Lance Taylor wrote: [...] @@ -444,6 +448,9 @@ STAGE1_LANGUAGES = @stage1_languages@ # the last argument when conflicting --enable arguments are passed. # * Likewise, we force-disable coverage flags, since the installed # compiler probably has never heard of

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-11-22 Thread Ian Lance Taylor
Gary Funck g...@intrepid.com writes: On 07/15/11 23:52:46, Ian Lance Taylor wrote: [...] @@ -444,6 +448,9 @@ STAGE1_LANGUAGES = @stage1_languages@ # the last argument when conflicting --enable arguments are passed. # * Likewise, we force-disable coverage flags, since the installed #

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-11-22 Thread Gary Funck
On 11/22/11 11:32:03, Ian Lance Taylor wrote: If CXXFLAGS, is this a potentially surprising departure from previous configure behavior? Perhaps. I don't see how we could reasonably make any other choice,though. Agreed. Just wondering if there might be potential documentation impact, re:

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-09-04 Thread Thomas Schwinge
Hi! On Sat, 16 Jul 2011 11:27:46 -0400, Diego Novillo dnovi...@google.com wrote: On Sat, Jul 16, 2011 at 02:52, Ian Lance Taylor i...@google.com wrote: 2011-07-15  Ian Lance Taylor  i...@google.com        * configure.ac: Add --enable-build-poststage1-with-cxx.  If set,        make C++

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-08-08 Thread Ian Lance Taylor
Romain Geissler romain.geiss...@gmail.com writes: This new build behavior broke former plugins built with gcc. Indeed, all cc1 function symbols are now mangled and thus with the current trunk, plugins should also look for mangled symbols (and so built with g++). What's the new GCC policy

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-08-08 Thread Romain Geissler
Le 8 août 2011 à 20:49, Ian Lance Taylor a écrit : However, since we currently permit plugins to call anything in gcc, I think the answer is going to have to be that plugins which do that should be compiled with C++. Ok, i'll move to C++ then, until a dedicated C plugin API comes out. I

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-22 Thread Paolo Carlini
On 07/22/2011 07:45 AM, Ian Lance Taylor wrote: OK for mainline? Sure. Paolo.

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-21 Thread Eric Botcazou
This is not the global constructor/destructor issue with names generated by collect2. But ELF or SVR4 is able to provide a unique name without resorting to random numbers. Not clear if the name needs be unique at all if you have the right features, see

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-21 Thread Basile Starynkevitch
On Wed, 20 Jul 2011 14:41:16 -0700 Ian Lance Taylor i...@google.com wrote: Mike Stump mikest...@comcast.net writes: Presumably the fix will be to use -frandom-seed. But, the random seem was to ensure that things that should not collide, don't. If you use 0, then things that should

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-21 Thread David Edelsohn
On Wed, Jul 20, 2011 at 4:25 PM, Ian Lance Taylor i...@google.com wrote: Presumably the fix will be to use -frandom-seed.  Does this patch fix the problem?  (The only real change is to fragment.am, the other changes are all generated by automake). This patch gets the build past the compiler

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-21 Thread Ian Lance Taylor
Basile Starynkevitch bas...@starynkevitch.net writes: I have a similar issue in the MELT branch, and I am passing to -frandom-seed the md5sum of relevant source files. With such a trick, the seed is reproducible from one build to the next one (of the exact same source tree), and does

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-21 Thread Jakub Jelinek
On Thu, Jul 21, 2011 at 08:51:46AM -0700, Ian Lance Taylor wrote: Basile Starynkevitch bas...@starynkevitch.net writes: I have a similar issue in the MELT branch, and I am passing to -frandom-seed the md5sum of relevant source files. With such a trick, the seed is reproducible from

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-21 Thread Ian Lance Taylor
Jakub Jelinek ja...@redhat.com writes: On Thu, Jul 21, 2011 at 08:51:46AM -0700, Ian Lance Taylor wrote: Basile Starynkevitch bas...@starynkevitch.net writes: I have a similar issue in the MELT branch, and I am passing to -frandom-seed the md5sum of relevant source files. With such a

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-21 Thread Basile Starynkevitch
On Thu, 21 Jul 2011 11:13:00 -0700 Ian Lance Taylor i...@google.com wrote: Jakub Jelinek ja...@redhat.com writes: On Thu, Jul 21, 2011 at 08:51:46AM -0700, Ian Lance Taylor wrote: Basile Starynkevitch bas...@starynkevitch.net writes: I have a similar issue in the MELT branch, and I

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-21 Thread Ian Lance Taylor
Basile Starynkevitch bas...@starynkevitch.net writes: Using the md5sum of the file is probably not bad neither. I would understand that you find it being perhaps too complex for your need, but it is much more random than just the file name (because the md5sum changes with the file

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-21 Thread Ian Lance Taylor
David Edelsohn dje@gmail.com writes: On Wed, Jul 20, 2011 at 4:25 PM, Ian Lance Taylor i...@google.com wrote: Presumably the fix will be to use -frandom-seed.  Does this patch fix the problem?  (The only real change is to fragment.am, the other changes are all generated by automake).

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-20 Thread Jonathan Wakely
On 20 July 2011 02:14, David Edelsohn wrote: On Tue, Jul 19, 2011 at 2:33 PM, Ian Lance Taylor i...@google.com wrote: I got agreement from two global reviewers and no objections. I have committed this patch. Please let me know about any problems. This also breaks bootstrap on AIX.  I

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-20 Thread Jonathan Wakely
On 20 July 2011 09:35, Jonathan Wakely wrote: On 20 July 2011 02:14, David Edelsohn wrote: On Tue, Jul 19, 2011 at 2:33 PM, Ian Lance Taylor i...@google.com wrote: I got agreement from two global reviewers and no objections. I have committed this patch. Please let me know about any

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-20 Thread Richard Guenther
On Wed, Jul 20, 2011 at 3:37 AM, Ian Lance Taylor i...@google.com wrote: H.J. Lu hjl.to...@gmail.com writes: It caused: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49787 Here is a patch.  Tested only by running configure, though I am starting a bootstrap. OK for mainline? Ok. Thanks,

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-20 Thread David Edelsohn
On Wed, Jul 20, 2011 at 5:43 AM, Jonathan Wakely jwakely@gmail.com wrote: Paolo has committed a change to that code, does it help the AIX bootstrap issue? Paolo's patch gets me past the debug.cc issue. Using C++ on AIX will greatly increase the bootstrap time on AIX because configure is

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-20 Thread Richard Guenther
On Wed, Jul 20, 2011 at 2:36 PM, David Edelsohn dje@gmail.com wrote: On Wed, Jul 20, 2011 at 5:43 AM, Jonathan Wakely jwakely@gmail.com wrote: Paolo has committed a change to that code, does it help the AIX bootstrap issue? Paolo's patch gets me past the debug.cc issue. Using

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-20 Thread Diego Novillo
On Wed, Jul 20, 2011 at 08:41, Richard Guenther richard.guent...@gmail.com wrote: Which is good as it increases testing coverage.  We probably would have missed this bug completely if you wouldn't have notice it. Agreed. The pain we feel due to this is similar to the pain one feels after

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-20 Thread Ian Lance Taylor
Diego Novillo dnovi...@google.com writes: On Wed, Jul 20, 2011 at 08:41, Richard Guenther richard.guent...@gmail.com wrote: Which is good as it increases testing coverage.  We probably would have missed this bug completely if you wouldn't have notice it. Agreed. The pain we feel due to

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-20 Thread Toon Moene
On 07/19/2011 08:33 PM, Ian Lance Taylor wrote: 2011-07-15 Ian Lance Taylori...@google.com * configure.ac: Add --enable-build-poststage1-with-cxx. If set, make C++ a boot_language. Set and substitute POSTSTAGE1_CONFIGURE_FLAGS. * Makefile.tpl

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-20 Thread Ian Lance Taylor
Toon Moene t...@moene.org writes: On 07/19/2011 08:33 PM, Ian Lance Taylor wrote: 2011-07-15 Ian Lance Taylori...@google.com * configure.ac: Add --enable-build-poststage1-with-cxx. If set, make C++ a boot_language. Set and substitute POSTSTAGE1_CONFIGURE_FLAGS. *

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-20 Thread Jonathan Wakely
Feel the burn^Wchurn! On 20/07/2011, Ian Lance Taylor i...@google.com wrote: Diego Novillo dnovi...@google.com writes: On Wed, Jul 20, 2011 at 08:41, Richard Guenther richard.guent...@gmail.com wrote: Which is good as it increases testing coverage.  We probably would have missed this bug

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-20 Thread David Edelsohn
AIX needs libsupc++ for libstdc++ static linking. * Makefile.tpl (POSTSTAGE1_CONFIGURE_FLAGS): Add libsupc++ to link directories. * Makefile.in: Rebuild. Index: Makefile.tpl === --- Makefile.tpl(revision

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-20 Thread Thomas Schwinge
Hi! On Wed, 20 Jul 2011 11:41:37 -0400, David Edelsohn dje@gmail.com wrote: AIX needs libsupc++ for libstdc++ static linking. * Makefile.tpl (POSTSTAGE1_CONFIGURE_FLAGS): Add libsupc++ to link directories. * Makefile.in: Rebuild. Index: Makefile.tpl

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-20 Thread Ian Lance Taylor
David Edelsohn dje@gmail.com writes: AIX needs libsupc++ for libstdc++ static linking. * Makefile.tpl (POSTSTAGE1_CONFIGURE_FLAGS): Add libsupc++ to link directories. * Makefile.in: Rebuild. Index: Makefile.tpl

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-20 Thread David Edelsohn
I now can get through the build of the compiler, but stage2 and stage3 libstdc++ and libsupc++ files have many comparison failures due to tree.c:get_file_function_name() introducing explicit randomness to produce different symbols for anonymous namespaces: /* Otherwise, the name must be

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-20 Thread Ian Lance Taylor
David Edelsohn dje@gmail.com writes: I now can get through the build of the compiler, but stage2 and stage3 libstdc++ and libsupc++ files have many comparison failures due to tree.c:get_file_function_name() introducing explicit randomness to produce different symbols for anonymous

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-20 Thread Toon Moene
On 07/20/2011 04:34 PM, Toon Moene wrote: So I changed my lto bootstrap script to do the following: language=fortran if [ $RANDOM -lt 16384 ] then language=ada fi ... ../gcc/configure \ ... --enable-languages=c++,$language \ Still have to see if this will fit in the 2:20 hour gap between two

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-20 Thread Ian Lance Taylor
Mike Stump mikest...@comcast.net writes: Presumably the fix will be to use -frandom-seed. But, the random seem was to ensure that things that should not collide, don't. If you use 0, then things that should not collide, eventually will and your world with then end. In the present code

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-20 Thread David Edelsohn
On Wed, Jul 20, 2011 at 4:53 PM, Mike Stump mikest...@comcast.net wrote: On Jul 20, 2011, at 1:25 PM, Ian Lance Taylor wrote: Interesting.  I don't know why this doesn't happen on GNU/Linux. It doesn't happen as the symbols in question are local on linux.  collect2 runs nm on public symbols

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-19 Thread Ian Lance Taylor
Ian Lance Taylor i...@google.com writes: I would like to propose this patch as a step toward building gcc using a C++ compiler. This patch builds stage1 with the C compiler as usual, and defaults to building stages 2 and 3 with a C++ compiler built during stage 1. This means that the gcc

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-19 Thread Gabriel Dos Reis
On Tue, Jul 19, 2011 at 1:33 PM, Ian Lance Taylor i...@google.com wrote: Ian Lance Taylor i...@google.com writes: I got agreement from two global reviewers and no objections. I have committed this patch. Great! -- Gaby

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-19 Thread H.J. Lu
On Tue, Jul 19, 2011 at 11:33 AM, Ian Lance Taylor i...@google.com wrote: Ian Lance Taylor i...@google.com writes: I would like to propose this patch as a step toward building gcc using a C++ compiler.  This patch builds stage1 with the C compiler as usual, and defaults to building stages 2

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-19 Thread H.J. Lu
On Tue, Jul 19, 2011 at 5:26 PM, H.J. Lu hjl.to...@gmail.com wrote: On Tue, Jul 19, 2011 at 11:33 AM, Ian Lance Taylor i...@google.com wrote: Ian Lance Taylor i...@google.com writes: I would like to propose this patch as a step toward building gcc using a C++ compiler.  This patch builds

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-19 Thread David Edelsohn
On Tue, Jul 19, 2011 at 2:33 PM, Ian Lance Taylor i...@google.com wrote: I got agreement from two global reviewers and no objections. I have committed this patch. Please let me know about any problems. This also breaks bootstrap on AIX. I cannot debug further at the moment because of a

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-19 Thread Ian Lance Taylor
H.J. Lu hjl.to...@gmail.com writes: It caused: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49787 Here is a patch. Tested only by running configure, though I am starting a bootstrap. OK for mainline? Ian 2011-07-19 Ian Lance Taylor i...@google.com PR bootstrap/49787 *

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-17 Thread Richard Guenther
On Sun, Jul 17, 2011 at 12:57 AM, Ian Lance Taylor i...@google.com wrote: Diego Novillo dnovi...@google.com writes: On Sat, Jul 16, 2011 at 02:52, Ian Lance Taylor i...@google.com wrote: 2011-07-15  Ian Lance Taylor  i...@google.com        * configure.ac: Add

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-17 Thread Eric Botcazou
I have measured it at some point and IIRC it was about 10% slower (comparing C bootstrap with C++ in stag1 languages with C++ bootstrap, not sure if that included bootstrapping libstdc++ for the former). IMO acceptable now that the build time of libjava has been halved. -- Eric Botcazou

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-17 Thread Richard Guenther
On Sun, Jul 17, 2011 at 1:30 PM, Eric Botcazou ebotca...@adacore.com wrote: I have measured it at some point and IIRC it was about 10% slower (comparing C bootstrap with C++ in stag1 languages with C++ bootstrap, not sure if that included bootstrapping libstdc++ for the former). IMO

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-17 Thread Markus Trippelsdorf
On 2011.07.17 at 18:30 +0200, Richard Guenther wrote: On Sun, Jul 17, 2011 at 1:30 PM, Eric Botcazou ebotca...@adacore.com wrote: I have measured it at some point and IIRC it was about 10% slower (comparing C bootstrap with C++ in stag1 languages with C++ bootstrap, not sure if that

PATCH RFA: Build stages 2 and 3 with C++

2011-07-16 Thread Ian Lance Taylor
I would like to propose this patch as a step toward building gcc using a C++ compiler. This patch builds stage1 with the C compiler as usual, and defaults to building stages 2 and 3 with a C++ compiler built during stage 1. This means that the gcc installed and used by most people will be built

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-16 Thread Andrew Pinski
On Fri, Jul 15, 2011 at 11:52 PM, Ian Lance Taylor i...@google.com wrote: I would like to propose this patch as a step toward building gcc using a C++ compiler.  This patch builds stage1 with the C compiler as usual, and defaults to building stages 2 and 3 with a C++ compiler built during

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-16 Thread Ian Lance Taylor
Andrew Pinski pins...@gmail.com writes: On Fri, Jul 15, 2011 at 11:52 PM, Ian Lance Taylor i...@google.com wrote: I would like to propose this patch as a step toward building gcc using a C++ compiler.  This patch builds stage1 with the C compiler as usual, and defaults to building stages 2

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-16 Thread Basile Starynkevitch
On Sat, 16 Jul 2011 00:04:58 -0700 Ian Lance Taylor i...@google.com wrote: Andrew Pinski pins...@gmail.com writes: On Fri, Jul 15, 2011 at 11:52 PM, Ian Lance Taylor i...@google.com wrote: I would like to propose this patch as a step toward building gcc using a C++ compiler.  This patch

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-16 Thread Diego Novillo
On Sat, Jul 16, 2011 at 02:52, Ian Lance Taylor i...@google.com wrote: 2011-07-15  Ian Lance Taylor  i...@google.com        * configure.ac: Add --enable-build-poststage1-with-cxx.  If set,        make C++ a boot_language.  Set and substitute        POSTSTAGE1_CONFIGURE_FLAGS.        *

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-16 Thread Toon Moene
On 07/16/2011 08:52 AM, Ian Lance Taylor wrote: I would like to propose this patch as a step toward building gcc using a C++ compiler. This patch builds stage1 with the C compiler as usual, and defaults to building stages 2 and 3 with a C++ compiler built during stage 1. I just completed a

Re: PATCH RFA: Build stages 2 and 3 with C++

2011-07-16 Thread Ian Lance Taylor
Diego Novillo dnovi...@google.com writes: On Sat, Jul 16, 2011 at 02:52, Ian Lance Taylor i...@google.com wrote: 2011-07-15  Ian Lance Taylor  i...@google.com        * configure.ac: Add --enable-build-poststage1-with-cxx.  If set,        make C++ a boot_language.  Set and substitute