blob: ad2b1105306261806c928b8d695391941589e4d9 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001Upstream-Status: Pending
2
3This patch renames the --with-sysroot option to --with-libtool-sysroot
4to avoid namespace conflict with binutils, gcc and other toolchain
5components.
6
7I also reported the problem to libtool here
8
9http://lists.gnu.org/archive/html/libtool/2010-10/msg00048.html
10
11-Khem Raj <raj.khem@gmail.com>
12
13Updated by: Robert Yang <liezhi.yang@windriver.com>
14
15diff --git a/m4/libtool.m4 b/m4/libtool.m4
16--- a/m4/libtool.m4
17+++ b/m4/libtool.m4
18@@ -1215,28 +1215,28 @@ _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
19 # ----------------
20 AC_DEFUN([_LT_WITH_SYSROOT],
21 [AC_MSG_CHECKING([for sysroot])
22-AC_ARG_WITH([sysroot],
23-[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
24+AC_ARG_WITH([libtool-sysroot],
25+[AS_HELP_STRING([--with-libtool-sysroot@<:@=DIR@:>@],
26 [Search for dependent libraries within DIR (or the compiler's sysroot
27 if not specified).])],
28-[], [with_sysroot=no])
29+[], [with_libtool_sysroot=no])
30
31 dnl lt_sysroot will always be passed unquoted. We quote it here
32 dnl in case the user passed a directory name.
33 lt_sysroot=
34-case $with_sysroot in #(
35+case $with_libtool_sysroot in #(
36 yes)
37 if test yes = "$GCC"; then
38 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
39 fi
40 ;; #(
41 /*)
42- lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
43+ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"`
44 ;; #(
45 no|'')
46 ;; #(
47 *)
48- AC_MSG_RESULT([$with_sysroot])
49+ AC_MSG_RESULT([$with_libtool_sysroot])
50 AC_MSG_ERROR([The sysroot must be an absolute path.])
51 ;;
52 esac
53diff --git a/tests/sysroot.at b/tests/sysroot.at
54--- a/tests/sysroot.at
55+++ b/tests/sysroot.at
56@@ -64,7 +64,7 @@ while read file; do
57 done])
58
59 LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined"
60-configure_options="$configure_options --with-sysroot=$sysroot --prefix=$prefix"
61+configure_options="$configure_options --with-libtool-sysroot=$sysroot --prefix=$prefix"
62
63 #???
64 if test PATH = "$shlibpath_var"; then
65@@ -114,7 +114,7 @@ AM_INIT_AUTOMAKE([foreign])
66 AC_PROG_CC
67 AC_CONFIG_SRCDIR([lib2.c])
68 LT_INIT
69-sysroot=$with_sysroot
70+sysroot=$with_libtool_sysroot
71 AC_SUBST([sysroot])
72 AC_OUTPUT(Makefile)
73 ]])
74@@ -155,7 +155,7 @@ AM_INIT_AUTOMAKE([foreign])
75 AC_PROG_CC
76 AC_CONFIG_SRCDIR([prog.c])
77 LT_INIT
78-sysroot=$with_sysroot
79+sysroot=$with_libtool_sysroot
80 AC_SUBST([sysroot])
81 AC_OUTPUT(Makefile)
82 ]])
83diff --git a/tests/testsuite b/tests/testsuite
84--- a/tests/testsuite
85+++ b/tests/testsuite
86@@ -48945,7 +48945,7 @@ $at_traceon; }
87
88
89 LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined"
90-configure_options="$configure_options --with-sysroot=$sysroot --prefix=$prefix"
91+configure_options="$configure_options --with-libtool-sysroot=$sysroot --prefix=$prefix"
92
93 #???
94 if test PATH = "$shlibpath_var"; then
95@@ -49154,7 +49154,7 @@ AM_INIT_AUTOMAKE([foreign])
96 AC_PROG_CC
97 AC_CONFIG_SRCDIR([lib2.c])
98 LT_INIT
99-sysroot=$with_sysroot
100+sysroot=$with_libtool_sysroot
101 AC_SUBST([sysroot])
102 AC_OUTPUT(Makefile)
103 _ATEOF
104@@ -49342,7 +49342,7 @@ AM_INIT_AUTOMAKE([foreign])
105 AC_PROG_CC
106 AC_CONFIG_SRCDIR([prog.c])
107 LT_INIT
108-sysroot=$with_sysroot
109+sysroot=$with_libtool_sysroot
110 AC_SUBST([sysroot])
111 AC_OUTPUT(Makefile)
112 _ATEOF
113@@ -49694,7 +49694,7 @@ $at_traceon; }
114
115
116 LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined"
117-configure_options="$configure_options --with-sysroot=$sysroot --prefix=$prefix"
118+configure_options="$configure_options --with-libtool-sysroot=$sysroot --prefix=$prefix"
119
120 #???
121 if test PATH = "$shlibpath_var"; then
122@@ -49903,7 +49903,7 @@ AM_INIT_AUTOMAKE([foreign])
123 AC_PROG_CC
124 AC_CONFIG_SRCDIR([lib2.c])
125 LT_INIT
126-sysroot=$with_sysroot
127+sysroot=$with_libtool_sysroot
128 AC_SUBST([sysroot])
129 AC_OUTPUT(Makefile)
130 _ATEOF
131@@ -50091,7 +50091,7 @@ AM_INIT_AUTOMAKE([foreign])
132 AC_PROG_CC
133 AC_CONFIG_SRCDIR([prog.c])
134 LT_INIT
135-sysroot=$with_sysroot
136+sysroot=$with_libtool_sysroot
137 AC_SUBST([sysroot])
138 AC_OUTPUT(Makefile)
139 _ATEOF
140@@ -50443,7 +50443,7 @@ $at_traceon; }
141
142
143 LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined"
144-configure_options="$configure_options --with-sysroot=$sysroot --prefix=$prefix"
145+configure_options="$configure_options --with-libtool-sysroot=$sysroot --prefix=$prefix"
146
147 #???
148 if test PATH = "$shlibpath_var"; then
149@@ -50652,7 +50652,7 @@ AM_INIT_AUTOMAKE([foreign])
150 AC_PROG_CC
151 AC_CONFIG_SRCDIR([lib2.c])
152 LT_INIT
153-sysroot=$with_sysroot
154+sysroot=$with_libtool_sysroot
155 AC_SUBST([sysroot])
156 AC_OUTPUT(Makefile)
157 _ATEOF
158@@ -50840,7 +50840,7 @@ AM_INIT_AUTOMAKE([foreign])
159 AC_PROG_CC
160 AC_CONFIG_SRCDIR([prog.c])
161 LT_INIT
162-sysroot=$with_sysroot
163+sysroot=$with_libtool_sysroot
164 AC_SUBST([sysroot])
165 AC_OUTPUT(Makefile)
166 _ATEOF