On Tue, 2015-12-01 at 22:58 +0000, James Le Cuirot wrote:
> 

[SNIP really good writeup, thanks :)]

> There's also a further complication here that I forgot to mention to
> mgorny. While calling configure with --with-sysroot certainly helps,
> it still stumbles on a significant number of packages that do
> relinking at the end of the build if elibtoolize hasn't been called.
> elibtoolize has long patched ltmain.sh with ELT-patches/cross/link-ROOT

I looked at ELT-patches/cross/link-ROOT and it has
--- libltdl/config/ltmain.sh    2008-09-07 19:56:33.000000000 +0200
+++ libltdl/config/ltmain.sh.new        2009-02-15 20:37:47.000000000 +0100
@@ -5768,7 +5768,7 @@
               test "$hardcode_direct_absolute" = no; then
              add="$libdir/$linklib"
            elif test "$hardcode_minus_L" = yes; then
-             add_dir="-L$libdir"
+             add_dir="-L$ROOT/$libdir"
              add="-l$name"
            elif test "$hardcode_shlibpath_var" = yes; then
              case :$finalize_shlibpath: in
@@ -5785,7 +5785,7 @@
              fi
            else
              # We cannot seem to hardcode it, guess we'll fake it.
-             add_dir="-L$libdir"
+             add_dir="-L$ROOT/$libdir"

I think this should be "add_dir=-L$lt_sysroot$libdir" rather than ROOT.
See also bug https://bugs.gentoo.org/show_bug.cgi?id=521184
and since I think this is also a libool bug there is a post upstream
 http://lists.gnu.org/archive/html/libtool/2015-10/msg00012.html
This has not gotten any attention from upstream libtool folks. Would
be great if someone more could push for such a change.

 Jocke

> when cross-compiling and this still applies to the very latest libtool.
> I filed several bugs about this before realising that fixing this
> globally would be better. elibtoolize doesn't require anything to be
> installed and the description does say "this function should always be
> safe to run" but I suppose calling it unconditionally might screw up
> patching in some isolated cases. What do you think?
> 
> Phew, I'm done. Please be gentle! :)
> 

Reply via email to