Skip to contentSkip to conversation

eglibc: Fix build when OPTION_EGLIBC_NSSWITCH is not set.

PATCH In review Khem Raj 2 participants 2 messages Nov 28, 2011 – Nov 30, 2011

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 eglibc: Fix build when OPTION_EGLIBC_NSSWITCH is not set.

Few of build problems are being reported on classic OE when OPTION_EGLIBC_NSSWITCH is set to 'n' by default it works well. But when its set to 'n' then we have to make sure that OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG and OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS are set to point to abosolute paths in sources

Fixes build errors like

Makefile:85: *** OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG variable left unset. Stop.

---
 recipes/eglibc/eglibc-options.inc |    6 +++++-
 recipes/eglibc/eglibc.inc         |    4 ++--
 2 files changed, 7 insertions(+), 3 deletions(-)
recipes/eglibc/eglibc-options.inc +5 -1
index 0af0aab..c3ba5e3 100644
@@ -4,7 +4,11 @@ def eglibc_cfg(feature, features, tokens, cnf ):
 	if type(features) == type([]) and feature in features:
 		cnf.extend([token + ' = y' for token in tokens])
 	else:
-		cnf.extend([token + ' = n' for token in tokens])
+		for token in tokens:
+			cnf.extend([token + ' = n'])
+			if token == 'OPTION_EGLIBC_NSSWITCH':
+				cnf.extend(["OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG = ${S}/nss/nsswitch.conf"])
+				cnf.extend(["OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS = ${S}/nss/fixed-nsswitch.functions"])
 
 # Map distro features to eglibc options settings
 def features_to_eglibc_settings(d):
recipes/eglibc/eglibc.inc +2 -2
index f0cfca8..23c3763 100644
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.eglibc.org/home"
 SECTION = "libs"
 PRIORITY = "required"
 LICENSE = "LGPL"
-INC_PR = "r21"
+INC_PR = "r22"
 # nptl needs unwind support in gcc, which can't be built without glibc.
 DEPENDS = "virtual/${TARGET_PREFIX}gcc-intermediate linux-libc-headers"
 #this leads to circular deps, so lets not add it yet
@@ -42,7 +42,7 @@ do_move_ports() {
 	    mv ${WORKDIR}/${EGLIBC_BRANCH}/ports ${S}/
 	fi
 }
-OE_FEATURES := "${@features_to_eglibc_settings(d)}"
+OE_FEATURES = "${@features_to_eglibc_settings(d)}"
 do_configure_prepend() {
 	echo '${OE_FEATURES}' > ${B}/option-groups.config
 }
Signature · 1 line
1.7.0.4
#1 lore raw
Quoted 7 lines · Khem Raj

Few of build problems are being reported on classic OE when OPTION_EGLIBC_NSSWITCH is set to 'n' by default it works well. But when its set to 'n' then we have to make sure that OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG and OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS are set to point to abosolute paths in sources

Quoted 6 lines

Fixes build errors like

Makefile:85: *** OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG variable left unset.  Stop.

After confirming oe-core has this fix already, applied, thanks.

Signature · 1 line
Tom