[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: libtool.m4: Cleanup sysroot trailing "/"
From: |
Mike Frysinger |
Subject: |
branch master updated: libtool.m4: Cleanup sysroot trailing "/" |
Date: |
Wed, 17 Jan 2024 17:03:31 -0500 |
This is an automated email from the git hooks/post-receive script.
vapier pushed a commit to branch master
in repository libtool.
The following commit(s) were added to refs/heads/master by this push:
new 36580532 libtool.m4: Cleanup sysroot trailing "/"
36580532 is described below
commit 365805327c7b9bbdb0e622b954b6b0d8eaeb3f99
Author: Richard Purdie <richard.purdie@linuxfoundation.org>
AuthorDate: Wed Jan 17 12:39:22 2024 +0000
libtool.m4: Cleanup sysroot trailing "/"
If $CC has --sysroot=/, it is a valid configuration however libtool will
then set lt_sysroot to "/".
This means references like $lt_sysroot$libdir become //usr/lib instead
of the more normally expected /usr/lib. This may or may not break something
but certainly is confusing to the user and gives confusing output. Making
"/" simply unset lt_sysroot is much cleaner.
Whilst here, trim any trailing '/' from sysroot paths to drop the
duplication
and result in cleaner/consistent output.
* m4/libtool.m4: Cleanup sysroot trailing '/' handling.
---
m4/libtool.m4 | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index f2c244f0..20527f83 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -1255,7 +1255,9 @@ lt_sysroot=
case $with_sysroot in #(
yes)
if test yes = "$GCC"; then
- lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+ # Trim trailing / since we'll always append absolute paths and we want
+ # to avoid //, if only for less confusing output for the user.
+ lt_sysroot=`$CC --print-sysroot 2>/dev/null | $SED 's:/\+$::'`
fi
;; #(
/*)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: libtool.m4: Cleanup sysroot trailing "/",
Mike Frysinger <=