This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Don't override CFLAGS_FOR_TARGET when optimising for size


Hi,

This patch prevents optmizing for space overriding any other
CFLAGS_FOR_TARGET that may already be set.  Found when trying
to set -fno-omit-frame-pointer for compatability with some
in house code.

Simply append the space optimisation flags to the CFLAGS_FOR_TARGET
set rather than replacing.

Tested compiling newlib-2.0.0 for ARM with crosstool-NG-1.20.0 and
GNU Make 3.82.

Same patch for 2.1.0.


-- 
        Bob Dunlop
--- newlib-2.0.0/config/mt-ospace-orig	2014-11-13 12:02:45.463578281 +0000
+++ newlib-2.0.0/config/mt-ospace	2014-11-13 12:03:01.409592374 +0000
@@ -1,3 +1,3 @@
 # Build libraries optimizing for space, not speed.
- CFLAGS_FOR_TARGET = -g -Os
- CXXFLAGS_FOR_TARGET = -g -Os
+ CFLAGS_FOR_TARGET += -g -Os
+ CXXFLAGS_FOR_TARGET += -g -Os

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]