Patchwork [1/1] eglibc: check for required distro features

login
register
mail settings
Submitter Qi.Chen@windriver.com
Date July 3, 2014, 3:23 a.m.
Message ID <40ebe9e8e227d169dc7b03ff14b1a83b55e4f186.1404351610.git.Qi.Chen@windriver.com>
Download mbox | patch
Permalink /patch/74867/
State New
Headers show

Comments

Qi.Chen@windriver.com - July 3, 2014, 3:23 a.m.
If users accidently override the DISTRO_FEATURES in local.conf,
then build failures occur for lack of libc functions.

All features in DISTRO_FEATURES_LIBC should be in DISTRO_FEATURES.
That's why this patch let the recipe inherit distro_features_check
class and set REQUIRED_DISTRO_FEATURES to "${DISTRO_FEATURES_LIBC}".

[YOCTO #6381]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/recipes-core/eglibc/eglibc.inc |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Patch

diff --git a/meta/recipes-core/eglibc/eglibc.inc b/meta/recipes-core/eglibc/eglibc.inc
index 68128e9..af7f6ad 100644
--- a/meta/recipes-core/eglibc/eglibc.inc
+++ b/meta/recipes-core/eglibc/eglibc.inc
@@ -38,9 +38,14 @@  DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial libgcc-initial linux-libc-headers
 #RDEPENDS_${PN} += "${@['','libgcc']['nptl' in '${GLIBC_ADDONS}']}"
 PROVIDES = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"
 PROVIDES += "virtual/libintl virtual/libiconv"
-inherit autotools texinfo
+inherit autotools texinfo distro_features_check
 require eglibc-options.inc
 
+# The main purpose of setting this variable is to prevent users from accidently
+# overriding DISTRO_FEATRUES, causing obscure build failures because of lack
+# of libc functions.
+REQUIRED_DISTRO_FEATURES = "${DISTRO_FEATURES_LIBC}"
+
 LEAD_SONAME = "libc.so"
 
 CACHED_CONFIGUREVARS += " \