Re: [PATCH] gcc: explicitly use CFLAGS_FOR_TARGET instead of --enable-target-optspace

2014-07-14 Thread Carmelo Amoroso

Hello Alexey,
I guess you sent it to the wrong list.

You need to send to buildroot team.

Regards,
Carmelo

On 7/11/2014 6:31 PM, Alexey Brodkin wrote:

Due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id= it's impossible
to specify custom CFLAGS_FOR_TARGET, it is always gets overriden with values
from config/mt-ospace:
===
  CFLAGS_FOR_TARGET = -g -Os
  CXXFLAGS_FOR_TARGET = -g -Os
===

But in some situations it's required to pass custom flags on buildong of libgcc:
  * Default flags -g -Os lead to build isses as with PowerPC on gcc 4.5
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43810)
  * Particular CPU requires specific instructions for HW support
  * Deep optimizations

Tested by toolchain building for ARC, ARM and PowerPC with GCC 4.5

Signed-off-by: Alexey Brodkin abrod...@synopsys.com

Cc: Anton Kolesov akole...@synopsys.com
Cc: Thomas Petazzoni thomas.petazz...@free-electrons.com
Cc: Peter Korsgaard pe...@korsgaard.com
Cc: Gustavo Zacarias gust...@zacarias.com.ar
---
  package/gcc/gcc-intermediate/gcc-intermediate.mk | 13 +
  package/gcc/gcc.mk   | 10 --
  2 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/package/gcc/gcc-intermediate/gcc-intermediate.mk 
b/package/gcc/gcc-intermediate/gcc-intermediate.mk
index db84d18..0543574 100644
--- a/package/gcc/gcc-intermediate/gcc-intermediate.mk
+++ b/package/gcc/gcc-intermediate/gcc-intermediate.mk
@@ -46,4 +46,17 @@ ifeq ($(BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE),y)
  HOST_GCC_INTERMEDIATE_INSTALL_OPT += install-target-libgcc
  endif

+ifeq ($(ARCH),powerpc)
+ifeq ($(findstring x4.5.,x$(GCC_VERSION)),x4.5.)
+   # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43810
+   # Workaround until it's fixed in 4.5.4 or later
+   HOST_GCC_INTERMEDIATE_CONF_ENV += CFLAGS_FOR_TARGET=-g -O2
+   HOST_GCC_INTERMEDIATE_CONF_ENV += CXXFLAGS_FOR_TARGET=-g -O2
+endif
+else
+   # Defaults are -g -Os from config/mt-ospace
+   HOST_GCC_INTERMEDIATE_CONF_ENV += CFLAGS_FOR_TARGET=-g -Os
+   HOST_GCC_INTERMEDIATE_CONF_ENV += CXXFLAGS_FOR_TARGET=-g -Os
+endif
+
  $(eval $(host-autotools-package))
diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
index 5b60bc3..c6f6e41 100644
--- a/package/gcc/gcc.mk
+++ b/package/gcc/gcc.mk
@@ -107,16 +107,6 @@ HOST_GCC_COMMON_CONF_OPT = \
  HOST_GCC_COMMON_CONF_ENV = \
MAKEINFO=missing

-# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43810
-# Workaround until it's fixed in 4.5.4 or later
-ifeq ($(ARCH),powerpc)
-ifeq ($(findstring x4.5.,x$(GCC_VERSION)),x4.5.)
-HOST_GCC_COMMON_CONF_OPT += --disable-target-optspace
-endif
-else
-HOST_GCC_COMMON_CONF_OPT += --enable-target-optspace
-endif
-
  # gcc 4.6.x quadmath requires wchar
  ifneq ($(BR2_TOOLCHAIN_BUILDROOT_WCHAR),y)
  HOST_GCC_COMMON_CONF_OPT += --disable-libquadmath



___
uClibc mailing list
uClibc@uclibc.org
http://lists.busybox.net/mailman/listinfo/uclibc


Re: [PATCH] gcc: explicitly use CFLAGS_FOR_TARGET instead of --enable-target-optspace

2014-07-14 Thread Alexey Brodkin
Hi Carmelo,


