1 From: Khem Raj <raj.khem@gmail.com>
2 Subject: [PATCH 02/12] libtool.m4: Rename the --with-sysroot option to avoid conflict with gcc/binutils
4 This patch renames the --with-sysroot option to --with-libtool-sysroot
5 to avoid namespace conflict with binutils, gcc and other toolchain
6 components since these componets also add that option to configure
7 and this becomes confusing and conflicting otherwise.
9 Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 http://lists.gnu.org/archive/html/libtool/2010-10/msg00048.html
14 Upstream-Status: Submitted [https://lists.gnu.org/archive/html/libtool-patches/2021-10/msg00014.html]
16 Index: libtool-2.5.0/m4/libtool.m4
17 ===================================================================
18 --- libtool-2.5.0.orig/m4/libtool.m4
19 +++ libtool-2.5.0/m4/libtool.m4
20 @@ -1243,16 +1243,16 @@ _LT_DECL([], [ECHO], [1], [An echo progr
21 AC_DEFUN([_LT_WITH_SYSROOT],
22 [m4_require([_LT_DECL_SED])dnl
23 AC_MSG_CHECKING([for sysroot])
24 -AC_ARG_WITH([sysroot],
25 -[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
26 +AC_ARG_WITH([libtool-sysroot],
27 +[AS_HELP_STRING([--with-libtool-sysroot@<:@=DIR@:>@],
28 [Search for dependent libraries within DIR (or the compiler's sysroot
29 if not specified).])],
30 -[], [with_sysroot=no])
31 +[], [with_libtool_sysroot=no])
33 dnl lt_sysroot will always be passed unquoted. We quote it here
34 dnl in case the user passed a directory name.
36 -case $with_sysroot in #(
37 +case $with_libtool_sysroot in #(
39 if test yes = "$GCC"; then
40 # Trim trailing / since we'll always append absolute paths and we want
41 @@ -1261,12 +1261,12 @@ case $with_sysroot in #(
45 - lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
46 + lt_sysroot=`echo "$with_libtool_sysroot" | $SED -e "$sed_quote_subst"`
51 - AC_MSG_RESULT([$with_sysroot])
52 + AC_MSG_RESULT([$with_libtool_sysroot])
53 AC_MSG_ERROR([The sysroot must be an absolute path.])
56 Index: libtool-2.5.0/tests/sysroot.at
57 ===================================================================
58 --- libtool-2.5.0.orig/tests/sysroot.at
59 +++ libtool-2.5.0/tests/sysroot.at
60 @@ -65,7 +65,7 @@ while read file; do
63 LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined"
64 -configure_options="$configure_options --with-sysroot=$sysroot --prefix=$prefix"
65 +configure_options="$configure_options --with-libtool-sysroot=$sysroot --prefix=$prefix"
68 if test PATH = "$shlibpath_var"; then
69 @@ -115,7 +115,7 @@ AM_INIT_AUTOMAKE([foreign])
71 AC_CONFIG_SRCDIR([lib2.c])
73 -sysroot=$with_sysroot
74 +sysroot=$with_libtool_sysroot
78 @@ -156,7 +156,7 @@ AM_INIT_AUTOMAKE([foreign])
80 AC_CONFIG_SRCDIR([prog.c])
82 -sysroot=$with_sysroot
83 +sysroot=$with_libtool_sysroot
87 Index: libtool-2.5.0/tests/testsuite
88 ===================================================================
89 --- libtool-2.5.0.orig/tests/testsuite
90 +++ libtool-2.5.0/tests/testsuite
91 @@ -49054,7 +49054,7 @@ $at_traceon; }
94 LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined"
95 -configure_options="$configure_options --with-sysroot=$sysroot --prefix=$prefix"
96 +configure_options="$configure_options --with-libtool-sysroot=$sysroot --prefix=$prefix"
99 if test PATH = "$shlibpath_var"; then
100 @@ -49269,7 +49269,7 @@ AM_INIT_AUTOMAKE([foreign])
102 AC_CONFIG_SRCDIR([lib2.c])
104 -sysroot=$with_sysroot
105 +sysroot=$with_libtool_sysroot
109 @@ -49463,7 +49463,7 @@ AM_INIT_AUTOMAKE([foreign])
111 AC_CONFIG_SRCDIR([prog.c])
113 -sysroot=$with_sysroot
114 +sysroot=$with_libtool_sysroot
118 @@ -49821,7 +49821,7 @@ $at_traceon; }
121 LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined"
122 -configure_options="$configure_options --with-sysroot=$sysroot --prefix=$prefix"
123 +configure_options="$configure_options --with-libtool-sysroot=$sysroot --prefix=$prefix"
126 if test PATH = "$shlibpath_var"; then
127 @@ -50036,7 +50036,7 @@ AM_INIT_AUTOMAKE([foreign])
129 AC_CONFIG_SRCDIR([lib2.c])
131 -sysroot=$with_sysroot
132 +sysroot=$with_libtool_sysroot
136 @@ -50230,7 +50230,7 @@ AM_INIT_AUTOMAKE([foreign])
138 AC_CONFIG_SRCDIR([prog.c])
140 -sysroot=$with_sysroot
141 +sysroot=$with_libtool_sysroot
145 @@ -50588,7 +50588,7 @@ $at_traceon; }
148 LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined"
149 -configure_options="$configure_options --with-sysroot=$sysroot --prefix=$prefix"
150 +configure_options="$configure_options --with-libtool-sysroot=$sysroot --prefix=$prefix"
153 if test PATH = "$shlibpath_var"; then
154 @@ -50803,7 +50803,7 @@ AM_INIT_AUTOMAKE([foreign])
156 AC_CONFIG_SRCDIR([lib2.c])
158 -sysroot=$with_sysroot
159 +sysroot=$with_libtool_sysroot
163 @@ -50997,7 +50997,7 @@ AM_INIT_AUTOMAKE([foreign])
165 AC_CONFIG_SRCDIR([prog.c])
167 -sysroot=$with_sysroot
168 +sysroot=$with_libtool_sysroot