[OE-core] [PATCH V2] glibc: improve reproducibility with multilib
Khem Raj
raj.khem at gmail.com
Thu Dec 6 16:04:42 UTC 2018
looks ok
On Thu, Dec 6, 2018 at 12:57 AM Hongxu Jia <hongxu.jia at windriver.com> wrote:
>
> 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]
>
> Signed-off-by: Juro Bystricky <juro.bystricky at 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 at windriver.com>
> ---
> meta/recipes-core/glibc/glibc-ld.inc | 4 ++--
> 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 bb167b3..041ffbb 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):
> infos['ldconfig'].add('{"' + loader + '",' + "FLAG_ELF_LIBC6" + ' }')
> infos['lddrewrite'].add(loader)
>
> - infos['ldconfig'] = ','.join(infos['ldconfig'])
> - infos['lddrewrite'] = ' '.join(infos['lddrewrite'])
> + infos['ldconfig'] = ','.join(sorted(infos['ldconfig']))
> + infos['lddrewrite'] = ' '.join(sorted(infos['lddrewrite']))
> return infos
>
> 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 d072939..a107c58 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 () {
> if [ -n "${RTLDLIST}" ]
> then
> prevrtld=`cat ${B}/elf/ldd | grep "^RTLDLIST=" | sed 's#^RTLDLIST="\?\([^"]*\)"\?$#\1#'`
> - if [ "${prevrtld}" != "${RTLDLIST}" ]
> - then
> - sed -i ${B}/elf/ldd -e "s#^RTLDLIST=.*\$#RTLDLIST=\"${prevrtld} ${RTLDLIST}\"#"
> - fi
> + # remove duplicate entries
> + newrtld=`echo $(printf '%s\n' ${prevrtld} ${RTLDLIST} | LC_ALL=C sort -u)`
> + echo "ldd \"${prevrtld} ${RTLDLIST}\" -> \"${newrtld}\""
> + sed -i ${B}/elf/ldd -e "s#^RTLDLIST=.*\$#RTLDLIST=\"${newrtld}\"#"
> fi
>
> }
> --
> 2.7.4
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
More information about the Openembedded-core
mailing list