[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 06/12] libtool.m4: Handle "/" as a sysroot correctly
From: |
Richard Purdie |
Subject: |
[PATCH 06/12] libtool.m4: Handle "/" as a sysroot correctly |
Date: |
Mon, 25 Oct 2021 15:33:31 +0100 |
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.purdie@linuxfoundation.org>
---
m4/libtool.m4 | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index de2f1ebf..180dd9d1 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -1256,16 +1256,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.25.1
- [PATCH 00/12] Yocto Project libtool patch queue, Richard Purdie, 2021/10/25
- [PATCH 04/12] ltmain.sh: Fix sysroot paths being encoded into RPATHs, Richard Purdie, 2021/10/25
- [PATCH 01/12] ltmain.in: Handle trailing slashes on install commands correctly, Richard Purdie, 2021/10/25
- [PATCH 12/12] libtool.m4: For reproducibility stop encoding hostname in libtool script, Richard Purdie, 2021/10/25
- [PATCH 05/12] ltmain.in: Don't encode RATHS which match default linker paths, Richard Purdie, 2021/10/25
- [PATCH 02/12] libtool.m4: Rename the --with-sysroot option to avoid conflict with gcc/binutils, Richard Purdie, 2021/10/25
- [PATCH 09/12] Makefile.am: make sure autoheader run before autoconf, Richard Purdie, 2021/10/25
- [PATCH 08/12] libtool: Check for static libs for internal compiler libraries, Richard Purdie, 2021/10/25
- [PATCH 03/12] ltmain.in: Add missing sysroot to library path, Richard Purdie, 2021/10/25
- [PATCH 06/12] libtool.m4: Handle "/" as a sysroot correctly,
Richard Purdie <=
- [PATCH 11/12] ltmain.in: Handle prefix-map compiler options correctly, Richard Purdie, 2021/10/25
- [PATCH 10/12] Makefile.am: make sure autoheader run before automake, Richard Purdie, 2021/10/25
- [PATCH 07/12] libtool: Fix support for NIOS2 processor, Richard Purdie, 2021/10/25