Re: Building C++ with --enable-languages=c,fortran

2011-08-06 Thread Mikael Morin
On Saturday 06 August 2011 00:52:02 Thomas Koenig wrote:
 Hello world,
 
 I just noticed that C++ now appears to be built by default, even when
 only the C and fortran are specified.
Yes, but it doesn't make much difference in practice. The only difference I 
saw is the debugging symbols including the full prototype (not only the 
function name) in the debugger.
WRT to bootstrap time, as usual: it's too long.

Mikael



Re: Building C++ with --enable-languages=c,fortran

2011-08-06 Thread Toon Moene

On 08/06/2011 11:22 AM, Mikael Morin wrote:


WRT to bootstrap time, as usual: it's too long.


Well, that all depends on your (time) frame of reference, of course.  In 
the summer months leading up to Craig Burley asking for volunteers 
testing g77 (the g77-alpha phase), i.e., during the summer of 1992, a 
bootstrap of GCC (C and C++) took 8 hours on my single 25 Mhz Motorola 
68040 powered Next Station.


With the new gcc, I could build a fresh f2c in minutes, and, using that 
combo (f2c+gcc) a recompile of our weather forecasting code took another 
10 minutes.


Nowadays, on a *4 year old* quad core Core 2 machine, building C, C++, 
Ada and Fortran takes less than 2 hours, so given that I put in 4 times 
as many processors, the rest of the hardware keeps up with providing me 
a bootstrap in 1/4th of the time it took 19 years ago, giving me twice 
the number of front ends plus run time libraries.


I think the outlook is good :-)

--
Toon Moene - e-mail: t...@moene.org - phone: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
At home: http://moene.org/~toon/; weather: http://moene.org/~hirlam/
Progress of GNU Fortran: http://gcc.gnu.org/wiki/GFortran#news


Re: Building C++ with --enable-languages=c,fortran

2011-08-06 Thread Steve Kargl
On Sat, Aug 06, 2011 at 03:16:43PM +0200, Toon Moene wrote:
 On 08/06/2011 11:22 AM, Mikael Morin wrote:
 
 WRT to bootstrap time, as usual: it's too long.
 
 Well, that all depends on your (time) frame of reference, of course.  In 
 the summer months leading up to Craig Burley asking for volunteers 
 testing g77 (the g77-alpha phase), i.e., during the summer of 1992, a 
 bootstrap of GCC (C and C++) took 8 hours on my single 25 Mhz Motorola 
 68040 powered Next Station.
 
 With the new gcc, I could build a fresh f2c in minutes, and, using that 
 combo (f2c+gcc) a recompile of our weather forecasting code took another 
 10 minutes.
 
 Nowadays, on a *4 year old* quad core Core 2 machine, building C, C++, 
 Ada and Fortran takes less than 2 hours, so given that I put in 4 times 
 as many processors, the rest of the hardware keeps up with providing me 
 a bootstrap in 1/4th of the time it took 19 years ago, giving me twice 
 the number of front ends plus run time libraries.
 
 I think the outlook is good :-)
 

You left out the crucial hardware spec.  How much memory
did you have 19 years ago compared to the system today?
My experience with g++ is that it will consume more memory
than gcc.  

-- 
Steve


Re: Building C++ with --enable-languages=c,fortran

2011-08-06 Thread Toon Moene

On 08/06/2011 05:14 PM, Steve Kargl wrote:


You left out the crucial hardware spec.  How much memory
did you have 19 years ago compared to the system today?
My experience with g++ is that it will consume more memory
than gcc.


That might be true - I have never experienced memory shortage *building* 
C and C++ in 1992 - I had 16 Mbyte of RAM at that time.


Nowadays I have 4 Gbyte of RAM, but still *bootstrapping* doesn't seem 
to be a problem (certain parts of the weather forecasting system these 
days stretch the virtual memory system, but with 4 Gbyte RAM and 11 
Gbyte SWAP I still survive).


--
Toon Moene - e-mail: t...@moene.org - phone: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
At home: http://moene.org/~toon/; weather: http://moene.org/~hirlam/
Progress of GNU Fortran: http://gcc.gnu.org/wiki/GFortran#news


Building C++ with --enable-languages=c,fortran

2011-08-05 Thread Thomas Koenig

Hello world,

I just noticed that C++ now appears to be built by default, even when 
only the C and fortran are specified.  The configure line



../trunk/configure  --prefix=$HOME --enable-languages=c,fortran 
--with-mpc=/usr/local --with-mpfr=/usr/local


leads to the message

checking for version 0.11 (revision 0 or later) of PPL... no 


