This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Why does optimize for speed enable debug information ?
- From: Jacob Kroon <jacob dot kroon at gmail dot com>
- To: newlib at sourceware dot org
- Date: Thu, 30 Jun 2016 09:09:39 +0200
- Subject: Why does optimize for speed enable debug information ?
- Authentication-results: sourceware.org; auth=none
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