aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glibc/glibc-ld.inc
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2014-08-28 06:00:54 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-09-01 18:00:31 +0100
commit1027c535ea753e63d9ffe469a423e04467cf8940 (patch)
treecae4c0f7548f996a1f58d6a57806edfde475ff6e /meta/recipes-core/glibc/glibc-ld.inc
parent750b2a89af404dc7b275aa40fb693b07b9b297fe (diff)
downloadopenembedded-core-contrib-1027c535ea753e63d9ffe469a423e04467cf8940.tar.gz
glibc: Migrate eglibc 2.19 -> glibc 2.20
- This is a big swoop change where we switch to using glibc - option-groups are forward ported - cross-localedef is extracted out from eglibc and hosted at github.com/kraj/localedef, its used for cross-localedef recipe - Other non ported patches from eglibc are forward ported ppc8xx cache line workaround SH fpcr values dynamic resolver installing PIC archives is there but is not applied libc header bootstrap - Delete eglibc recipes we moved back to using glibc now - Fix ppc/e500 build - Fix crypt module build when options are used - Fix fnmatch build when options OPTION_EGLIBC_LOCALE_CODE is unset HAVE_MBSTATE_T and HAVE_MBSRTOWCS should be defined conditionally based upon OPTION_EGLIBC_LOCALE_CODE being set/unset - Move the ports/ patches to relevant files now that ports is gone Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta/recipes-core/glibc/glibc-ld.inc')
-rw-r--r--meta/recipes-core/glibc/glibc-ld.inc56
1 files changed, 56 insertions, 0 deletions
diff --git a/meta/recipes-core/glibc/glibc-ld.inc b/meta/recipes-core/glibc/glibc-ld.inc
new file mode 100644
index 0000000000..962d666885
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-ld.inc
@@ -0,0 +1,56 @@
+def ld_append_if_tune_exists(d, infos, dict):
+ tune = d.getVar("DEFAULTTUNE", True) or ""
+ libdir = d.getVar("base_libdir", True) or ""
+ if tune in dict:
+ infos['ldconfig'].add('{"' + libdir + '/' + dict[tune][0] + '",' + dict[tune][1] + ' }')
+ infos['lddrewrite'].add(libdir+'/'+dict[tune][0])
+
+def glibc_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-32": ["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_LIBC6"],
+ "x86-64": ["ld-linux-x86-64.so.2", "FLAG_ELF_LIBC6"],
+ "i586": ["ld-linux.so.2", "FLAG_ELF_LIBC6"],
+ "corei7-32": ["ld-linux.so.2", "FLAG_ELF_LIBC6"],
+ "corei7-64": ["ld-linux-x86-64.so.2", "FLAG_ELF_LIBC6"],
+ }
+
+ infos = {'ldconfig':set(), 'lddrewrite':set()}
+ ld_append_if_tune_exists(d, infos, ld_info_all)
+
+ #DEFAULTTUNE_MULTILIB_ORIGINAL
+ original_tune=d.getVar("DEFAULTTUNE_MULTILIB_ORIGINAL",True)
+ if original_tune:
+ localdata = bb.data.createCopy(d)
+ localdata.setVar("DEFAULTTUNE", original_tune)
+ ld_append_if_tune_exists(localdata, infos, ld_info_all)
+
+ variants = d.getVar("MULTILIB_VARIANTS", True) or ""
+ for item in variants.split():
+ localdata = bb.data.createCopy(d)
+ overrides = localdata.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item
+ localdata.setVar("OVERRIDES", overrides)
+ bb.data.update_data(localdata)
+ ld_append_if_tune_exists(localdata, infos, ld_info_all)
+ infos['ldconfig'] = ','.join(infos['ldconfig'])
+ infos['lddrewrite'] = ' '.join(infos['lddrewrite'])
+ return infos
+
+EGLIBC_KNOWN_INTERPRETER_NAMES = "${@glibc_dl_info(d)['ldconfig']}"
+RTLDLIST = "${@glibc_dl_info(d)['lddrewrite']}"