The following languages will be built: c,c++,fortran,lto

I see recent changes by Ian in this area, but nothing in the ChangeLog
suggests to me that this was intentional.

Any ideas?


Re: Building C++ with --enable-languages=c,fortran

2011-08-05 Thread Steve Kargl
On Sat, Aug 06, 2011 at 12:52:02AM +0200, Thomas Koenig wrote:
 Hello world,
 
 I just noticed that C++ now appears to be built by default, even when 
 only the C and fortran are specified.  The configure line
 
 
 ../trunk/configure  --prefix=$HOME --enable-languages=c,fortran 
 --with-mpc=/usr/local --with-mpfr=/usr/local
 
 leads to the message
 
 checking for version 0.11 (revision 0 or later) of PPL... no 
 
 The following languages will be built: c,c++,fortran,lto
 
 I see recent changes by Ian in this area, but nothing in the ChangeLog
 suggests to me that this was intentional.
 
 Any ideas?

It appears the original thread starts here 

http://gcc.gnu.org/ml/gcc-patches/2011-07/msg01304.html



-- 
Steve


Re: Building C++ with --enable-languages=c,fortran

2011-08-05 Thread Ian Lance Taylor
Thomas Koenig tkoe...@netcologne.de writes:

 I just noticed that C++ now appears to be built by default, even when
 only the C and fortran are specified.  The configure line


 ../trunk/configure  --prefix=$HOME --enable-languages=c,fortran
 --with-mpc=/usr/local --with-mpfr=/usr/local

 leads to the message

 checking for version 0.11 (revision 0 or later) of PPL... no 

 The following languages will be built: c,c++,fortran,lto

 I see recent changes by Ian in this area, but nothing in the ChangeLog
 suggests to me that this was intentional.

It is intentional.  In current mainline stages 2 and 3 are now by
default built with the C++ compiler, not the C compiler.  Therefore, the
C++ compiler must be built in stages 1 and 2, in order to use to build
the stages 2 and 3 compiler.  And then of course we build the C++
compiler in stage 3 in order to compare it.

The ChangeLog entry says that if --enable-build-poststage1-with-cxx is
set, C++ becomes a boot language.  That is what you are seeing.  I guess
what the ChangeLog entry does not say is that
--enable-build-poststage1-with-cxx is set by default.

Ian


Re: Building C++ with --enable-languages=c,fortran

2011-08-05 Thread Steve Kargl
On Fri, Aug 05, 2011 at 06:51:12PM -0700, Ian Lance Taylor wrote:
 Thomas Koenig tkoe...@netcologne.de writes:
 
  I just noticed that C++ now appears to be built by default, even when
  only the C and fortran are specified.  The configure line
 
 
  ../trunk/configure  --prefix=$HOME --enable-languages=c,fortran
  --with-mpc=/usr/local --with-mpfr=/usr/local
 
  leads to the message
 
  checking for version 0.11 (revision 0 or later) of PPL... no 
 
  The following languages will be built: c,c++,fortran,lto
 
  I see recent changes by Ian in this area, but nothing in the ChangeLog
  suggests to me that this was intentional.
 
 It is intentional.  In current mainline stages 2 and 3 are now by
 default built with the C++ compiler, not the C compiler.  Therefore, the
 C++ compiler must be built in stages 1 and 2, in order to use to build
 the stages 2 and 3 compiler.  And then of course we build the C++
 compiler in stage 3 in order to compare it.
 
 The ChangeLog entry says that if --enable-build-poststage1-with-cxx is
 set, C++ becomes a boot language.  That is what you are seeing.  I guess
 what the ChangeLog entry does not say is that
 --enable-build-poststage1-with-cxx is set by default.
 

What are the additional resource requirements?  Some of
us have old hardware and limited $.

-- 
Steve


Re: Building C++ with --enable-languages=c,fortran

2011-08-05 Thread Ian Lance Taylor
Steve Kargl s...@troutmask.apl.washington.edu writes:

 The ChangeLog entry says that if --enable-build-poststage1-with-cxx is
 set, C++ becomes a boot language.  That is what you are seeing.  I guess
 what the ChangeLog entry does not say is that
 --enable-build-poststage1-with-cxx is set by default.
 

 What are the additional resource requirements?  Some of
 us have old hardware and limited $.

The main additional resource requirement is building libstdc++ in stage
1 (and stages 2 and 3 if you were previously not building the C++
compiler at all).  The C++ compiler proper is fairly small by
comparison.

At present you can use --disable-build-poststage1-with-cxx.  However, in
the future, I would like to change gcc to always build with C++.  Yes,
this will take more resources.

Ian