[OE-core] [PATCH 1/1] gcc-sanitizers: Fix libtool library files

Khem Raj raj.khem at gmail.com
Tue Sep 20 20:48:54 UTC 2016


On Tue, Sep 20, 2016 at 2:19 AM, Yuanjie Huang
<Yuanjie.Huang at windriver.com> wrote:
> From: Yuanjie Huang <yuanjie.huang at windriver.com>
>
> Since libtool sysroot is not set when compiling sanitizers, the libtool
> does no prefix the dependency path correctly. Fix it, so that programs
> can link to sanitizer libraries without error.
>
> This patch changes the depenedency_libs line in libasan.la and
> libusan.la from
>         dependency_libs=' -lpthread -ldl '/usr/lib'/libstdc++.la '/usr/lib'/libstdc++.la'
> to
>         dependency_libs=' -lpthread -ldl =/usr/lib/libstdc++.la =/usr/lib/libstdc++.la'
>
> Upstream-Status: Inappropriate [embedded specific]
> (LOCAL REV; NOT UPSTREAM) -- sent to oe-core on 2016-09-20
>
> Signed-off-by: Yuanjie Huang <yuanjie.huang at windriver.com>
> ---
>  meta/recipes-devtools/gcc/gcc-sanitizers.inc | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/meta/recipes-devtools/gcc/gcc-sanitizers.inc b/meta/recipes-devtools/gcc/gcc-sanitizers.inc
> index c987ccb..5fe5eaf 100644
> --- a/meta/recipes-devtools/gcc/gcc-sanitizers.inc
> +++ b/meta/recipes-devtools/gcc/gcc-sanitizers.inc
> @@ -50,6 +50,8 @@ do_install () {
>          rmdir --ignore-fail-on-non-empty -p ${D}${infodir}
>      fi
>      chown -R root:root ${D}
> +    # Fix broken libtool with stdc++, as sysroot is not set.
> +    find ${D} -name \*.la -exec sed -i "/^dependency_libs=/s@'/usr/lib'@=/usr/lib at g" {} \;

what happens if you remove the .la files completely.

>  }
>
>  INHIBIT_DEFAULT_DEPS = "1"
> --
> 1.9.1
>
> --
> _______________________________________________
> 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