Hi Paolo, * Paolo Bonzini wrote on Sat, Oct 23, 2010 at 09:38:43AM CEST: > Also, libtool should probably ignore --with-sysroot if build==host; > native compilers are never build with a sysroot in practice.
OK, so this would mean there is no way --with-sysroot could be (ab)used to fix the DESTDIR (re)link failures that libtool users experience today. Desired side-effect? The rest of your proposed patch could also be wrapped in gcc/configure.ac, I'm not sure whether it belongs there rather than in Libtool? > This however > would still conflict with GCC when cross-building a native compiler, or > for a sysrooted Canadian cross. The attached patch could be made to work > in this scenario if you can afford using --without-build-sysroot. > > Another possibility is to have an environment variable which would > override the command-line options (ick). Then the GCC toplevel can > set it as they wish. Ick. Thanks, Ralf > --- a/libltdl/m4/libtool.m4 > +++ b/libltdl/m4/libtool.m4 > @@ -1183,19 +1183,21 @@ AC_DEFUN([_LT_WITH_SYSROOT], > AC_ARG_WITH([sysroot], > [ --with-sysroot[=DIR] Search for dependent libraries within DIR > (or the compiler's sysroot if not specified).], > -[], [with_sysroot=no]) > +[], [with_sysroot=${with_build_sysroot}]) > > dnl lt_sysroot will always be passed unquoted. We quote it here > dnl in case the user passed a directory name. > lt_sysroot= > case ${with_sysroot} in #( > yes) > - if test "$GCC" = yes; then > + if test "$GCC" = yes && test "$build" != "$host"; then > lt_sysroot=`$CC --print-sysroot 2>/dev/null` > fi > ;; #( > /*) > - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` > + if test "$build" != "$host"; then > + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` > + fi > ;; #( > no|'') > ;; #( _______________________________________________ http://lists.gnu.org/mailman/listinfo/libtool