public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Don't override CFLAGS_FOR_TARGET when optimising for size
@ 2014-11-13 14:02 Bob Dunlop
  2014-11-14 17:10 ` Jeff Johnston
  0 siblings, 1 reply; 2+ messages in thread
From: Bob Dunlop @ 2014-11-13 14:02 UTC (permalink / raw)
  To: newlib

[-- Attachment #1: Type: text/plain, Size: 429 bytes --]

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

[-- Attachment #2: 100-fix-optimising-for-space.patch --]
[-- Type: text/x-diff, Size: 335 bytes --]

--- 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Don't override CFLAGS_FOR_TARGET when optimising for size
  2014-11-13 14:02 [PATCH] Don't override CFLAGS_FOR_TARGET when optimising for size Bob Dunlop
@ 2014-11-14 17:10 ` Jeff Johnston
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Johnston @ 2014-11-14 17:10 UTC (permalink / raw)
  To: Bob Dunlop; +Cc: newlib

Hi Bob,

If you look at the note in the top-level MAINTAINER file, you will see that
changes to the config directory needs to be kept in sync with the GCC repo.

compile; depcomp; install-sh; missing; ylwrap;
config/
        Any global maintainer can approve changes to these
        files and directories, but they should be aware
        that they need to be kept in sync with their
        counterparts in the GCC repository.

I would suggest you submit your patch to the gcc list and then it should get
mirrored for newlib's repo.

-- Jeff J.

----- Original Message -----
> From: "Bob Dunlop" <bob.dunlop@xyzzy.org.uk>
> To: newlib@sourceware.org
> Sent: Thursday, November 13, 2014 9:02:06 AM
> Subject: [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
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-11-14 17:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-13 14:02 [PATCH] Don't override CFLAGS_FOR_TARGET when optimising for size Bob Dunlop
2014-11-14 17:10 ` Jeff Johnston

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).