Re: Speedup configure and build with system.h

2016-01-26 Thread Uros Bizjak
On Mon, Jan 25, 2016 at 2:53 PM, Michael Matz wrote: > Hi, > > On Mon, 25 Jan 2016, Uros Bizjak wrote: > >> This patch caused bootstrap failure on non-c++11 bootstrap compiler >> [1], e.g. CentOS 5.11. >> >> The problem is with std::swap, which was defined in header >> until c++11

Re: Speedup configure and build with system.h

2016-01-26 Thread Michael Matz
Hi, On Tue, 26 Jan 2016, Uros Bizjak wrote: > > Meh. Can you try the attached patch with a configure test (it > > includes the generated files)? It works for me with 4.3.4, and should > > make your build include always. > > Yes, this patch works for me and allows bootstrap with gcc-4.1.2

Re: Speedup configure and build with system.h

2016-01-25 Thread Michael Matz
Hi, On Mon, 25 Jan 2016, Uros Bizjak wrote: > This patch caused bootstrap failure on non-c++11 bootstrap compiler > [1], e.g. CentOS 5.11. > > The problem is with std::swap, which was defined in header > until c++11 [2]. > > [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69464 > [2]

Re: Speedup configure and build with system.h

2016-01-25 Thread Michael Matz
Hi, On Fri, 22 Jan 2016, Jakub Jelinek wrote: > > > This may have caused: > > > > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69434 > > > > Guess we need: > > > > 2016-01-22 Jakub Jelinek > > > > PR bootstrap/69434 > > * genrecog.c: Define INCLUDE_ALGORITHM

Re: Speedup configure and build with system.h

2016-01-25 Thread Richard Biener
On Mon, 25 Jan 2016, Michael Matz wrote: > Hi, > > On Mon, 25 Jan 2016, Uros Bizjak wrote: > > > This patch caused bootstrap failure on non-c++11 bootstrap compiler > > [1], e.g. CentOS 5.11. > > > > The problem is with std::swap, which was defined in header > > until c++11 [2]. > > > > [1]

Re: Speedup configure and build with system.h

2016-01-25 Thread Uros Bizjak
Hello! > * system.h (string, algorithm): Include only conditionally. > (new): Include always under C++. > * bb-reorder.c (toplevel): Define USES_ALGORITHM. > * final.c (toplevel): Ditto. > * ipa-chkp.c (toplevel): Define USES_STRING. > * genconditions.c (write_header): Make gencondmd.c define >

Re: Speedup configure and build with system.h

2016-01-22 Thread Jakub Jelinek
On Fri, Jan 22, 2016 at 12:09:43PM -0800, H.J. Lu wrote: > > * system.h (string, algorithm): Include only conditionally. > > (new): Include always under C++. > > * bb-reorder.c (toplevel): Define USES_ALGORITHM. > > * final.c (toplevel): Ditto. > > *

Re: Speedup configure and build with system.h

2016-01-22 Thread H.J. Lu
On Thu, Jan 21, 2016 at 8:57 AM, Michael Matz wrote: > Hi, > > this has bothered me for some time. The gcc configure with stage1 feels > like taking forever because some of the decl availability tests (checking > for C function) include system.h, and that, since a while,

Re: Speedup configure and build with system.h

2016-01-22 Thread Jakub Jelinek
On Fri, Jan 22, 2016 at 09:23:48PM +0100, Jakub Jelinek wrote: > On Fri, Jan 22, 2016 at 12:09:43PM -0800, H.J. Lu wrote: > > > * system.h (string, algorithm): Include only conditionally. > > > (new): Include always under C++. > > > * bb-reorder.c (toplevel): Define

Re: Speedup configure and build with system.h

2016-01-22 Thread Oleg Endo
On Thu, 2016-01-21 at 18:10 +0100, Richard Biener wrote: > On Thu, Jan 21, 2016 at 5:57 PM, Michael Matz wrote: > > Hi, > > > > this has bothered me for some time. The gcc configure with stage1 > > feels > > like taking forever because some of the decl availability tests > >

Re: Speedup configure and build with system.h

2016-01-22 Thread Richard Biener
On January 22, 2016 11:15:38 PM GMT+01:00, Jakub Jelinek wrote: >On Fri, Jan 22, 2016 at 09:23:48PM +0100, Jakub Jelinek wrote: >> On Fri, Jan 22, 2016 at 12:09:43PM -0800, H.J. Lu wrote: >> > > * system.h (string, algorithm): Include only >conditionally. >> > >

Re: Speedup configure and build with system.h

2016-01-22 Thread Michael Matz
Hi, On Fri, 22 Jan 2016, Oleg Endo wrote: > and have been put into system.h because there have > been problems with malloc poisoning and C++ stdlib implementation other > than libstdc++, which sometimes pull other headers which then cause > trouble. The fix for this set of errors was to

Re: Speedup configure and build with system.h

2016-01-22 Thread Michael Matz
Hi, On Thu, 21 Jan 2016, Richard Biener wrote: > I'm inclined to say #define INCLUDE_ALGORITHM is a better name, I've done this. On a different (slower) machine than the one from the initial mail: without patch, -j31 bootstrap all,ada: real35m2.655s user395m28.135s sys 12m10.814s

Re: Speedup configure and build with system.h

2016-01-21 Thread Richard Biener
On Thu, Jan 21, 2016 at 5:57 PM, Michael Matz wrote: > Hi, > > this has bothered me for some time. The gcc configure with stage1 feels > like taking forever because some of the decl availability tests (checking > for C function) include system.h, and that, since a while,

Speedup configure and build with system.h

2016-01-21 Thread Michael Matz
Hi, this has bothered me for some time. The gcc configure with stage1 feels like taking forever because some of the decl availability tests (checking for C function) include system.h, and that, since a while, unconditionally includes and under C++, and we meanwhile use the C++ compiler for