This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Unoptimized compilation in src - bug or intentional?
- From: Rask Ingemann Lambertsen <rask at sygehus dot dk>
- To: Paolo Carlini <pcarlini at suse dot de>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Wed, 27 Jun 2007 20:54:02 +0200
- Subject: Re: Unoptimized compilation in src - bug or intentional?
- References: <20070627002934.GW5690@sygehus.dk> <46825A0D.2060206@suse.de>
On Wed, Jun 27, 2007 at 02:37:33PM +0200, Paolo Carlini wrote:
> Rask Ingemann Lambertsen wrote:
>
> > There's no -O2 anywhere when compiling in the src subdirectory. Is that
> >intentional?
> >
> >
> Certainly, this does *not* happen when building native configurations on
> many linux targets to which I have access.
I can reproduce it on a native i686-pc-linux-gnu build (Ubuntu 5.10)
configured so:
$ ~/src/gcc/configure --disable-{bootstrap,nls,gdb} --enable-languages=c,c++
> In general, I'm finding your
> report really puzzling, never seen something similar. Out of curiosity,
> what happens if you specify CXXFLAGS explicitely, either by hand (just a
> make clean inside the build library, then set CXXFLAGS, make), or by
> |configuring with appropriate --enable-cxx-flags?
I tried the latter with a cross from a x86_64-unknown-linux-gnu box
(Debian GNU/Linux 4.0):
$ /n/12/rask/src/all/configure --target=m32c-unknown-elf
--enable-languages=c,c++ --enable-cxx-flags=-O2 --with-newlib --enable-sim
--disable-{multilib,nls,gdb}
And it works!
libtool: compile: /home/rask/testbuild/./gcc/xgcc -shared-libgcc
[lots of stuff] -fdata-sections -O2 -c
/n/12/rask/src/all/libstdc++-v3/src/complex_io.cc -o complex_io.o
Likewise with the native i686-pc-linux-gnu build above with
--enable-cxx-flags=-O2 added.
--
Rask Ingemann Lambertsen