[OE-core] [PATCH] glibc: improve reproducibility with multilib

Christopher Larson kergoth at gmail.com
Tue Feb 6 02:13:47 UTC 2018


On Mon, Feb 5, 2018 at 11:26 AM, Juro Bystricky <juro.bystricky at intel.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>
> ---
>  meta/recipes-core/glibc/glibc-ld.inc  | 4 ++--
>  meta/recipes-core/glibc/glibc_2.26.bb | 8 +++-----
>  2 files changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/meta/recipes-core/glibc/glibc-ld.inc
> b/meta/recipes-core/glibc/glibc-ld.inc
> index c1d635d..607b27c 100644
> --- a/meta/recipes-core/glibc/glibc-ld.inc
> +++ b/meta/recipes-core/glibc/glibc-ld.inc
> @@ -38,8 +38,8 @@ def glibc_dl_info(d):
>          overrides = localdata.getVar("OVERRIDES", False) +
> ":virtclass-multilib-" + item
>          localdata.setVar("OVERRIDES", overrides)
>          ld_append_if_tune_exists(localdata, infos, ld_info_all)
> -    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.26.bb
> b/meta/recipes-core/glibc/glibc_2.26.bb
> index 7eb56b3..df520bd 100644
> --- a/meta/recipes-core/glibc/glibc_2.26.bb
> +++ b/meta/recipes-core/glibc/glibc_2.26.bb
> @@ -133,12 +133,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 "${prevrtld} ${RTLDLIST}" | xargs -n1 | sort
> -u | xargs`
>


This “| xargs” at the end seems redundant. xargs what? xargs is used to run
a command on each word of the input..
-- 
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Senior Software Engineer, Mentor Graphics
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20180205/b13b5c34/attachment-0002.html>


More information about the Openembedded-core mailing list