Why does optimize for speed enable debug information ?
Jacob Kroon
jacob.kroon@gmail.com
Thu Jun 30 07:09:00 GMT 2016
Hi,
I've been building newlib with --enable-target-optspace, and noticed that "-g"
was being added to the compiler flags, even though I've overridden
CFLAGS_FOR_TARGET when configuring. It looks like it is being added by
config/mt-ospace:
# Build libraries optimizing for space, not speed.
CFLAGS_FOR_TARGET += -g -Os
CXXFLAGS_FOR_TARGET += -g -Os
I checked the git history, and it seems to have been this way since the
initial import 1999. Is this by intention, or would it be more appropriate if we
patched newlib to only pass -Os here ?
Regards Jacob
More information about the Newlib
mailing list