[OE-core] [PATCH 06/16] gcc-sanitizers: Fix libtool .la files

Richard Purdie richard.purdie at linuxfoundation.org
Sun Jun 3 16:01:13 UTC 2018


On Wed, 2018-05-30 at 17:03 +0800, Robert Yang 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.
> 
> Signed-off-by: Yuanjie Huang <yuanjie.huang at windriver.com>
> Signed-off-by: Mark Hatle <mark.hatle 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 e5e8452..2373dd8 100644
> --- a/meta/recipes-devtools/gcc/gcc-sanitizers.inc
> +++ b/meta/recipes-devtools/gcc/gcc-sanitizers.inc
> @@ -39,6 +39,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@'${libdir}'@=${libdir}@g" {} \;
>  }
>  
>  INHIBIT_DEFAULT_DEPS = "1"

At this point we gave up and started just deleting .la files so I'm not
sure this matters any more. Do you still need to do this?

Regardless, it would be better to pass in the right libtool sysroot
rather than hacking the .la files.

Cheers,

Richard




More information about the Openembedded-core mailing list