diff options
Diffstat (limited to 'meta/recipes-devtools/libtool/libtool/0006-libtool.m4-Handle-as-a-sysroot-correctly.patch')
-rw-r--r-- | meta/recipes-devtools/libtool/libtool/0006-libtool.m4-Handle-as-a-sysroot-correctly.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/meta/recipes-devtools/libtool/libtool/0006-libtool.m4-Handle-as-a-sysroot-correctly.patch b/meta/recipes-devtools/libtool/libtool/0006-libtool.m4-Handle-as-a-sysroot-correctly.patch new file mode 100644 index 0000000000..999971241f --- /dev/null +++ b/meta/recipes-devtools/libtool/libtool/0006-libtool.m4-Handle-as-a-sysroot-correctly.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | From: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
2 | Subject: [PATCH 06/12] libtool.m4: Handle "/" as a sysroot correctly | ||
3 | |||
4 | Update libtool.m4 to resolve a problem with lt_sysroot not being properly | ||
5 | updated if the option '--with[-libtool]-sysroot' is not provided when | ||
6 | running the 'configure' script for a package so that "/" as a sysroot | ||
7 | is handled correctly by libtool. | ||
8 | |||
9 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
10 | |||
11 | Upstream Report: | ||
12 | http://lists.gnu.org/archive/html/bug-libtool/2013-09/msg00005.html | ||
13 | |||
14 | Upstream-Status: Submitted [https://lists.gnu.org/archive/html/libtool-patches/2021-10/msg00018.html] | ||
15 | |||
16 | --- | ||
17 | diff --git a/m4/libtool.m4 b/m4/libtool.m4 | ||
18 | --- a/m4/libtool.m4 | ||
19 | +++ b/m4/libtool.m4 | ||
20 | @@ -1225,16 +1225,21 @@ dnl lt_sysroot will always be passed unquoted. We quote it here | ||
21 | dnl in case the user passed a directory name. | ||
22 | lt_sysroot= | ||
23 | case $with_libtool_sysroot in #( | ||
24 | - yes) | ||
25 | + no) | ||
26 | if test yes = "$GCC"; then | ||
27 | lt_sysroot=`$CC --print-sysroot 2>/dev/null` | ||
28 | + # Treat "/" the same a an unset sysroot. It seems to be more | ||
29 | + # compatible across host platforms that way!? | ||
30 | + if test "$lt_sysroot" = /; then | ||
31 | + lt_sysroot= | ||
32 | + fi | ||
33 | fi | ||
34 | ;; #( | ||
35 | + yes|''|/) | ||
36 | + ;; #( | ||
37 | /*) | ||
38 | lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` | ||
39 | ;; #( | ||
40 | - no|'') | ||
41 | - ;; #( | ||
42 | *) | ||
43 | AC_MSG_RESULT([$with_libtool_sysroot]) | ||
44 | AC_MSG_ERROR([The sysroot must be an absolute path.]) | ||