From: Richard Purdie <richard.pur...@linuxfoundation.org>

Update libtool.m4 to resolve a problem with lt_sysroot not being properly
updated if the option '--with[-libtool]-sysroot' is not provided when
running the 'configure' script for a package so that "/" as a sysroot
is handled correctly by libtool.

Signed-off-by: Richard Purdie <richard.pur...@linuxfoundation.org>
---
 m4/libtool.m4 | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/m4/libtool.m4 b/m4/libtool.m4
index 5eac9228..7d6a4564 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -1253,16 +1253,20 @@ 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_libtool_sysroot in #(
- yes)
+ no)
    if test yes = "$GCC"; then
      lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+     # Treat "/" the same a an unset sysroot.
+     if test "$lt_sysroot" = /; then
+       lt_sysroot=
+     fi
    fi
    ;; #(
+ yes|''|/)
+   ;; #(
  /*)
    lt_sysroot=`echo "$with_libtool_sysroot" | $SED -e "$sed_quote_subst"`
    ;; #(
- no|'')
-   ;; #(
  *)
    AC_MSG_RESULT([$with_libtool_sysroot])
    AC_MSG_ERROR([The sysroot must be an absolute path.])
-- 
2.35.1


Reply via email to