How do I disable the "-O2" flag in the most portable way possible?

I am just learning, I am no authority. But, I would do it at configure time: 'CXXFLAGS=-O0' 'CFLAGS=-O0'

If you have some *file* that needs some specific flag, you could set it
in your Makefile.am. I think it would be something like that (not sure):

execname_SOURCES = cannot_opt.cpp cannot_opt.h can_opt.cpp can_opt.h
cannot_opt_o_CXXFLAGS = -O0

Andre Caldas.





Reply via email to