This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

Re: Don't override all other CFLAGS_FOR_TARGET when optimizing libraries for space


On 11/17/14 03:16, Bob Dunlop wrote:
Hi,

This patch prevents optimizing libraries for space from overriding all
previous CFLAGS_FOR_TARGET settings.  Add optimization flags to any
pre-existing values.

I hit this problem whilst building a Gcc cross compiler and newlib
library for ARM with crosstool-NG-1.20.0.  The newlib developers
suggested I should try posting it here.


--- gcc-4.9.2/config/mt-ospace	1999-09-04 16:09:22.000000000 +0100
+++ gcc-new/config/mt-ospace	2014-11-17 09:50:08.000000000 +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
Thanks.  Installed.

jeff


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