All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bitbake.conf, module.bbclass: Support opting out of legacy EXTRA_OEMAKE
@ 2015-11-05 14:47 Mike Crowe
  2015-11-05 16:23 ` Khem Raj
  2015-11-06  9:16 ` Andre McCurdy
  0 siblings, 2 replies; 11+ messages in thread
From: Mike Crowe @ 2015-11-05 14:47 UTC (permalink / raw)
  To: openembedded-core; +Cc: Mike Crowe

Give recipes and classes the ability to opt out of EXTRA_OEMAKE
containing the legacy value without removing other recipe-specific or
local additions.

The default value of EXTRA_OEMAKE="-e MAKEFLAGS=" is unfortunate. It
causes breakage and unintended behaviour in various recipes.

It is particularly toxic when variables are passed on the command line
to make since they then don't survive calling into a submake.

In particular this breaks building modules when LD=gold since the
overridden LD=${KERNEL_LD} is lost by the time the kernel's Makefile is
invoked.

This solution isn't pretty either, but it may be a good small first step
towards a future utopia where EXTRA_OEMAKE needn't contain "-e
MAKEFLAGS=" by default at all.

Signed-off-by: Mike Crowe <mac@mcrowe.com>
Acked-by: Phil Blundell <pb@pbcl.net>
---
 meta/classes/module.bbclass | 4 ++++
 meta/conf/bitbake.conf      | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/meta/classes/module.bbclass b/meta/classes/module.bbclass
index 0952c0c..4913aac 100644
--- a/meta/classes/module.bbclass
+++ b/meta/classes/module.bbclass
@@ -4,6 +4,10 @@ addtask make_scripts after do_patch before do_compile
 do_make_scripts[lockfiles] = "${TMPDIR}/kernel-scripts.lock"
 do_make_scripts[depends] += "virtual/kernel:do_shared_workdir"
 
+# -e MAKEFLAGS= is toxic when building modules since it will cause
+# none of the variables passed to make on the command line to make it
+# through to submakes.
+EXTRA_OEMAKE_LEGACY = ""
 EXTRA_OEMAKE += "KERNEL_SRC=${STAGING_KERNEL_DIR}"
 
 module_do_compile() {
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 06971da..93ab02a 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -477,7 +477,8 @@ export BUILD_STRIP = "${BUILD_PREFIX}strip"
 export BUILD_NM = "${BUILD_PREFIX}nm"
 
 export MAKE = "make"
-EXTRA_OEMAKE = "-e MAKEFLAGS="
+EXTRA_OEMAKE_LEGACY = "-e MAKEFLAGS="
+EXTRA_OEMAKE = "${EXTRA_OEMAKE_LEGACY}"
 EXTRA_OECONF = ""
 export LC_ALL = "C"
 
-- 
2.1.4



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

end of thread, other threads:[~2015-11-12 20:21 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-05 14:47 [PATCH] bitbake.conf, module.bbclass: Support opting out of legacy EXTRA_OEMAKE Mike Crowe
2015-11-05 16:23 ` Khem Raj
2015-11-05 16:27   ` Christopher Larson
2015-11-05 17:56     ` Khem Raj
2015-11-06  9:16 ` Andre McCurdy
2015-11-06 10:30   ` Mike Crowe
2015-11-06 13:18     ` Martin Jansa
2015-11-06 14:59       ` Christopher Larson
2015-11-06 16:28         ` Martin Jansa
2015-11-12 12:10     ` Mike Crowe
2015-11-12 20:21       ` Andre McCurdy

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.