diff options
author | Hongxu Jia <hongxu.jia@windriver.com> | 2018-12-06 16:56:15 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-12-08 17:17:01 +0000 |
commit | ede2e5b4b39564a1969747f13ea726ce3a92cbbe (patch) | |
tree | a30b1d3078a9871b1f340783af440520f346f933 /meta/recipes-core | |
parent | b71c20a8b028bc9334d1c1198c871e99d3108992 (diff) | |
download | poky-ede2e5b4b39564a1969747f13ea726ce3a92cbbe.tar.gz |
glibc: improve reproducibility with multilib
Multilib builds specify several loaders which will end up embedded in
some binaries or script files. To support reproducible builds, we must
ensure the loaders are always in deterministic order.
[YOCTO #2655]
[YOCTO #12478]
[YOCTO #12480]
(From OE-Core rev: 3f839c0cdfe253677ebee47838fe476a0939e0aa)
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Improve the fix and rebase it to 2.28
Here is the log of lib32-glibc
[log.do_compile]
|Adjust ldd script
|ldd "/lib64/ld-linux-x86-64.so.2 /lib/ld-linux.so.2 /lib/ld-linux.so.2
/lib64/ld-linux-x86-64.so.2" -> "/lib/ld-linux.so.2 /lib64/ld-linux-x86-64.so.2"
[log.do_compile]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r-- | meta/recipes-core/glibc/glibc-ld.inc | 4 | ||||
-rw-r--r-- | meta/recipes-core/glibc/glibc_2.28.bb | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/meta/recipes-core/glibc/glibc-ld.inc b/meta/recipes-core/glibc/glibc-ld.inc index bb167b32bc..041ffbb9cb 100644 --- a/meta/recipes-core/glibc/glibc-ld.inc +++ b/meta/recipes-core/glibc/glibc-ld.inc | |||
@@ -10,8 +10,8 @@ def glibc_dl_info(d): | |||
10 | infos['ldconfig'].add('{"' + loader + '",' + "FLAG_ELF_LIBC6" + ' }') | 10 | infos['ldconfig'].add('{"' + loader + '",' + "FLAG_ELF_LIBC6" + ' }') |
11 | infos['lddrewrite'].add(loader) | 11 | infos['lddrewrite'].add(loader) |
12 | 12 | ||
13 | infos['ldconfig'] = ','.join(infos['ldconfig']) | 13 | infos['ldconfig'] = ','.join(sorted(infos['ldconfig'])) |
14 | infos['lddrewrite'] = ' '.join(infos['lddrewrite']) | 14 | infos['lddrewrite'] = ' '.join(sorted(infos['lddrewrite'])) |
15 | return infos | 15 | return infos |
16 | 16 | ||
17 | EGLIBC_KNOWN_INTERPRETER_NAMES = "${@glibc_dl_info(d)['ldconfig']}" | 17 | EGLIBC_KNOWN_INTERPRETER_NAMES = "${@glibc_dl_info(d)['ldconfig']}" |
diff --git a/meta/recipes-core/glibc/glibc_2.28.bb b/meta/recipes-core/glibc/glibc_2.28.bb index d072939254..a107c58b9f 100644 --- a/meta/recipes-core/glibc/glibc_2.28.bb +++ b/meta/recipes-core/glibc/glibc_2.28.bb | |||
@@ -122,10 +122,10 @@ do_compile () { | |||
122 | if [ -n "${RTLDLIST}" ] | 122 | if [ -n "${RTLDLIST}" ] |
123 | then | 123 | then |
124 | prevrtld=`cat ${B}/elf/ldd | grep "^RTLDLIST=" | sed 's#^RTLDLIST="\?\([^"]*\)"\?$#\1#'` | 124 | prevrtld=`cat ${B}/elf/ldd | grep "^RTLDLIST=" | sed 's#^RTLDLIST="\?\([^"]*\)"\?$#\1#'` |
125 | if [ "${prevrtld}" != "${RTLDLIST}" ] | 125 | # remove duplicate entries |
126 | then | 126 | newrtld=`echo $(printf '%s\n' ${prevrtld} ${RTLDLIST} | LC_ALL=C sort -u)` |
127 | sed -i ${B}/elf/ldd -e "s#^RTLDLIST=.*\$#RTLDLIST=\"${prevrtld} ${RTLDLIST}\"#" | 127 | echo "ldd \"${prevrtld} ${RTLDLIST}\" -> \"${newrtld}\"" |
128 | fi | 128 | sed -i ${B}/elf/ldd -e "s#^RTLDLIST=.*\$#RTLDLIST=\"${newrtld}\"#" |
129 | fi | 129 | fi |
130 | 130 | ||
131 | } | 131 | } |