How to compile without optimizations
David Rubel
davidrubels at gmail.com
Thu Apr 5 04:19:48 UTC 2012
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.
David Rubel.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-workers/attachments/20120404/f6558b3c/attachment.html>
More information about the dhcp-workers
mailing list