This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
[PATCH] newlib: Remove debug flag for --enable-target-optspace
- From: Stephanos Ioannidis <root at stephanos dot io>
- To: "newlib at sourceware dot org" <newlib at sourceware dot org>
- Cc: Stephanos Ioannidis <root at stephanos dot io>
- Date: Fri, 29 Nov 2019 03:46:57 +0000
- Subject: [PATCH] newlib: Remove debug flag for --enable-target-optspace
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=stephanos.io; dmarc=pass action=none header.from=stephanos.io; dkim=pass header.d=stephanos.io; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=46TL+LFuQrQZlRmM2OKHkYdtr3gmGRgkMSm04W1XBFQ=; b=KxC0Q+H91z/9wGsDSEZjZxHrDSCmCzXPOGoSz+4FRkWVD/9S4fBi91rjzYBzWR++E10xkkgyyZOCf+Nh0oUtSupjeYtxVdEk3a6d5msrPEH/saoofeqMVWodT3JoQnI//W7lqYLnCGOA1hhTkvk0SDqUUZwRMiexFFKX2tnOt/f/OXI49yFRqIzlWfadH/dnmlP+K74ykQ479HBUHpTIHU8oAZuXgwA3mXqKtcp+1bmZggsWKObMDvPKHwQ7CXOOCpldn4DQzRnhYT9Prhl1/DVaasuN1zphr57rnA3k41/+0v906wvfjGZVqgITAZ/uBBwc6Sn0SyAWhnQebU0QDg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FkD8xM4jwxal4iXJtg6fX5+ClF+Ob2dcFPO7pt47KEZZliZ6fvh76NMmUlk37og8B9d3zOIV75S2X9JZl6D4WB9Z0IZjXU6t9SUhEo/mtUxEKu1WKY8zR3cV+eS6KE6pPq2fFnaeXyyJzjW4e2e+rnxhJNfplLVaABs/ETx0P/XQVC6AHbvcUqOXFPTOMEajLg6RrwUHXAlsztL1o0FcdNPrMMaDO9LfSIti/u7pZIbRoZ4q3Snviq4Mx3Z8xoY08f0HFcmMdNKuAmWehFH7f5zVKp2PpSgl0zhxU1hGqylv5yUNght+FqDbEvOjEvUbTqHjykyGw/wv24T1MvjuXg==
--enable-target-optspace adds -g (debug) option flag to the CFLAGS
alongside -Os (optimise for size) for no good reason.
Since the -g option flag is not required by the -Os option flag and it
not contribute to what --enable-target-optspace tries to achieve (i.e.
optimise for size), this flag should be removed.
It is also worth noting that many newlib users (e.g. GNU ARM Embedded)
are manually adding -Os to CFLAGS because the --enable-target-optspace
does not achieve what it should.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
---
config/mt-ospace | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/config/mt-ospace b/config/mt-ospace
index ce29ff431..95be8259d 100644
--- a/config/mt-ospace
+++ b/config/mt-ospace
@@ -1,3 +1,3 @@
# Build libraries optimizing for space, not speed.
- CFLAGS_FOR_TARGET += -g -Os
- CXXFLAGS_FOR_TARGET += -g -Os
+ CFLAGS_FOR_TARGET += -Os
+ CXXFLAGS_FOR_TARGET += -Os
--
2.17.1