eglibc: Fix build when OPTION_EGLIBC_NSSWITCH is not set.
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
@@ -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
@@ -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
Quoted 7 lines · Khem Raj
Few of build problems are being reported on classic OE when
OPTION_EGLIBC_NSSWITCHis set to 'n' by default it works well. But when its set to 'n' then we have to make sure thatOPTION_EGLIBC_NSSWITCH_FIXED_CONFIGandOPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONSare set to point to abosolute paths in sources
Quoted 6 lines
Fixes build errors like
Makefile:85: ***
OPTION_EGLIBC_NSSWITCH_FIXED_CONFIGvariable left unset. Stop.Signed-off-by Khem Raj <[email protected]>
After confirming oe-core has this fix already, applied, thanks.
Signature · 1 line
Tom