All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bitbake.conf: Stop exporting TARGET_ flags variables
@ 2019-06-25 13:16 Mike Crowe
  2019-06-30 22:00 ` Richard Purdie
  0 siblings, 1 reply; 4+ messages in thread
From: Mike Crowe @ 2019-06-25 13:16 UTC (permalink / raw)
  To: openembedded-core; +Cc: Mike Crowe

Way back in
http://lists.openembedded.org/pipermail/openembedded-core/2014-April/210138.html
a few of us discussed not exporting TARGET_LDFLAGS. There seemed to be
support for this idea, and I modified our tree to not do so. I then seem to
have dropped the ball. :( We've been running like that for over five years,
and not observed any problems.

It seems sensible to stop exporting TARGET_CPPFLAGS, TARGET_CFLAGS and
TARGET_CXXFLAGS too.

I've successfully compile-tested core-image-minimal and core-image-sato for
x86_64 and qemuarm64 with these changes.

Signed-off-by: Mike Crowe <mac@mcrowe.com>
---
 meta/conf/bitbake.conf | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 4b907d6820..5e93f5c223 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -569,17 +569,17 @@ PATCHRESOLVE = "noop"
 export BUILD_CPPFLAGS = "-isystem${STAGING_INCDIR_NATIVE}"
 BUILDSDK_CPPFLAGS = ""
 export CPPFLAGS = "${TARGET_CPPFLAGS}"
-export TARGET_CPPFLAGS = ""
+TARGET_CPPFLAGS = ""
 
 export BUILD_CFLAGS = "${BUILD_CPPFLAGS} ${BUILD_OPTIMIZATION}"
 BUILDSDK_CFLAGS = "${BUILDSDK_CPPFLAGS} ${BUILD_OPTIMIZATION} ${DEBUG_PREFIX_MAP}"
 export CFLAGS = "${TARGET_CFLAGS}"
-export TARGET_CFLAGS = "${TARGET_CPPFLAGS} ${SELECTED_OPTIMIZATION}"
+TARGET_CFLAGS = "${TARGET_CPPFLAGS} ${SELECTED_OPTIMIZATION}"
 
 export BUILD_CXXFLAGS = "${BUILD_CFLAGS}"
 BUILDSDK_CXXFLAGS = "${BUILDSDK_CFLAGS}"
 export CXXFLAGS = "${TARGET_CXXFLAGS}"
-export TARGET_CXXFLAGS = "${TARGET_CFLAGS}"
+TARGET_CXXFLAGS = "${TARGET_CFLAGS}"
 
 export BUILD_LDFLAGS = "-L${STAGING_LIBDIR_NATIVE} \
                         -L${STAGING_BASE_LIBDIR_NATIVE} \
@@ -601,7 +601,7 @@ TARGET_LINK_HASH_STYLE ?= "${@['-Wl,--hash-style=gnu',''][d.getVar('LINKER_HASH_
 ASNEEDED ?= "-Wl,--as-needed"
 
 export LDFLAGS = "${TARGET_LDFLAGS}"
-export TARGET_LDFLAGS = "-Wl,-O1 ${TARGET_LINK_HASH_STYLE} ${ASNEEDED}"
+TARGET_LDFLAGS = "-Wl,-O1 ${TARGET_LINK_HASH_STYLE} ${ASNEEDED}"
 
 # Pass parallel make options to the compile task
 EXTRA_OEMAKE_prepend_task-compile = "${PARALLEL_MAKE} "
-- 
2.20.1



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

* Re: [PATCH] bitbake.conf: Stop exporting TARGET_ flags variables
  2019-06-25 13:16 [PATCH] bitbake.conf: Stop exporting TARGET_ flags variables Mike Crowe
@ 2019-06-30 22:00 ` Richard Purdie
  2019-07-01 19:23   ` Andre McCurdy
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Purdie @ 2019-06-30 22:00 UTC (permalink / raw)
  To: Mike Crowe, openembedded-core

On Tue, 2019-06-25 at 14:16 +0100, Mike Crowe wrote:
> Way back in
> http://lists.openembedded.org/pipermail/openembedded-core/2014-April/210138.html
> a few of us discussed not exporting TARGET_LDFLAGS. There seemed to be
> support for this idea, and I modified our tree to not do so. I then seem to
> have dropped the ball. :( We've been running like that for over five years,
> and not observed any problems.
> 
> It seems sensible to stop exporting TARGET_CPPFLAGS, TARGET_CFLAGS and
> TARGET_CXXFLAGS too.
> 
> I've successfully compile-tested core-image-minimal and core-image-sato for
> x86_64 and qemuarm64 with these changes.

FWIW I'm really happy to see this!

Cheers,

Richard



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

* Re: [PATCH] bitbake.conf: Stop exporting TARGET_ flags variables
  2019-06-30 22:00 ` Richard Purdie
