public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] newlib2 and CFLAGS_FOR_TARGET
@ 2014-11-14 10:52 Bob Dunlop
  2014-12-05  9:43 ` Bob Dunlop
  0 siblings, 1 reply; 4+ messages in thread
From: Bob Dunlop @ 2014-11-14 10:52 UTC (permalink / raw)
  To: crossgcc

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

Hi,

I've been having problems passing CFLAGS_FOR_TARGET to newlib-2.0 
and 2.1 builds.  Basically selecting optimising for space was
overriding any other flags.

This patch placed in crosstool-ng-1.20.0/patches/newlib/2.0.0/ and
2.1.0/ prevents the override, appending the space optimising flags
to any existing settings.

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

This is basically a bug in newlibs configuration code not crosstool-NG
and I have reported this on their mailing list as well.

-- 
        Bob Dunlop

[-- Attachment #2: 100-fix-optimising-for-space.patch --]
[-- Type: text/x-diff, Size: 336 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


[-- Attachment #3: Type: text/plain, Size: 71 bytes --]

--
For unsubscribe information see http://sourceware.org/lists.html#faq

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

* Re: [PATCH] newlib2 and CFLAGS_FOR_TARGET
  2014-11-14 10:52 [PATCH] newlib2 and CFLAGS_FOR_TARGET Bob Dunlop
@ 2014-12-05  9:43 ` Bob Dunlop
  2014-12-05  9:52   ` Bryan Hundven
  0 siblings, 1 reply; 4+ messages in thread
From: Bob Dunlop @ 2014-12-05  9:43 UTC (permalink / raw)
  To: crossgcc

Please review me

I've pushed this upstream (to gcc eventually) and it has been accepted
for future versions.  The change remains valid for existing versions.
-- 
        Bob Dunlop

--
For unsubscribe information see http://sourceware.org/lists.html#faq

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

* Re: [PATCH] newlib2 and CFLAGS_FOR_TARGET
  2014-12-05  9:43 ` Bob Dunlop
@ 2014-12-05  9:52   ` Bryan Hundven
  2014-12-09 15:05     ` [PATCH] Patch newlib-2.xx optimising for space Append flags to CFLAGS_FOR_TARGET rather than replacing Bob Dunlop
  0 siblings, 1 reply; 4+ messages in thread
From: Bryan Hundven @ 2014-12-05  9:52 UTC (permalink / raw)
  To: crossgcc maillist

Bob,

On Fri, Dec 5, 2014 at 1:43 AM, Bob Dunlop <bob.dunlop@xyzzy.org.uk> wrote:
> Please review me
>
> I've pushed this upstream (to gcc eventually) and it has been accepted
> for future versions.  The change remains valid for existing versions.
> --
>         Bob Dunlop
>
> --
> For unsubscribe information see http://sourceware.org/lists.html#faq
>

Interesting, this patch does not cleanly apply:

-----------------------------------------------------------------------
Applying patch #410766 using 'git am -s'
Description: newlib2 and CFLAGS_FOR_TARGET
Applying: newlib2 and CFLAGS_FOR_TARGET
error: config/mt-ospace: does not exist in index
Patch failed at 0001 newlib2 and CFLAGS_FOR_TARGET
The copy of the patch that failed is found in:
   /home/bryan/crosstool-ng/.git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
-----------------------------------------------------------------------

If you can update the patch(s) as it should be in crosstool-ng/... In
other words, you add the patch to the right places, git add the files,
git commit (with signoff), and git send-email -cc crossgcc at
sourceware dot org --to bryanhundven at gmail dot com

Otherwise, if I commit it, then you loose on that stats for the
contribution (I get another commit :) ).

-Bryan

--
For unsubscribe information see http://sourceware.org/lists.html#faq

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

* [PATCH] Patch newlib-2.xx optimising for space Append flags to CFLAGS_FOR_TARGET rather than replacing.
  2014-12-05  9:52   ` Bryan Hundven
@ 2014-12-09 15:05     ` Bob Dunlop
  0 siblings, 0 replies; 4+ messages in thread
From: Bob Dunlop @ 2014-12-09 15:05 UTC (permalink / raw)
  To: bryanhundven; +Cc: crossgcc, Bob Dunlop

---
 patches/newlib/2.0.0/100-fix-optimising-for-space.patch | 8 ++++++++
 patches/newlib/2.1.0/100-fix-optimising-for-space.patch | 8 ++++++++
 2 files changed, 16 insertions(+)
 create mode 100644 patches/newlib/2.0.0/100-fix-optimising-for-space.patch
 create mode 100644 patches/newlib/2.1.0/100-fix-optimising-for-space.patch

diff --git a/patches/newlib/2.0.0/100-fix-optimising-for-space.patch b/patches/newlib/2.0.0/100-fix-optimising-for-space.patch
new file mode 100644
index 0000000..8480f92
--- /dev/null
+++ b/patches/newlib/2.0.0/100-fix-optimising-for-space.patch
@@ -0,0 +1,8 @@
+--- 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
diff --git a/patches/newlib/2.1.0/100-fix-optimising-for-space.patch b/patches/newlib/2.1.0/100-fix-optimising-for-space.patch
new file mode 100644
index 0000000..0e94d50
--- /dev/null
+++ b/patches/newlib/2.1.0/100-fix-optimising-for-space.patch
@@ -0,0 +1,8 @@
+--- newlib-2.1.0/config/mt-ospace-orig	2014-11-13 12:02:45.463578281 +0000
++++ newlib-2.1.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
-- 
2.0.4


--
For unsubscribe information see http://sourceware.org/lists.html#faq

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

end of thread, other threads:[~2014-12-09 15:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-14 10:52 [PATCH] newlib2 and CFLAGS_FOR_TARGET Bob Dunlop
2014-12-05  9:43 ` Bob Dunlop
2014-12-05  9:52   ` Bryan Hundven
2014-12-09 15:05     ` [PATCH] Patch newlib-2.xx optimising for space Append flags to CFLAGS_FOR_TARGET rather than replacing Bob Dunlop

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