[Coin-discuss] Problem with -fomit-frame-pointer/coin_opt_cxxflags

Andreas Waechter andreasw at watson.ibm.com
Sun Aug 13 11:06:51 EDT 2006


Hi Kipp,

Lou had also noted this problem and submitted a ticket:

https://projects.coin-or.org/BuildTools/ticket/8

> By default ./configure turns on -fomit-frame-pointer in CXXFLAGS.  On
> Linux with gcc 3.4.5 this causes an error when I try to throw an
> exception in my code. I see from a Google search that evidently there is
> some sort of gcc bug with the -fomit-frame-pointer and try catch  in
> Linux. Two questions:
>
> 1) Has anyone else had difficulty using  try, catch in their code along
> with the -fomit-frame-pointer option on Linux? This problem does not
> occur with identical code in Mac OS X.

It is working fine for me with g++ (GCC) 3.2.3.

> 2) I want to turn this option off. I can do this by
>
> ./configure CXXFLAGS="my options"
>
> however, I prefer to alter the necessary makefile.am file for my
> project.  I tried using the automake AM_CXXFLAGS macro to set my
> options, however this does not seem to work. Is there an easy way to
> override the coin.m4 macro variable setting
>
> coin_opt_cxxflags="-O3 -fomit-frame-pointer"
>
> in one of the .ac or .am files? I don't want to change the coin.m4 file,
>  instead I would like to make the change in one my project .ac or .am
> files so that when I execute run_autotools the generated configure file has
>
>        coin_opt_cxxflags="-O3"

There is no easy way to this without changing coin.m4.  And if this is a 
real bug for GCC on Linux, we should fix it COIN-wide.

We can do two things:

1. Get rid of -fomit-frame-pointer alltogether - I had put it in because 
John Forrest suggested to use it, since it save a little time by being 
able to use one more register (or something like that).

2. If you can tell me which version of the GNU compiler does not work with 
that flag, I can try to change coin.m4 so that it doesn't use the flag for 
those compilers on Linux.

What do you think?

Andreas

>
> Thanks
>
> -- 
> Kipp Martin
> Professor of Operations Research
> 	and Computing Technology
> University of Chicago
> Graduate School of Business
> 5807 South Woodlawn Avenue
> Chicago IL 60637
> 773-702-7456
> _______________________________________________
> Coin-discuss mailing list
> Coin-discuss at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/coin-discuss
>



More information about the Coin-discuss mailing list