[Buildroot] [PATCH v2] gcc: explicitly use C{XX}FLAGS_FOR_TARGET instead of --enable-target-optspace

Alexey Brodkin Alexey.Brodkin at synopsys.com
Mon Sep 1 06:01:16 UTC 2014


Hi Thomas,

On Fri, 2014-08-29 at 19:02 +0200, Thomas Petazzoni wrote:
> Dear Alexey Brodkin,
> 
> On Thu, 28 Aug 2014 16:59:18 +0400, Alexey Brodkin wrote:
> 
> > @@ -111,12 +111,15 @@ HOST_GCC_COMMON_CONF_ENV = \
> >  # 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
> > +TARGET_CFLAGS := $(subst -Os,,$(TARGET_CFLAGS))
> > +TARGET_CXXFLAGS := $(subst -Os,,$(TARGET_CXXFLAGS))
> 
> No. Remember that the namespace of variables is global in Buildroot. A
> given package is clearly *not* allowed to change global variables such
> as TARGET_CFLAGS and TARGET_CXXFLAGS. If you want to remove -Os just
> for gcc, you should do:

Hm, I was under impression that variables are visible only within
"package/name" and according to hierarchy.

Now it's clear they are all global - will keep it in mind then.

Already smoke-testing v3 and will send it to the list shortly.

-Alexey



More information about the buildroot mailing list