Modify ldd script for multilib.
cover Modify ldd script for multilib.
This is part of the BUG #1236 fixing. Current there seems no way to get the dynamic loader(ld.so) names for all the ABIs configured in the multilib configuration during runtime. So we put the ld.so names in the dictionary "ld_info_all" in the file eglibc-ld.inc. This dictionary is indexed by the TUNENAME. To support a new ABI, new entry should be added into this dictionary along with the new ABI's TUNENAME.
The information in ld_info_all can be used for both ldd script, and the KNOWN_INTERPRETER_NAMES in the file ldconfig.h (which has not been done yet).
The following changes since commit f94b781695cd8fa387daff16ecbf3987a0883018:
Bruce Ashfield (1):
poky.conf: explicitly referenced preferred linux-yocto version
are available in the git repository at:
git://git.pokylinux.org/poky-contrib llub/bug1236
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=llu/1236
Lianhao Lu (2):
utils.bbclass/multilib.conf: Added misc supporting functions.
eglibc: Modify ldd script according to multilib config.
meta/classes/utils.bbclass | 35 ++++++++++++++++++++ meta/conf/bitbake.conf | 1 + meta/conf/multilib.conf | 6 +++- meta/recipes-core/eglibc/eglibc-ld.inc | 53 +++++++++++++++++++++++++++++++ meta/recipes-core/eglibc/eglibc.inc | 1 + meta/recipes-core/eglibc/eglibc_2.13.bb | 6 +++- 6 files changed, 100 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-core/eglibc/eglibc-ld.inc
RFC 1/2 utils.bbclass/multilib.conf: Added misc supporting functions.
1. Added variable MULTILIB_VARIANTS to store all the instance variants for multilib extend.
2. Added function all_multilib_tune_values to collect the variable values for all multilib instance.
--- meta/classes/utils.bbclass | 35 +++++++++++++++++++++++++++++++++++ meta/conf/bitbake.conf | 1 + meta/conf/multilib.conf | 6 +++++- 3 files changed, 41 insertions(+), 1 deletions(-)
meta/classes/utils.bbclass +35 -0
@@ -341,3 +341,38 @@ def base_set_filespath(path, d): for o in overrides.split(":"): filespath.append(os.path.join(p, o)) return ":".join(filespath) + +def extend_variants(d, var, extend, delim=':'): + """Return a string of all bb class extend variants for the given extend""" + variants = [] + whole = d.getVar(var, True) or "" + for ext in whole.split(): + eext = ext.split(delim) + if len(eext) > 1 and eext[0] == extend: + variants.append(eext[1]) + return " ".join(variants) + +def all_multilib_tune_values(d, var, unique=True): + """Return a string of all ${var} in all multilib tune configuration""" + values = [] + value = d.getVar(var, True) or "" + if value != "": + values.append(value) + variants = d.getVar("MULTILIB_VARIANTS", True) or "" + for item in variants.split(): + localdata = bb.data.createCopy(d) + #Fix ME. OVERRIDES not work, we have to set DEFAULTTUNE to TUNENAME + #overrides = localdata.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item + #localdata.setVar("OVERRIDES", overrides) + if localdata.getVar("BBEXTENDVARIANT", True) == item: + tunename=localdata.getVar("TUNENAME", False) or "" + else: + tunename=localdata.getVar("TUNENAME_virtclass-multilib-" + item, False) or "" + if tunename != "": + localdata.setVar("DEFAULTTUNE", tunename) + value = localdata.getVar(var, True) or "" + if value != "": + values.append(value) + if unique: + values = set(values) + return " ".join(values)
meta/conf/bitbake.conf +1 -0
@@ -736,3 +736,4 @@ BB_HASHTASK_WHITELIST ?= "(.*-cross$|.*-native$|.*-cross-initial$|.*-cross-inter BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM USER FILESPATH USERNAME STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE" MLPREFIX ??= "" +MULTILIB_VARIANTS ??= ""
meta/conf/multilib.conf +5 -1
@@ -1,6 +1,11 @@ baselib = "${@d.getVar('BASE_LIB_tune-' + (d.getVar('DEFAULTTUNE', True) or 'INVALID'), True) or 'lib'}" +MULTILIB_VARIANTS = "${@extend_variants(d,'MULTILIBS','multilib')}" + +TUNENAME_virtclass-multilib-lib64 ?= "x86-64" +TUNENAME_virtclass-multilib-lib32 ?= "x86" + MULTILIBS ??= "multilib:lib32" BBCLASSEXTEND_append_pn-linux-libc-headers = " ${MULTILIBS}" BBCLASSEXTEND_append_pn-eglibc-initial = " ${MULTILIBS}"
@@ -21,4 +26,3 @@ BBCLASSEXTEND_append_pn-bash = " ${MULTILIBS}" BBCLASSEXTEND_append_pn-ncurses = " ${MULTILIBS}" BBCLASSEXTEND_append_pn-expat = " ${MULTILIBS}" BBCLASSEXTEND_append_pn-eglibc-locale = " ${MULTILIBS}" -
Signature · 1 line
1.7.0.4
RFC 2/2 eglibc: Modify ldd script according to multilib config.
Part fix of [BUGID #1236].
1. Collect all the values for RTLDLIST for the current multilib configuration to modify the ldd scripts.
2. Collect all the values for KNOWN_INTERPRETER_NAMES for the current multilib configuration.
--- meta/recipes-core/eglibc/eglibc-ld.inc | 53 +++++++++++++++++++++++++++++++ meta/recipes-core/eglibc/eglibc.inc | 1 + meta/recipes-core/eglibc/eglibc_2.13.bb | 6 +++- 3 files changed, 59 insertions(+), 1 deletions(-) create mode 100644 meta/recipes-core/eglibc/eglibc-ld.inc
meta/recipes-core/eglibc/eglibc-ld.inc new file +53 -0
@@ -0,0 +1,53 @@ +def ld_append_if_tune_exists(d, infos, dict): + tune = d.getVar("DEFAULTTUNE", True) or "" + libdir = d.getVar("base_libdir", True) or "" + if dict.has_key(tune): + infos['ldconfig'].add('{ "' + libdir + '/' + dict[tune][0] + '",' + dict[tune][1] + ' }') + infos['lddrewrite'].add(libdir+'/'+dict[tune][0]) + +def eglibc_dl_info(d): + ld_info_all = { + "mips": ["ld.so.1", "FLAG_ELF_LIBC6"], + "mips64-n32": ["ld.so.1", "FLAG_ELF_LIBC6"], + "mips64": ["ld.so.1", "FLAG_ELF_LIBC6"], + "mipsel": ["ld.so.1", "FLAG_ELF_LIBC6"], + "mips64el-n32": ["ld.so.1", "FLAG_ELF_LIBC6"], + "mips64el": ["ld.so.1", "FLAG_ELF_LIBC6"], + "mips-nf": ["ld.so.1", "FLAG_ELF_LIBC6"], + "mips64-nf-n32": ["ld.so.1", "FLAG_ELF_LIBC6"], + "mips64-nf": ["ld.so.1", "FLAG_ELF_LIBC6"], + "mips64el-nf-n32": ["ld.so.1", "FLAG_ELF_LIBC6"], + "mips64el-nf": ["ld.so.1", "FLAG_ELF_LIBC6"], + "powerpc": ["ld.so.1", "FLAG_ELF_LIBC6"], + "powerpc-nf": ["ld.so.1", "FLAG_ELF_LIBC6"], + "powerpc64": ["ld64.so.1", "FLAG_ELF_LIBC6"], + "powerpc64-nf": ["ld64.so.1", "FLAG_ELF_LIBC6"], + "core2": ["ld-linux.so.2", "FLAG_ELF_LIBC6"], + "core2-64": ["ld-linux-x86-64.so.2", "FLAG_ELF_LIBC6"], + "x86": ["ld-linux.so.2", "FLAG_ELF_LIBC5"], + "x86-64": ["ld-linux-x86-64.so.2", "FLAG_ELF_LIBC6"], + "i586": ["ld-linux.so.2", "FLAG_ELF_LIBC6"], + } + + infos = {'ldconfig':set(), 'lddrewrite':set()} + ld_append_if_tune_exists(d, infos, ld_info_all) + variants = d.getVar("MULTILIB_VARIANTS", True) or "" + for item in variants.split(): + localdata = bb.data.createCopy(d) + #Fix ME. OVERRIDES not work, we have to set DEFAULTTUNE to TUNENAME + #overrides = localdata.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item + #localdata.setVar("OVERRIDES", overrides) + if localdata.getVar("BBEXTENDVARIANT", True) == item: + tunename=localdata.getVar("TUNENAME", False) or "" + else: + tunename=localdata.getVar("TUNENAME_virtclass-multilib-" + item, False) or "" + if tunename != "": + localdata.setVar("DEFAULTTUNE", tunename) + ld_append_if_tune_exists(localdata, infos, ld_info_all) + + infos['ldconfig'] = ' '.join(infos['ldconfig']) + infos['lddrewrite'] = ' '.join(infos['lddrewrite']) + return infos + +ALL_KNOWN_INTERPRETER_NAMES = "${@eglibc_dl_info(d)['ldconfig']}" +RTLDLIST = "${@eglibc_dl_info(d)['lddrewrite']}"
meta/recipes-core/eglibc/eglibc.inc +1 -0
@@ -1,4 +1,5 @@ require eglibc-common.inc +require eglibc-ld.inc STAGINGCC = "gcc-cross-intermediate" STAGINGCC_virtclass-nativesdk = "gcc-crosssdk-intermediate"
meta/recipes-core/eglibc/eglibc_2.13.bb +5 -1
@@ -3,7 +3,7 @@ require eglibc.inc SRCREV = "14157" DEPENDS += "gperf-native" -PR = "r9" +PR = "r10" PR_append = "+svnr${SRCPV}" EGLIBC_BRANCH="eglibc-2_13"
@@ -199,6 +199,10 @@ do_compile () { rpcgen -h $r -o $h || oewarn "unable to generate header for $r" done ) + + echo "Adjust dynamic loader list to ${EGLIBC_DYNAMIC_LOADERS}" + [ -z "${RTLDLIST}" ] && return + sed -i ${B}/elf/ldd -e 's#^\(RTLDLIST=\).*$#\1"${RTLDLIST}"#' } require eglibc-package.inc
Signature · 1 line
1.7.0.4
Re: [RFC BUG #1236 2/2] eglibc: Modify ldd script according to multilib config.
meta/recipes-core/eglibc/eglibc-ld.inc line 27
Quoted 1 line · Lianhao Lu
meta/recipes-core/eglibc/eglibc-ld.inc new file +1
-0+ "x86": ["ld-linux.so.2", "FLAG_ELF_LIBC5"],
That looks a bit weird to me. Are you sure that's right?
p.
Re: [RFC BUG #1236 2/2] eglibc: Modify ldd script according to multilib config.
Quoted 10 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Phil Blundell
Sent: Friday, July 29, 2011 11:38 PM
To: Patches and discussions about the oe-core layer
Subject: Re: [OE-core] [RFC BUG #1236 2/2] eglibc: Modify ldd script according to multilib config.
Quoted 5 lines
meta/recipes-core/eglibc/eglibc-ld.inc line 27
Quoted 1 line · Lianhao Lu
meta/recipes-core/eglibc/eglibc-ld.inc new file +1
-0+ "x86": ["ld-linux.so.2", "FLAG_ELF_LIBC5"],That looks a bit weird to me. Are you sure that's right?
Oops, it should be FLAG_ELF_LIBC6.
-Lianhao
Re: [RFC BUG #1236 2/2] eglibc: Modify ldd script according to multilib config.
In reply to Lianhao LuQuoted 7 lines · Lianhao Lu
Part fix of [BUGID #1236].
1. Collect all the values for RTLDLIST for the current multilib configuration to modify the ldd scripts.
2. Collect all the values for
KNOWN_INTERPRETER_NAMESfor the current multilib configuration.
why is this needed ? eglibc build system has mechanism to emit correct ld.so names into RTLDLIST. If its missing something then it should be fixed in eglibc. This list will require to be maintained all the time weather you add a new architecture or ld.so is revved up
Quoted 21 lines
Signed-off-by Lianhao Lu <[email protected]>--- meta/recipes-core/eglibc/eglibc-ld.inc | 53 +++++++++++++++++++++++++++++++ meta/recipes-core/eglibc/eglibc.inc | 1 + meta/recipes-core/eglibc/eglibc_2.13.bb | 6 +++- 3 files changed, 59 insertions(+), 1 deletions(-) create mode 100644 meta/recipes-core/eglibc/eglibc-ld.inc(quoted diff) +0
-0b/meta/recipes-core/eglibc/eglibc-ld.inc new file mode 100644 index 0000000..ad60964
meta/recipes-core/eglibc/eglibc-ld.inc new file +5
-0@@ -0,0 +1,53 @@ +def ld_append_if_tune_exists(d, infos, dict): + tune = d.getVar("DEFAULTTUNE", True) or "" + libdir = d.getVar("base_libdir", True) or "" + if dict.has_key(tune): + infos['ldconfig'].add('{ "' + libdir + '/' + dict[tune][0] + '",' +
Quoted 1 line
dict[tune][1] + ' }') + infos['lddrewrite'].add(libdir+'/'+dict[tune]
[0])
Quoted 32 lines
meta/recipes-core/eglibc/eglibc-ld.inc new file +32
-0+ +def eglibc_dl_info(d): + ld_info_all = { + "mips": ["ld.so.1", "FLAG_ELF_LIBC6"], + "mips64-n32": ["ld.so.1", "FLAG_ELF_LIBC6"], + "mips64": ["ld.so.1", "FLAG_ELF_LIBC6"], + "mipsel": ["ld.so.1", "FLAG_ELF_LIBC6"], + "mips64el-n32": ["ld.so.1", "FLAG_ELF_LIBC6"], + "mips64el": ["ld.so.1", "FLAG_ELF_LIBC6"], + "mips-nf": ["ld.so.1", "FLAG_ELF_LIBC6"], + "mips64-nf-n32": ["ld.so.1", "FLAG_ELF_LIBC6"], + "mips64-nf": ["ld.so.1", "FLAG_ELF_LIBC6"], + "mips64el-nf-n32": ["ld.so.1", "FLAG_ELF_LIBC6"], + "mips64el-nf": ["ld.so.1", "FLAG_ELF_LIBC6"], + "powerpc": ["ld.so.1", "FLAG_ELF_LIBC6"], + "powerpc-nf": ["ld.so.1", "FLAG_ELF_LIBC6"], + "powerpc64": ["ld64.so.1", "FLAG_ELF_LIBC6"], + "powerpc64-nf": ["ld64.so.1", "FLAG_ELF_LIBC6"], + "core2": ["ld-linux.so.2", "FLAG_ELF_LIBC6"], + "core2-64": ["ld-linux-x86-64.so.2", "FLAG_ELF_LIBC6"], + "x86": ["ld-linux.so.2", "FLAG_ELF_LIBC5"], + "x86-64": ["ld-linux-x86-64.so.2", "FLAG_ELF_LIBC6"], + "i586": ["ld-linux.so.2", "FLAG_ELF_LIBC6"], + } + + infos = {'ldconfig':set(), 'lddrewrite':set()} + ld_append_if_tune_exists(d, infos, ld_info_all) + variants = d.getVar("MULTILIB_VARIANTS", True) or "" + for item in variants.split(): + localdata = bb.data.createCopy(d) + #Fix ME. OVERRIDES not work, we have to set DEFAULTTUNE to TUNENAME + #overrides = localdata.getVar("OVERRIDES", False) +
Quoted 1 line
":virtclass-multilib-" + item + #localdata.setVar("OVERRIDES",
overrides)
meta/recipes-core/eglibc/eglibc-ld.inc
Quoted 4 lines
meta/recipes-core/eglibc/eglibc-ld.inc new file +4
-0+ if localdata.getVar("BBEXTENDVARIANT", True) == item: + tunename=localdata.getVar("TUNENAME", False) or "" + else: + tunename=localdata.getVar("TUNENAME_virtclass-multilib-" + item,
False)
Quoted 44 lines
or "" + if tunename != "":
meta/recipes-core/eglibc/eglibc-ld.inc new file +9
-0+ localdata.setVar("DEFAULTTUNE", tunename) + ld_append_if_tune_exists(localdata, infos, ld_info_all) + + infos['ldconfig'] = ' '.join(infos['ldconfig']) + infos['lddrewrite'] = ' '.join(infos['lddrewrite']) + return infos + +ALL_KNOWN_INTERPRETER_NAMES = "${@eglibc_dl_info(d)['ldconfig']}" +RTLDLIST = "${@eglibc_dl_info(d)['lddrewrite']}"(quoted diff) +0
-0b/meta/recipes-core/eglibc/eglibc.inc index 1b2e630..0ed4359 100644
meta/recipes-core/eglibc/eglibc.inc +1
-0@@ -1,4 +1,5 @@ require eglibc-common.inc +require eglibc-ld.inc STAGINGCC = "gcc-cross-intermediate" STAGINGCC_virtclass-nativesdk = "gcc-crosssdk-intermediate"(quoted diff) +0
-0b/meta/recipes-core/eglibc/eglibc_2.13.bb index 41fe7c7..b1bfbf1 100644
meta/recipes-core/eglibc/eglibc_2.13.bb +5
-1@@ -3,7 +3,7 @@ require eglibc.inc SRCREV = "14157" DEPENDS += "gperf-native" -PR = "r9" +PR = "r10" PR_append = "+svnr${SRCPV}" EGLIBC_BRANCH="eglibc-2_13"@@ -199,6 +199,10 @@ do_compile () { rpcgen -h $r -o $h || oewarn "unable to generate header for $r" done ) + + echo "Adjust dynamic loader list to ${EGLIBC_DYNAMIC_LOADERS}" + [ -z "${RTLDLIST}" ] && return + sed -i ${B}/elf/ldd -e 's#^\(RTLDLIST=\).*$#\1"${RTLDLIST}"#' } require eglibc-package.inc
Signature · 1 line
Khem Raj
Re: [RFC BUG #1236 2/2] eglibc: Modify ldd script according to multilib config.
Khem Raj wrote on 2011-07-31:
Quoted 6 lines · Lianhao Lu
Quoted 5 lines
Part fix of [BUGID #1236].
1. Collect all the values for RTLDLIST for the current multilib configuration to modify the ldd scripts.
Quoted 7 lines
Quoted 2 lines
2. Collect all the values for
KNOWN_INTERPRETER_NAMESfor the current multilib configuration.why is this needed ? eglibc build system has mechanism to emit
correct ld.so names into RTLDLIST. If its missing something then it should be fixed in eglibc. This list will require to be maintained all the time weather you add a
new architecture or ld.so is revved up
This is because we want the ldd/ldconfig in each eglibc can work on all the ABIs included in the current multilib configuration.
-Lianhao
Quoted 89 lines
Quoted 5 lines
Signed-off-by Lianhao Lu <[email protected]>--- meta/recipes-core/eglibc/eglibc-ld.inc | 53+++++++++++++++++++++++++++++++ meta/recipes-core/eglibc/eglibc.inc
|
Quoted 37 lines
1 +
meta/recipes-core/eglibc/eglibc_2.13.bb | 6 +++- 3 files changed, 59 insertions(+), 1 deletions(-) create mode100644 meta/recipes-core/eglibc/eglibc-ld.inc
(quoted diff) +0
-0b/meta/recipes-core/eglibc/eglibc-ld.inc new file mode 100644 index 0000000..ad60964 ---
/dev/null+++ b/meta/recipes-core/eglibc/eglibc-ld.inc @@ -0,0 +1,53 @@ +defld_append_if_tune_exists(d, infos, dict): + tune =d.getVar("DEFAULTTUNE", True)or "" + libdir = d.getVar("base_libdir",
True) or "" + ifdict.has_key(tune): + infos['ldconfig'].add('{ "' +
libdir + '/' + dict[tune][0] + '",' ++ dict[tune][1] + ' }')(quoted diff) +1
-0+ infos['lddrewrite'].add(libdir+'/'+dict[tune] [0]) + +def
eglibc_dl_info(d): +ld_info_all= { + "mips": ["ld.so.1",
"FLAG_ELF_LIBC6"], + "mips64-n32": ["ld.so.1", "FLAG_ELF_LIBC6"],(quoted diff) +1
-0+ "mips64": ["ld.so.1", "FLAG_ELF_LIBC6"], + "mipsel": ["ld.so.1","
FLAG_ELF_LIBC6"], + "mips64el-n32": ["ld.so.1", "FLAG_ELF_LIBC6"],(quoted diff) +1
-0+ "mips64el": ["ld.so.1", "FLAG_ELF_LIBC6"], + "mips-nf": ["ld.so.1","
FLAG_ELF_LIBC6"], + "mips64-nf-n32": ["ld.so.1", "FLAG_ELF_LIBC6"],(quoted diff) +1
-0+ "mips64-nf": ["ld.so.1", "FLAG_ELF_LIBC6"], + "mips64el-nf-n32":["ld.so.1", "
FLAG_ELF_LIBC6"], + "mips64el-nf": ["ld.so.1",
"FLAG_ELF_LIBC6"], + "powerpc": ["ld.so.1", "FLAG_ELF_LIBC6"],(quoted diff) +1
-0+ "powerpc-nf": ["ld.so.1", "FLAG_ELF_LIBC6"], + "powerpc64":["ld64.so.1", "
FLAG_ELF_LIBC6"], + "powerpc64-nf": ["ld64.so.1",
"FLAG_ELF_LIBC6"], + "core2": ["ld-linux.so.2", "FLAG_ELF_LIBC6"],(quoted diff) +1
-0+ "core2-64": ["ld-linux-x86-64.so.2", "FLAG_ELF_LIBC6"], + "x86":["ld-linux.so.2", "
FLAG_ELF_LIBC5"], + "x86-64":
["ld-linux-x86-64.so.2", "FLAG_ELF_LIBC6"], + "i586":
["ld-linux.so.2", "FLAG_ELF_LIBC6"], + } + + infos = {'ldconfig':set(),
'lddrewrite':set()} +ld_append_if_tune_exists(d, infos, ld_info_all)(quoted diff) +1
-0+ variants = d.getVar("MULTILIB_VARIANTS", True) or "" + for item in
variants.split(): + localdata =bb.data.createCopy(d)+ #Fix ME.
OVERRIDES not work, we have to set DEFAULTTUNE to TUNENAME(quoted diff) +1
-0+ #overrides = localdata.getVar("OVERRIDES", False) +":virtclass-multilib-" + item + #localdata.setVar("OVERRIDES",
overrides) + iflocaldata.getVar("BBEXTENDVARIANT", True)== item:Review
Quoted 2 lines
(quoted diff) +2
-0+ tunename=localdata.getVar("TUNENAME", False) or "" + else: + tunename=localdata.getVar("TUNENAME_virtclass-multilib-" +item,
False)Quoted 42 lines
or "" + if tunename != "":
meta/recipes-core/eglibc/eglibc-ld.inc new file +9
-0+ localdata.setVar("DEFAULTTUNE", tunename) + ld_append_if_tune_exists(localdata, infos, ld_info_all) + + infos['ldconfig'] = ' '.join(infos['ldconfig']) + infos['lddrewrite'] = ' '.join(infos['lddrewrite']) + return infos + +ALL_KNOWN_INTERPRETER_NAMES = "${@eglibc_dl_info(d)['ldconfig']}" +RTLDLIST = "${@eglibc_dl_info(d)['lddrewrite']}"(quoted diff) +0
-0b/meta/recipes-core/eglibc/eglibc.inc index 1b2e630..0ed4359 100644
meta/recipes-core/eglibc/eglibc.inc +1
-0@@ -1,4 +1,5 @@ require eglibc-common.inc +require eglibc-ld.inc STAGINGCC = "gcc-cross-intermediate" STAGINGCC_virtclass-nativesdk = "gcc-crosssdk-intermediate"(quoted diff) +0
-0b/meta/recipes-core/eglibc/eglibc_2.13.bb index 41fe7c7..b1bfbf1 100644
meta/recipes-core/eglibc/eglibc_2.13.bb +1
-1@@ -3,7 +3,7 @@ require eglibc.inc SRCREV = "14157" DEPENDS += "gperf-native" -PR = "r9" +PR = "r10" PR_append = "+svnr${SRCPV}" EGLIBC_BRANCH="eglibc-2_13" @@ -199,6 +199,10 @@ do_compile () {meta/recipes-core/eglibc/eglibc_2.13.bb +4
-0rpcgen -h $r -o $h || oewarn "unable to generate header for $r" done ) + + echo "Adjust dynamic loader list to ${EGLIBC_DYNAMIC_LOADERS}" + [ -z "${RTLDLIST}" ] && return + sed -i ${B}/elf/ldd -e 's#^\(RTLDLIST=\).*$#\1"${RTLDLIST}"#' }
Quoted 1 line
Quoted 1 line
require eglibc-package.inc
Best Regards,
Lianhao
Re: [RFC BUG #1236 2/2] eglibc: Modify ldd script according to multilib config.
Quoted 10 lines · Lianhao
Khem Raj wrote on 2011-07-31:
Quoted 9 lines · Lianhao Lu
Quoted 7 lines
Part fix of [BUGID #1236].
1. Collect all the values for RTLDLIST for the current multilib configuration to modify the ldd scripts.
2. Collect all the values for
KNOWN_INTERPRETER_NAMESfor the current multilib configuration.
Quoted 6 lines
Quoted 4 lines
why is this needed ? eglibc build system has mechanism to emit
correct ld.so names into RTLDLIST. If its missing something then it should be fixed in eglibc. This list will require to be maintained all the time weather you add a
new architecture or ld.so is revved upThis is because we want the ldd/ldconfig in each eglibc can work on all the ABIs included in the current multilib configuration.
Why not have the default multi lib only provide ldd ? Optional multilibs may not provide ldd Is there something that needs ldd/ldconfig to be present in each. Multilibs
Quoted 103 lines
-Lianhao
Quoted 89 lines
Quoted 5 lines
Signed-off-by Lianhao Lu <[email protected]>---
meta/recipes-core/eglibc/eglibc-ld.inc | 53
+++++++++++++++++++++++++++++++ meta/recipes-core/eglibc/eglibc.inc|
Quoted 37 lines
1 +
meta/recipes-core/eglibc/eglibc_2.13.bb | 6 +++-3 files changed, 59 insertions(+), 1 deletions(-) create mode100644 meta/recipes-core/eglibc/eglibc-ld.inc
(quoted diff) +0
-0b/meta/recipes-core/eglibc/eglibc-ld.inc new file mode 100644 index 0000000..ad60964 ---
/dev/null+++ b/meta/recipes-core/eglibc/eglibc-ld.inc @@ -0,0 +1,53 @@ +defld_append_if_tune_exists(d, infos, dict): + tune =d.getVar("DEFAULTTUNE", True)or "" + libdir = d.getVar("base_libdir",
True) or "" + ifdict.has_key(tune): + infos['ldconfig'].add('{ "' +
libdir + '/' + dict[tune][0] + '",' ++ dict[tune][1] + ' }')
+ infos['lddrewrite'].add(libdir+'/'+dict[tune] [0]) + +defeglibc_dl_info(d): +ld_info_all= { + "mips": ["ld.so.1",
"FLAG_ELF_LIBC6"], + "mips64-n32": ["ld.so.1", "FLAG_ELF_LIBC6"],
+ "mips64": ["ld.so.1", "FLAG_ELF_LIBC6"], + "mipsel": ["ld.so.1",
"FLAG_ELF_LIBC6"], + "mips64el-n32": ["ld.so.1", "FLAG_ELF_LIBC6"],
+ "mips64el": ["ld.so.1", "FLAG_ELF_LIBC6"], + "mips-nf": ["ld.so.1",
"FLAG_ELF_LIBC6"], + "mips64-nf-n32": ["ld.so.1", "FLAG_ELF_LIBC6"],
+ "mips64-nf": ["ld.so.1", "FLAG_ELF_LIBC6"], + "mips64el-nf-n32":
["ld.so.1", "FLAG_ELF_LIBC6"], + "mips64el-nf": ["ld.so.1",
"FLAG_ELF_LIBC6"], + "powerpc": ["ld.so.1", "FLAG_ELF_LIBC6"],
+ "powerpc-nf": ["ld.so.1", "FLAG_ELF_LIBC6"], + "powerpc64":
["ld64.so.1", "FLAG_ELF_LIBC6"], + "powerpc64-nf": ["ld64.so.1",
"FLAG_ELF_LIBC6"], + "core2": ["ld-linux.so.2", "FLAG_ELF_LIBC6"],
+ "core2-64": ["ld-linux-x86-64.so.2", "FLAG_ELF_LIBC6"], + "x86":
["ld-linux.so.2", "FLAG_ELF_LIBC5"], + "x86-64":
["ld-linux-x86-64.so.2", "FLAG_ELF_LIBC6"], + "i586":
["ld-linux.so.2", "FLAG_ELF_LIBC6"], + } + + infos = {'ldconfig':set(),
'lddrewrite':set()} +ld_append_if_tune_exists(d, infos, ld_info_all)
+ variants =d.getVar("MULTILIB_VARIANTS", True)or "" + for item invariants.split(): + localdata =bb.data.createCopy(d)+ #Fix ME.
OVERRIDES not work, we have to set DEFAULTTUNE to TUNENAME
+ #overrides =localdata.getVar("OVERRIDES", False)+
":virtclass-multilib-" + item + #localdata.setVar("OVERRIDES",
overrides) + iflocaldata.getVar("BBEXTENDVARIANT", True)== item:Review
Quoted 2 lines
(quoted diff) +2
-0+ tunename=localdata.getVar("TUNENAME", False) or "" + else: + tunename=localdata.getVar("TUNENAME_virtclass-multilib-" +item,
False)Quoted 42 lines
or "" + if tunename != "":
meta/recipes-core/eglibc/eglibc-ld.inc new file +9
-0+ localdata.setVar("DEFAULTTUNE", tunename) + ld_append_if_tune_exists(localdata, infos, ld_info_all) + + infos['ldconfig'] = ' '.join(infos['ldconfig']) + infos['lddrewrite'] = ' '.join(infos['lddrewrite']) + return infos + +ALL_KNOWN_INTERPRETER_NAMES = "${@eglibc_dl_info(d)['ldconfig']}" +RTLDLIST = "${@eglibc_dl_info(d)['lddrewrite']}"(quoted diff) +0
-0b/meta/recipes-core/eglibc/eglibc.inc index 1b2e630..0ed4359 100644
meta/recipes-core/eglibc/eglibc.inc +0
-0@@ -1,4 +1,5 @@require eglibc-common.inc
+require eglibc-ld.incSTAGINGCC = "gcc-cross-intermediate" STAGINGCC_virtclass-nativesdk = "gcc-crosssdk-intermediate"
(quoted diff) +0
-0b/meta/recipes-core/eglibc/eglibc_2.13.bb index 41fe7c7..b1bfbf1 100644
meta/recipes-core/eglibc/eglibc_2.13.bb +0
-0@@ -3,7 +3,7 @@ require eglibc.incSRCREV = "14157"
DEPENDS += "gperf-native"
meta/recipes-core/eglibc/eglibc_2.13.bb +1
-1-PR = "r9" +PR = "r10"
PR_append= "+svnr${SRCPV}"EGLIBC_BRANCH="eglibc-2_13" @@ -199,6 +199,10 @@ do_compile () { rpcgen -h $r -o $h || oewarn "unable to generate header for $r" done )meta/recipes-core/eglibc/eglibc_2.13.bb +4
-0+ + echo "Adjust dynamic loader list to ${EGLIBC_DYNAMIC_LOADERS}" + [ -z "${RTLDLIST}" ] && return + sed -i ${B}/elf/ldd -e 's#^\(RTLDLIST=\).*$#\1"${RTLDLIST}"#'}
Quoted 1 line
Quoted 1 line
require eglibc-package.inc
Best Regards,
Lianhao_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core