How to compile without optimizations
David Rubel
davidrubels at gmail.com
Sat Apr 7 18:57:24 UTC 2012
It worked wonders.
Thanks... and I mean A LOT!
On Thu, Apr 5, 2012 at 12:29 AM, Kuroishi Mitsuo <kuroishi at iij.ad.jp> wrote:
>
> > Hello.
> >
> > Is there a way to compile the ISC DHCP without code optimization?. I
> tried
> > editing the Makefile created by ./configure, changing in the "CFLAGS"
> line
> > the "-O2" option to "-O0" or even removing it completely, but then when
> I
> > Make the output leads me to think that the code it's still being
> optimized.
> >
> > For example: the last gcc output is "gcc -g -O2 -Wall -Werror
> > -fno-strict-aliasing -I../bind/include -o dhcpd dhcpd-dhcpd.o......".
> >
> > Also, running the dhclient through GDB shows that the values of some
> > variables/pointers used in a function I created are being optimized
> ("value
> > optimized out"). I'm getting a Segmentation fault during a malloc to a
> > pointer (only initialized, pointing to NULL) which value is being
> optimized
> > before the malloc and I'd like to try if compiling without optimizations
> > would fix that problem.
> >
> > Any help will be greatly appreciated.
> > Thanks.
>
> Hi.
>
> I did ./configure CFLAGS="-g3 -O0" and it seems to be OK.
>
> Regards,
>
> --
> Kuroishi Mitsuo
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-workers/attachments/20120407/48a74066/attachment.html>
More information about the dhcp-workers
mailing list