Hello Thierry, thanks for your patch and explanations.
* Thierry Reding wrote on Wed, Jul 07, 2010 at 11:51:58AM CEST: > the following patch adds support for gcc's --sysroot argument to libtool. > I'll post the patch first and will reply to it, giving more details where > needed. > > I've been building a number of packages with variations of this patch > depending on the libtool version. The most tricky packages were those > building multiple libtool libraries with inter-dependencies (like glib and > gtk). But even those build fine with this patch. > > One more important fact is that after installing packages I always delete the > .la files from my sysroot so that any dependencies will never try to link > against the .la file but against the .so directly. This seems to work rather > well. Well, but that is not a practice we would like to recommend; rather, it would be better if libtool wouldn't misinterpret references in those .la files to point to /usr rather than the sysroot. > I welcome any comments or suggestions. I haven't looked at the patch much at all yet, but will do so; first though we should get copyright assignment out of the way (more on this off-list), because otherwise we shouldn't be looking at your patch at all. Then, for the patch to be complete, several things are missing: a ChangeLog entry, NEWS and libtool.texi updates, and most importantly, testsuite additions. It is really and utmostly important that the features your patch aims to support are covered in the testsuite, otherwise somebody will break it two months down the road. If you find adding code to the Autotest test suite difficult, then we can easily write that if you just give small example setups that work with the patch but not without. > --- a/libltdl/config/ltmain.m4sh > +++ b/libltdl/config/ltmain.m4sh > @@ -1608,6 +1608,10 @@ func_mode_install () > func_append dir "$objdir" > > if test -n "$relink_command"; then > + if test -n "$sysroot"; then > + libdir=`$ECHO "$libdir" | $SED -e "s%$sysroot%%"` The sed script should get only an version of $sysroot with sed special character escaped suitably. If we don't have such code in libtool yet, Automake uses it in the am__nobase_strip_setup variable setting. Cheers, and thanks again, Ralf