[Gambas-devel] I am using ddd to debug - problem

Laurent Carlier lordheavym at ...176...
Sun Aug 10 20:12:30 CEST 2008


Le Sunday 10 August 2008 19:50:40 Kari Laine, vous avez écrit :
> On Sun, Aug 10, 2008 at 5:33 PM, Laurent Carlier 
<lordheavym at ...176...>wrote:
> > Le Saturday 09 August 2008 22:52:20 Benoit Minisini, vous avez écrit :
> > > On samedi 09 août 2008, Laurent Carlier wrote:
> > > > Le Saturday 09 August 2008 22:25:52 Benoit Minisini, vous avez écrit :
> > > > > On samedi 09 août 2008, Laurent Carlier wrote:
> > > > > > Le Saturday 09 August 2008 09:58:14 Benoit Minisini, vous avez
> >
> > écrit :
> > > > > > > On vendredi 08 août 2008, Kari Laine wrote:
> > > > > > > > Found it !
> > > > > > > >
> > > > > > > > there is somewhere in the makefiles -O3 which replaces -O0. I
> > > > > > > > will try to fix this.
> > > > > > > >
> > > > > > > > Best Regards
> > > > > > > > Kari
> > > > > > >
> > > > > > > Yes. It was a trick to force gcc to use -O3 and not -Os for a
> > > > > > > specific file. And I didn't realize that the
> >
> > --disable-optimization
> >
> > > > > > > flag is not taken into account then.
> > > > > > >
> > > > > > > I must find a way to specify file-specific compilation flags
> > > > > > > with automake. If you have ideas... :-)
> > > > > > >
> > > > > > > Regards,
> > > > > >
> > > > > > Is it really useful to put only this optimizing option for only
> > > > > > one file ? (iguess it's for gb_table.c).
> > > > > >
> > > > > > ++
> > > > >
> > > > > Yes. It makes the code of this file about 5% faster, and as this is
> >
> > the
> >
> > > > > main interpreter loop, I think it's worth it.
> > > > >
> > > > > In Gambas 3, another source file has its own optimization flags.
> > > > >
> > > > > But I admit this is not the correct solution. Maybe this is a lack
> > > > > of feature in automake...
> > > >
> > > > Add another variable like CORE_OPTIMIZE replaced in automake with -O3
> >
> > in
> >
> > > > case of optimizing or with AM_CFLAG otherwise.
> > > >
> > > > Perhaps i will take a look tonight after watching TV :-p
> > > >
> > > > ++
> > >
> > > Well, this topic is covered in the automake manual. Type that in
> >
> > Konqueror:
> > > info:/automake/Per-Object Flags
> > >
> > > In a few words, per-object flags is not supported, but there are
> > > workarounds that need some work.
> > >
> > > Regards,
> >
> > Ok, so this is my solution:
> >
> > In the configure.ac file i check for $gambas_optimization to detect if
> > --enable-
> > optimization is not set (not "yes") and subtitute an $optimized_CFLAGS
> > with the proper value if optimized (here -O3) or with an empty string
> > otherwise.
> >
> > Attached is the configure.ac file for trunk/main and Mafile.am file for
> > trunk/main/gbx
> >
> > I'm waiting for your comments.
> >
> > Regards,
> >
> > Hi,
>
> thanks for the effort. I run ./reconf-all. Then copied those two files in
> their postions and ran ./configure --disable-optimization. Then ran make >
> make_log.txt. From the make_log.txt I still found some files compiled with
> -O0 -O3 so optimization is on. Next some cuts from log.
>
> if gcc -DHAVE_CONFIG_H -I. -I.. -I../share    -I../libltdl
> -I/usr/local/lib/libffi-3.0.4/include    
> -DGAMBAS_PATH="\"/usr/local/bin\"" -pipe -Wall -Wno-unused-value
> -fsigned-char -fvisibility=hidden -g -O0 -O3 -MT gbx3-gb_error.o -MD -MP
> -MF ".deps/gbx3-gb_error.Tpo" -c -o
> gbx3-gb_error.o `test -f 'gb_error.c' || echo './'`gb_error.c; then mv -f
> ".deps/gbx3-gb_error.Tpo" ".deps/gbx3-gb_error.Po"; else rm -f
> ".deps/gbx3-gb_error.Tpo"; exit 1; fi
>
> if gcc -DHAVE_CONFIG_H -I. -I.. -I../share    -I../libltdl
> -I/usr/local/lib/libffi-3.0.4/include    
> -DGAMBAS_PATH="\"/usr/local/bin\"" -pipe -Wall -Wno-unused-value
> -fsigned-char -fvisibility=hidden -g -O0 -O3 -MT gbx3-gbx_exec_loop.o -MD
> -MP -MF ".deps/gbx3-gbx_exec_loop.Tpo" -c -o gbx3-gbx_exec_loop.o `test -f
> 'gbx_exec_loop.c' || echo
> './'`gbx_exec_loop.c; then mv -f ".deps/gbx3-gbx_exec_loop.Tpo"
> ".deps/gbx3-gbx_exec_loop.Po"; else rm -f ".deps/gbx3-gbx_exec_loop.Tpo";
> exit 1; fi
>
> if gcc -DHAVE_CONFIG_H -I. -I.. -I../share -I../libltdl
> -DGAMBAS_PATH="\"/usr/local/bin\"" -pipe -Wall -Wno-unused-value
> -fsigned-char -fvisibility=hidden -g -O0 -O3  -MT gbc3-gb_table.o -MD -MP
> -MF ".deps/gbc3-gb_table.Tpo" -c -o gbc3-gb_table.o `test -f 'gb_table.c'
> || echo './'`gb_table.c; then mv -f ".deps/gbc3-gb_table.Tpo"
> ".deps/gbc3-gb_table.Po"; else rm -f ".deps/gbc3-gb_table.Tpo"; exit 1; fi
>
> I am not sure I am not misunderstanding something. But here it seems -O3 is
> added from somewhere. Sorry that I cannot fix it (yet).
>
> Best Regards
> Kari

try with ./configure --enable-optimization=no

Regards,





More information about the Devel mailing list