From 8a65d08b275837052c497fc5db033b32f3fd5342 Mon Sep 17 00:00:00 2001 From: Max Filippov Date: Tue, 15 Mar 2016 15:02:03 +0300 Subject: gcc: backport fixes that preserve FLAGS_FOR_TARGET CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET are rewritten in gcc-4.8.x and gcc-4.9.x, so libstdc++ does not get any flags passed to gcc configure. Backport fixes for config/mt-gnu and config/mt-ospace that preserve these flags. With these fixes libstdc++ gets built with flags specified in CT_TARGET_CFLAGS. Signed-off-by: Max Filippov diff --git a/patches/gcc/4.8.5/130-pr43538.patch b/patches/gcc/4.8.5/130-pr43538.patch new file mode 100644 index 0000000..19e57bb --- /dev/null +++ b/patches/gcc/4.8.5/130-pr43538.patch @@ -0,0 +1,25 @@ +From c037df1be41f8daf4d581d7ffa4ec8cfa640bccf Mon Sep 17 00:00:00 2001 +From: glisse +Date: Fri, 25 Apr 2014 08:03:08 +0000 +Subject: [PATCH] 2014-04-25 Marc Glisse + + PR target/43538 + * mt-gnu: Don't reset CXXFLAGS_FOR_TARGET. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209784 138bc75d-0d04-0410-961f-82ee72b054a4 +Signed-off-by: Max Filippov +--- + config/mt-gnu | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/config/mt-gnu b/config/mt-gnu +index 15bf417..5c696f5 100644 +--- a/config/mt-gnu ++++ b/config/mt-gnu +@@ -1 +1 @@ +-CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE ++CXXFLAGS_FOR_TARGET += -D_GNU_SOURCE +-- +2.1.4 + diff --git a/patches/gcc/4.8.5/131-mt-ospace-preserve-FLAGS_FOR_TARGET.patch b/patches/gcc/4.8.5/131-mt-ospace-preserve-FLAGS_FOR_TARGET.patch new file mode 100644 index 0000000..1c49fb0 --- /dev/null +++ b/patches/gcc/4.8.5/131-mt-ospace-preserve-FLAGS_FOR_TARGET.patch @@ -0,0 +1,28 @@ +From 9bcf38cd9f382486b3823eb923b50e2e9a89cef7 Mon Sep 17 00:00:00 2001 +From: law +Date: Tue, 18 Nov 2014 22:12:52 +0000 +Subject: [PATCH] 2014-11-17 Bob Dunlop + + * mt-ospace (CFLAGS_FOR_TARGET): Append -g -Os rather than + overwriting. + (CXXFLAGS_FOR_TARGET): Similarly. + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217739 138bc75d-0d04-0410-961f-82ee72b054a4 +Signed-off-by: Max Filippov +--- + config/mt-ospace | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/config/mt-ospace b/config/mt-ospace +index 7f09104..ce29ff4 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 += -g -Os ++ CXXFLAGS_FOR_TARGET += -g -Os +-- +2.1.4 + diff --git a/patches/gcc/4.9.3/130-pr43538.patch b/patches/gcc/4.9.3/130-pr43538.patch new file mode 100644 index 0000000..19e57bb --- /dev/null +++ b/patches/gcc/4.9.3/130-pr43538.patch @@ -0,0 +1,25 @@ +From c037df1be41f8daf4d581d7ffa4ec8cfa640bccf Mon Sep 17 00:00:00 2001 +From: glisse +Date: Fri, 25 Apr 2014 08:03:08 +0000 +Subject: [PATCH] 2014-04-25 Marc Glisse + + PR target/43538 + * mt-gnu: Don't reset CXXFLAGS_FOR_TARGET. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209784 138bc75d-0d04-0410-961f-82ee72b054a4 +Signed-off-by: Max Filippov +--- + config/mt-gnu | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/config/mt-gnu b/config/mt-gnu +index 15bf417..5c696f5 100644 +--- a/config/mt-gnu ++++ b/config/mt-gnu +@@ -1 +1 @@ +-CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE ++CXXFLAGS_FOR_TARGET += -D_GNU_SOURCE +-- +2.1.4 + diff --git a/patches/gcc/4.9.3/131-mt-ospace-preserve-FLAGS_FOR_TARGET.patch b/patches/gcc/4.9.3/131-mt-ospace-preserve-FLAGS_FOR_TARGET.patch new file mode 100644 index 0000000..1c49fb0 --- /dev/null +++ b/patches/gcc/4.9.3/131-mt-ospace-preserve-FLAGS_FOR_TARGET.patch @@ -0,0 +1,28 @@ +From 9bcf38cd9f382486b3823eb923b50e2e9a89cef7 Mon Sep 17 00:00:00 2001 +From: law +Date: Tue, 18 Nov 2014 22:12:52 +0000 +Subject: [PATCH] 2014-11-17 Bob Dunlop + + * mt-ospace (CFLAGS_FOR_TARGET): Append -g -Os rather than + overwriting. + (CXXFLAGS_FOR_TARGET): Similarly. + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217739 138bc75d-0d04-0410-961f-82ee72b054a4 +Signed-off-by: Max Filippov +--- + config/mt-ospace | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/config/mt-ospace b/config/mt-ospace +index 7f09104..ce29ff4 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 += -g -Os ++ CXXFLAGS_FOR_TARGET += -g -Os +-- +2.1.4 + -- cgit v0.10.2-6-g49f6