]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/blob
156622bb54b67866b898f0f0ef06da1bdd025b41
[thirdparty/openembedded/openembedded-core.git] /
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
3
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.
8
9 Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
10
11 Upstream report:
12 http://lists.gnu.org/archive/html/libtool/2010-10/msg00048.html
13
14 Upstream-Status: Submitted [https://lists.gnu.org/archive/html/libtool-patches/2021-10/msg00014.html]
15
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])
32
33 dnl lt_sysroot will always be passed unquoted. We quote it here
34 dnl in case the user passed a directory name.
35 lt_sysroot=
36 -case $with_sysroot in #(
37 +case $with_libtool_sysroot in #(
38 yes)
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 #(
42 fi
43 ;; #(
44 /*)
45 - lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
46 + lt_sysroot=`echo "$with_libtool_sysroot" | $SED -e "$sed_quote_subst"`
47 ;; #(
48 no|'')
49 ;; #(
50 *)
51 - AC_MSG_RESULT([$with_sysroot])
52 + AC_MSG_RESULT([$with_libtool_sysroot])
53 AC_MSG_ERROR([The sysroot must be an absolute path.])
54 ;;
55 esac
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
61 done])
62
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"
66
67 #???
68 if test PATH = "$shlibpath_var"; then
69 @@ -115,7 +115,7 @@ AM_INIT_AUTOMAKE([foreign])
70 AC_PROG_CC
71 AC_CONFIG_SRCDIR([lib2.c])
72 LT_INIT
73 -sysroot=$with_sysroot
74 +sysroot=$with_libtool_sysroot
75 AC_SUBST([sysroot])
76 AC_OUTPUT(Makefile)
77 ]])
78 @@ -156,7 +156,7 @@ AM_INIT_AUTOMAKE([foreign])
79 AC_PROG_CC
80 AC_CONFIG_SRCDIR([prog.c])
81 LT_INIT
82 -sysroot=$with_sysroot
83 +sysroot=$with_libtool_sysroot
84 AC_SUBST([sysroot])
85 AC_OUTPUT(Makefile)
86 ]])
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; }
92
93
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"
97
98 #???
99 if test PATH = "$shlibpath_var"; then
100 @@ -49269,7 +49269,7 @@ AM_INIT_AUTOMAKE([foreign])
101 AC_PROG_CC
102 AC_CONFIG_SRCDIR([lib2.c])
103 LT_INIT
104 -sysroot=$with_sysroot
105 +sysroot=$with_libtool_sysroot
106 AC_SUBST([sysroot])
107 AC_OUTPUT(Makefile)
108 _ATEOF
109 @@ -49463,7 +49463,7 @@ AM_INIT_AUTOMAKE([foreign])
110 AC_PROG_CC
111 AC_CONFIG_SRCDIR([prog.c])
112 LT_INIT
113 -sysroot=$with_sysroot
114 +sysroot=$with_libtool_sysroot
115 AC_SUBST([sysroot])
116 AC_OUTPUT(Makefile)
117 _ATEOF
118 @@ -49821,7 +49821,7 @@ $at_traceon; }
119
120
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"
124
125 #???
126 if test PATH = "$shlibpath_var"; then
127 @@ -50036,7 +50036,7 @@ AM_INIT_AUTOMAKE([foreign])
128 AC_PROG_CC
129 AC_CONFIG_SRCDIR([lib2.c])
130 LT_INIT
131 -sysroot=$with_sysroot
132 +sysroot=$with_libtool_sysroot
133 AC_SUBST([sysroot])
134 AC_OUTPUT(Makefile)
135 _ATEOF
136 @@ -50230,7 +50230,7 @@ AM_INIT_AUTOMAKE([foreign])
137 AC_PROG_CC
138 AC_CONFIG_SRCDIR([prog.c])
139 LT_INIT
140 -sysroot=$with_sysroot
141 +sysroot=$with_libtool_sysroot
142 AC_SUBST([sysroot])
143 AC_OUTPUT(Makefile)
144 _ATEOF
145 @@ -50588,7 +50588,7 @@ $at_traceon; }
146
147
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"
151
152 #???
153 if test PATH = "$shlibpath_var"; then
154 @@ -50803,7 +50803,7 @@ AM_INIT_AUTOMAKE([foreign])
155 AC_PROG_CC
156 AC_CONFIG_SRCDIR([lib2.c])
157 LT_INIT
158 -sysroot=$with_sysroot
159 +sysroot=$with_libtool_sysroot
160 AC_SUBST([sysroot])
161 AC_OUTPUT(Makefile)
162 _ATEOF
163 @@ -50997,7 +50997,7 @@ AM_INIT_AUTOMAKE([foreign])
164 AC_PROG_CC
165 AC_CONFIG_SRCDIR([prog.c])
166 LT_INIT
167 -sysroot=$with_sysroot
168 +sysroot=$with_libtool_sysroot
169 AC_SUBST([sysroot])
170 AC_OUTPUT(Makefile)
171 _ATEOF