@ 2019-07-01 19:23   ` Andre McCurdy
  2019-07-02  9:45     ` richard.purdie
  0 siblings, 1 reply; 4+ messages in thread
From: Andre McCurdy @ 2019-07-01 19:23 UTC (permalink / raw)
  To: Richard Purdie; +Cc: Mike Crowe, OE Core mailing list

On Sun, Jun 30, 2019 at 3:00 PM Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>
> On Tue, 2019-06-25 at 14:16 +0100, Mike Crowe wrote:
> > Way back in
> > http://lists.openembedded.org/pipermail/openembedded-core/2014-April/210138.html
> > a few of us discussed not exporting TARGET_LDFLAGS. There seemed to be
> > support for this idea, and I modified our tree to not do so. I then seem to
> > have dropped the ball. :( We've been running like that for over five years,
> > and not observed any problems.
> >
> > It seems sensible to stop exporting TARGET_CPPFLAGS, TARGET_CFLAGS and
> > TARGET_CXXFLAGS too.
> >
> > I've successfully compile-tested core-image-minimal and core-image-sato for
> > x86_64 and qemuarm64 with these changes.
>
> FWIW I'm really happy to see this!

Yes, good too see this. Does it mean we're also now ready to address
(e.g. remove or poison?) these variables for -native and -nativesdk as
well? Or is that still considered too risky?


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

* Re: [PATCH] bitbake.conf: Stop exporting TARGET_ flags variables
  2019-07-01 19:23   ` Andre McCurdy
@ 2019-07-02  9:45     ` richard.purdie
  0 siblings, 0 replies; 4+ messages in thread
From: richard.purdie @ 2019-07-02  9:45 UTC (permalink / raw)
  To: Andre McCurdy; +Cc: Mike Crowe, OE Core mailing list

On Mon, 2019-07-01 at 12:23 -0700, Andre McCurdy wrote:
> On Sun, Jun 30, 2019 at 3:00 PM Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> > On Tue, 2019-06-25 at 14:16 +0100, Mike Crowe wrote:
> > > Way back in
> > > http://lists.openembedded.org/pipermail/openembedded-core/2014-April/210138.html
> > > a few of us discussed not exporting TARGET_LDFLAGS. There seemed
> > > to be
> > > support for this idea, and I modified our tree to not do so. I
> > > then seem to
> > > have dropped the ball. :( We've been running like that for over
> > > five years,
> > > and not observed any problems.
> > > 
> > > It seems sensible to stop exporting TARGET_CPPFLAGS,
> > > TARGET_CFLAGS and
> > > TARGET_CXXFLAGS too.
> > > 
> > > I've successfully compile-tested core-image-minimal and core-
> > > image-sato for
> > > x86_64 and qemuarm64 with these changes.
> > 
> > FWIW I'm really happy to see this!
> 
> Yes, good too see this. Does it mean we're also now ready to address
> (e.g. remove or poison?) these variables for -native and -nativesdk
> as well? Or is that still considered too risky?

Initially I thought you meant they were being exported and they're not.

There aren't many references to TARGET_CFLAGS in recipes, it wouldn't
be hard to clean up the remaining references (the cross recipe
references are needed and can stay), then we could look at deleting
them in those classes...

If we don't do it now it may be worth a bug so we remember.

Cheers,

Richard



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

end of thread, other threads:[~2019-07-02  9:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-25 13:16 [PATCH] bitbake.conf: Stop exporting TARGET_ flags variables Mike Crowe
2019-06-30 22:00 ` Richard Purdie
2019-07-01 19:23   ` Andre McCurdy
2019-07-02  9:45     ` richard.purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.