[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#15276: libtool.m4 incorrectly resolves lt_sysroot?

From: Hans Beckerus
Subject: bug#15276: libtool.m4 incorrectly resolves lt_sysroot?
Date: Sat, 14 Sep 2013 12:28:43 +0200
User-agent: Mozilla/5.0 (Windows NT 6.2; rv:17.0) Gecko/20130801 Thunderbird/17.0.8

The previous suggested patch was no good. Due to some unknown reason some 
distributions of gcc reports the built-in sysroot as "/" and some does
not report a sysroot at all. Both should work in equal ways. However, on some 
hosts libtool does not seem to like having "/" as sysroot and that results in 
build failures. If sysroot is left unset it works fine. This patch has now been 
updated to workaround also this behavior by detecting a simple "/" and
unset lt_sysroot if that is the case.  Still note that this patch is not 
written for upstream version of libtool, it only shows what changes have been 
suggested so far in oe-core.



diff -ur libtool-2.4.2.orig/libltdl/m4/libtool.m4 
--- libtool-2.4.2.orig/libltdl/m4/libtool.m4    2013-09-13 22:37:43.647282945 
+++ libtool-2.4.2/libltdl/m4/libtool.m4 2013-09-14 10:27:37.168178605 +0200
@@ -1234,16 +1234,21 @@
 dnl in case the user passed a directory name.
 case ${with_libtool_sysroot} in #(
- yes)
+ no)
    if test "$GCC" = yes; then
      lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+     # Treat "/" the same a an unset sysroot. It seems to be more
+     # compatible across host platforms that way!?
+     if test "$lt_sysroot" = /; then
+       lt_sysroot=
+     fi
    ;; #(
+ yes|''|/)
+   ;; #(
    lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"`
    ;; #(
- no|'')
-   ;; #(
    AC_MSG_ERROR([The sysroot must be an absolute path.])

reply via email to

[Prev in Thread] Current Thread [Next in Thread]