On Mon, 2014-07-14 at 15:47 +0200, Carmelo Amoroso wrote:
 Hello Alexey,
 I guess you sent it to the wrong list.
 
 You need to send to buildroot team.
 
 Regards,
 Carmelo

Ooops my bad.
Re-sent to buildroot list.

Thanks for pointing at it.

Regards,
Alexey
___
uClibc mailing list
uClibc@uclibc.org
http://lists.busybox.net/mailman/listinfo/uclibc


[PATCH] gcc: explicitly use CFLAGS_FOR_TARGET instead of --enable-target-optspace

2014-07-11 Thread Alexey Brodkin
Due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id= it's impossible
to specify custom CFLAGS_FOR_TARGET, it is always gets overriden with values
from config/mt-ospace:
===
 CFLAGS_FOR_TARGET = -g -Os
 CXXFLAGS_FOR_TARGET = -g -Os
===

But in some situations it's required to pass custom flags on buildong of libgcc:
 * Default flags -g -Os lead to build isses as with PowerPC on gcc 4.5
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43810)
 * Particular CPU requires specific instructions for HW support
 * Deep optimizations

Tested by toolchain building for ARC, ARM and PowerPC with GCC 4.5

Signed-off-by: Alexey Brodkin abrod...@synopsys.com

Cc: Anton Kolesov akole...@synopsys.com
Cc: Thomas Petazzoni thomas.petazz...@free-electrons.com
Cc: Peter Korsgaard pe...@korsgaard.com
Cc: Gustavo Zacarias gust...@zacarias.com.ar
---
 package/gcc/gcc-intermediate/gcc-intermediate.mk | 13 +
 package/gcc/gcc.mk   | 10 --
 2 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/package/gcc/gcc-intermediate/gcc-intermediate.mk 
b/package/gcc/gcc-intermediate/gcc-intermediate.mk
index db84d18..0543574 100644
--- a/package/gcc/gcc-intermediate/gcc-intermediate.mk
+++ b/package/gcc/gcc-intermediate/gcc-intermediate.mk
@@ -46,4 +46,17 @@ ifeq ($(BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE),y)
 HOST_GCC_INTERMEDIATE_INSTALL_OPT += install-target-libgcc
 endif
 
+ifeq ($(ARCH),powerpc)
+ifeq ($(findstring x4.5.,x$(GCC_VERSION)),x4.5.)
+   # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43810
+   # Workaround until it's fixed in 4.5.4 or later
+   HOST_GCC_INTERMEDIATE_CONF_ENV += CFLAGS_FOR_TARGET=-g -O2
+   HOST_GCC_INTERMEDIATE_CONF_ENV += CXXFLAGS_FOR_TARGET=-g -O2
+endif
+else
+   # Defaults are -g -Os from config/mt-ospace
+   HOST_GCC_INTERMEDIATE_CONF_ENV += CFLAGS_FOR_TARGET=-g -Os
+   HOST_GCC_INTERMEDIATE_CONF_ENV += CXXFLAGS_FOR_TARGET=-g -Os
+endif
+
 $(eval $(host-autotools-package))
diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
index 5b60bc3..c6f6e41 100644
--- a/package/gcc/gcc.mk
+++ b/package/gcc/gcc.mk
@@ -107,16 +107,6 @@ HOST_GCC_COMMON_CONF_OPT = \
 HOST_GCC_COMMON_CONF_ENV = \
MAKEINFO=missing
 
-# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43810
-# Workaround until it's fixed in 4.5.4 or later
-ifeq ($(ARCH),powerpc)
-ifeq ($(findstring x4.5.,x$(GCC_VERSION)),x4.5.)
-HOST_GCC_COMMON_CONF_OPT += --disable-target-optspace
-endif
-else
-HOST_GCC_COMMON_CONF_OPT += --enable-target-optspace
-endif
-
 # gcc 4.6.x quadmath requires wchar
 ifneq ($(BR2_TOOLCHAIN_BUILDROOT_WCHAR),y)
 HOST_GCC_COMMON_CONF_OPT += --disable-libquadmath
-- 
1.9.3

___
uClibc mailing list
uClibc@uclibc.org
http://lists.busybox.net/mailman/listinfo/uclibc