diff options
Diffstat (limited to 'meta/recipes-core/uclibc')
-rw-r--r-- | meta/recipes-core/uclibc/uclibc-config.inc | 16 | ||||
-rw-r--r-- | meta/recipes-core/uclibc/uclibc.inc | 10 |
2 files changed, 13 insertions, 13 deletions
diff --git a/meta/recipes-core/uclibc/uclibc-config.inc b/meta/recipes-core/uclibc/uclibc-config.inc index 697164c008..a30188d209 100644 --- a/meta/recipes-core/uclibc/uclibc-config.inc +++ b/meta/recipes-core/uclibc/uclibc-config.inc @@ -35,7 +35,7 @@ def map_uclibc_arch(a, d): """Return the uClibc architecture for the given TARGET_ARCH.""" import re - valid_archs = bb.data.getVar('valid_archs', d, 1).split() + valid_archs = d.getVar('valid_archs', 1).split() if re.match('^(arm|sa110).*', a): return 'arm' elif re.match('^(i.86|athlon)$', a): return 'i386' @@ -50,14 +50,14 @@ def map_uclibc_arch(a, d): else: bb.error("cannot map '%s' to a uClibc architecture" % a) -export UCLIBC_ARCH = "${@map_uclibc_arch(bb.data.getVar('TARGET_ARCH', d, 1), d)}" +export UCLIBC_ARCH = "${@map_uclibc_arch(d.getVar('TARGET_ARCH', 1), d)}" def map_uclibc_abi(o, d): """Return the uClibc ABI for the given TARGET_OS.""" import re - arch = bb.data.getVar('TARGET_ARCH', d, 1) - if map_uclibc_arch(bb.data.getVar('TARGET_ARCH', d, 1), d) == "arm": + arch = d.getVar('TARGET_ARCH', 1) + if map_uclibc_arch(d.getVar('TARGET_ARCH', 1), d) == "arm": if re.match('.*eabi$', o): return 'ARM_EABI' else: return 'ARM_OABI' # FIXME: This is inaccurate! Handle o32, n32, n64 @@ -65,7 +65,7 @@ def map_uclibc_abi(o, d): elif re.match('^mips.*', arch): return 'MIPS_O32_ABI' return "" -export UCLIBC_ABI = "${@map_uclibc_abi(bb.data.getVar('TARGET_OS', d, 1), d)}" +export UCLIBC_ABI = "${@map_uclibc_abi(d.getVar('TARGET_OS', 1), d)}" def map_uclibc_endian(a, d): """Return the uClibc endianess for the given TARGET_ARCH.""" @@ -79,7 +79,7 @@ def map_uclibc_endian(a, d): return 'BIG' return 'LITTLE' -export UCLIBC_ENDIAN = "${@map_uclibc_endian(bb.data.getVar('TARGET_ARCH', d, 1), d)}" +export UCLIBC_ENDIAN = "${@map_uclibc_endian(d.getVar('TARGET_ARCH', 1), d)}" # internal helper def uclibc_cfg(feature, features, tokens, cnf, rem): @@ -94,8 +94,8 @@ def uclibc_cfg(feature, features, tokens, cnf, rem): # Map distro and machine features to config settings def features_to_uclibc_settings(d): cnf, rem = ([], []) - distro_features = bb.data.getVar('DISTRO_FEATURES', d, True).split() - machine_features = bb.data.getVar('MACHINE_FEATURES', d, True).split() + distro_features = d.getVar('DISTRO_FEATURES', True).split() + machine_features = d.getVar('MACHINE_FEATURES', True).split() uclibc_cfg('ipv4', distro_features, 'UCLIBC_HAS_IPV4', cnf, rem) uclibc_cfg('ipv6', distro_features, 'UCLIBC_HAS_IPV6', cnf, rem) uclibc_cfg('largefile', distro_features, 'UCLIBC_HAS_LFS', cnf, rem) diff --git a/meta/recipes-core/uclibc/uclibc.inc b/meta/recipes-core/uclibc/uclibc.inc index 222c34f383..8438f25450 100644 --- a/meta/recipes-core/uclibc/uclibc.inc +++ b/meta/recipes-core/uclibc/uclibc.inc @@ -125,9 +125,9 @@ configmangle = '/^KERNEL_HEADERS/d; \ /^SHARED_LIB_LOADER_PREFIX/d; \ /^UCLIBC_EXTRA_CFLAGS/d; \ s,.*UCLIBC_HAS_WCHAR.*,UCLIBC_HAS_WCHAR=y,g; \ - ${@["","s,.*COMPILE_IN_THUMB_MODE.*,COMPILE_IN_THUMB_MODE=y,;"][bb.data.getVar("ARM_INSTRUCTION_SET", d, 1) != "arm"]} \ - ${@["","s,.*UCLIBC_HAS_LOCALE.*,UCLIBC_HAS_LOCALE=y,;"][bb.data.getVar("USE_NLS", d, 1) == "yes"]} \ - ${@["","s,.*LDSO_GNU_HASH_SUPPORT.*,# LDSO_GNU_HASH_SUPPORT is not set,;"][bb.data.getVar("TARGET_ARCH", d, 1) in ['mips', 'mipsel', 'mips64', 'mips64el', 'avr32']]} \ + ${@["","s,.*COMPILE_IN_THUMB_MODE.*,COMPILE_IN_THUMB_MODE=y,;"][d.getVar("ARM_INSTRUCTION_SET", 1) != "arm"]} \ + ${@["","s,.*UCLIBC_HAS_LOCALE.*,UCLIBC_HAS_LOCALE=y,;"][d.getVar("USE_NLS", 1) == "yes"]} \ + ${@["","s,.*LDSO_GNU_HASH_SUPPORT.*,# LDSO_GNU_HASH_SUPPORT is not set,;"][d.getVar("TARGET_ARCH", 1) in ['mips', 'mipsel', 'mips64', 'mips64el', 'avr32']]} \ /^CROSS/d; \ /^TARGET_ARCH=/d; \ /^TARGET_/s,^\([^=]*\).*,# \1 is not set,g; \ @@ -139,7 +139,7 @@ OE_FEATURES := "${@features_to_uclibc_conf(d)}" OE_DEL := "${@features_to_uclibc_del(d)}" python () { if "${OE_DEL}": - bb.data.setVar('configmangle_append', "${OE_DEL}" + "\n", d) + d.setVar('configmangle_append', "${OE_DEL}" + "\n") if "${OE_FEATURES}": bb.data.setVar('configmangle_append', "/^### DISTRO FEATURES$/a\\\n%s\n\n" % @@ -161,7 +161,7 @@ python () { ("${UCLIBC_ARCH}", "${UCLIBC_ARCH}"), d) bb.data.setVar('configmangle_append', - "/^### FPU$/a\\\n%s\n\n" % (["UCLIBC_HAS_FPU=y","# UCLIBC_HAS_FPU is not set"][bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]]), d) + "/^### FPU$/a\\\n%s\n\n" % (["UCLIBC_HAS_FPU=y","# UCLIBC_HAS_FPU is not set"][d.getVar('TARGET_FPU', 1) in [ 'soft' ]]), d) if "${UCLIBC_ENDIAN}": bb.data.setVar('configmangle_append', "/^### ABI$/a\\\nARCH_WANTS_%s_ENDIAN=y\n\n" % ("${UCLIBC_ENDIAN}"), |