[2/2] libiconv: Remove RPATH from binaries

Submitted by Björn Stenberg on Feb. 8, 2013, 3:35 p.m.

Details

Message ID 1360337733-51730-3-git-send-email-bjst@enea.com
State Accepted
Commit 00a2411470b989ca80bc2a6de08d105bc400dae5
Headers show

Commit Message

Björn Stenberg Feb. 8, 2013, 3:35 p.m.
Modify libtool to not add RPATH.
This solves https://bugzilla.yoctoproject.org/show_bug.cgi?id=2669

Signed-off-by: Björn Stenberg <bjst@enea.com>
---
 meta/recipes-support/libiconv/libiconv_1.14.bb |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

Patch hide | download patch | download mbox

diff --git a/meta/recipes-support/libiconv/libiconv_1.14.bb b/meta/recipes-support/libiconv/libiconv_1.14.bb
index 6666866..b1d2612 100644
--- a/meta/recipes-support/libiconv/libiconv_1.14.bb
+++ b/meta/recipes-support/libiconv/libiconv_1.14.bb
@@ -34,6 +34,12 @@  do_configure_prepend () {
 	rm -f m4/libtool.m4 m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 m4/lt~obsolete.m4 libcharset/m4/libtool.m4 libcharset/m4/ltoptions.m4 libcharset/m4/ltsugar.m4 libcharset/m4/ltversion.m4 libcharset/m4/lt~obsolete.m4
 }
 
+do_configure_append () {
+        # forcibly remove RPATH from libtool
+        sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' *libtool
+        sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=_NO_RPATH_|g' *libtool
+}
+
 do_install_append () {
 	rm -rf ${D}${libdir}/preloadable_libiconv.so
 	rm -rf ${D}${libdir}/charset.alias

Comments

Richard Purdie Feb. 11, 2013, 3:41 p.m.
On Fri, 2013-02-08 at 16:35 +0100, Björn Stenberg wrote:
> Modify libtool to not add RPATH.
> This solves https://bugzilla.yoctoproject.org/show_bug.cgi?id=2669
> 
> Signed-off-by: Björn Stenberg <bjst@enea.com>
> ---
>  meta/recipes-support/libiconv/libiconv_1.14.bb |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/meta/recipes-support/libiconv/libiconv_1.14.bb b/meta/recipes-support/libiconv/libiconv_1.14.bb
> index 6666866..b1d2612 100644
> --- a/meta/recipes-support/libiconv/libiconv_1.14.bb
> +++ b/meta/recipes-support/libiconv/libiconv_1.14.bb
> @@ -34,6 +34,12 @@ do_configure_prepend () {
>  	rm -f m4/libtool.m4 m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 m4/lt~obsolete.m4 libcharset/m4/libtool.m4 libcharset/m4/ltoptions.m4 libcharset/m4/ltsugar.m4 libcharset/m4/ltversion.m4 libcharset/m4/lt~obsolete.m4
>  }
>  
> +do_configure_append () {
> +        # forcibly remove RPATH from libtool
> +        sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' *libtool
> +        sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=_NO_RPATH_|g' *libtool
> +}
> +
>  do_install_append () {
>  	rm -rf ${D}${libdir}/preloadable_libiconv.so
>  	rm -rf ${D}${libdir}/charset.alias

That RPATH warning is annoying and I know I've tried unsuccessfully to
remove it before. I've merged this although the fact the above was
needed suggests something is wrong in libtool itself since it shouldn't
have decided to hardcode this.

Cheers,

Richard