replace the gdbserver package with a full gdb package that also includes gdbserver
[openwrt.git] / package / gdb / patches / 100-native_readline.patch
1 --- a/Makefile.in
2 +++ b/Makefile.in
3 @@ -15590,236 +15590,40 @@ maintainer-clean-rcs: 
4  
5  
6  .PHONY: configure-readline maybe-configure-readline
7 -maybe-configure-readline:
8 -@if readline
9 -maybe-configure-readline: configure-readline
10 -configure-readline:
11 -       @test ! -f readline/Makefile || exit 0; \
12 -       [ -d readline ] || mkdir readline; \
13 -       r=`${PWD_COMMAND}`; export r; \
14 -       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
15 -       $(HOST_EXPORTS) \
16 -       echo Configuring in readline; \
17 -       cd readline || exit 1; \
18 -       case $(srcdir) in \
19 -         \.) \
20 -           srcdiroption="--srcdir=."; \
21 -           libsrcdir=".";; \
22 -         /* | [A-Za-z]:[\\/]*) \
23 -           srcdiroption="--srcdir=$(srcdir)/readline"; \
24 -           libsrcdir="$$s/readline";; \
25 -         *) \
26 -           srcdiroption="--srcdir=../$(srcdir)/readline"; \
27 -           libsrcdir="$$s/readline";; \
28 -       esac; \
29 -       $(SHELL) $${libsrcdir}/configure \
30 -         $(HOST_CONFIGARGS) $${srcdiroption}  \
31 -         || exit 1
32 -@endif readline
33 +maybe-configure-readline: ;
34  
35  .PHONY: all-readline maybe-all-readline
36 -maybe-all-readline:
37 -@if readline
38 -TARGET-readline=all
39 -maybe-all-readline: all-readline
40 -all-readline: configure-readline
41 -       @r=`${PWD_COMMAND}`; export r; \
42 -       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
43 -       $(SET_LIB_PATH) \
44 -       $(HOST_EXPORTS) \
45 -       (cd readline && $(MAKE) $(FLAGS_TO_PASS)  \
46 -         $(TARGET-readline))
47 -@endif readline
48 +maybe-all-readline: ;
49  
50  .PHONY: check-readline maybe-check-readline
51 -maybe-check-readline:
52 -@if readline
53 -maybe-check-readline: check-readline
54 -
55 -check-readline:
56 -       @r=`${PWD_COMMAND}`; export r; \
57 -       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
58 -       $(SET_LIB_PATH) \
59 -       $(HOST_EXPORTS) \
60 -       (cd readline && $(MAKE) $(FLAGS_TO_PASS) check)
61 -
62 -@endif readline
63 +maybe-check-readline: ;
64  
65  .PHONY: install-readline maybe-install-readline
66 -maybe-install-readline:
67 -@if readline
68 -maybe-install-readline: install-readline
69 -
70 -install-readline: installdirs
71 -       @r=`${PWD_COMMAND}`; export r; \
72 -       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
73 -       $(SET_LIB_PATH) \
74 -       $(HOST_EXPORTS) \
75 -       (cd readline && $(MAKE) $(FLAGS_TO_PASS) install)
76 -
77 -@endif readline
78 +maybe-install-readline: ;
79  
80  # Other targets (info, dvi, etc.)
81  
82  .PHONY: maybe-info-readline info-readline
83 -maybe-info-readline:
84 -@if readline
85 -maybe-info-readline: info-readline
86 -
87 -info-readline: \
88 -    configure-readline 
89 -       @[ -f ./readline/Makefile ] || exit 0; \
90 -       r=`${PWD_COMMAND}`; export r; \
91 -       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
92 -       $(SET_LIB_PATH) \
93 -       $(HOST_EXPORTS) \
94 -       for flag in $(EXTRA_HOST_FLAGS) ; do \
95 -         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
96 -       done; \
97 -       echo "Doing info in readline" ; \
98 -       (cd readline && \
99 -         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
100 -                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
101 -                 "RANLIB=$${RANLIB}" \
102 -                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
103 -                 info) \
104 -         || exit 1
105 -
106 -@endif readline
107 +maybe-info-readline: ;
108  
109  .PHONY: maybe-dvi-readline dvi-readline
110 -maybe-dvi-readline:
111 -@if readline
112 -maybe-dvi-readline: dvi-readline
113 -
114 -dvi-readline: \
115 -    configure-readline 
116 -       @[ -f ./readline/Makefile ] || exit 0; \
117 -       r=`${PWD_COMMAND}`; export r; \
118 -       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
119 -       $(SET_LIB_PATH) \
120 -       $(HOST_EXPORTS) \
121 -       for flag in $(EXTRA_HOST_FLAGS) ; do \
122 -         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
123 -       done; \
124 -       echo "Doing dvi in readline" ; \
125 -       (cd readline && \
126 -         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
127 -                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
128 -                 "RANLIB=$${RANLIB}" \
129 -                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
130 -                 dvi) \
131 -         || exit 1
132 -
133 -@endif readline
134 +maybe-dvi-readline: ;
135  
136  .PHONY: maybe-TAGS-readline TAGS-readline
137 -maybe-TAGS-readline:
138 -@if readline
139 -maybe-TAGS-readline: TAGS-readline
140 -
141 -TAGS-readline: \
142 -    configure-readline 
143 -       @[ -f ./readline/Makefile ] || exit 0; \
144 -       r=`${PWD_COMMAND}`; export r; \
145 -       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
146 -       $(SET_LIB_PATH) \
147 -       $(HOST_EXPORTS) \
148 -       for flag in $(EXTRA_HOST_FLAGS) ; do \
149 -         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
150 -       done; \
151 -       echo "Doing TAGS in readline" ; \
152 -       (cd readline && \
153 -         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
154 -                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
155 -                 "RANLIB=$${RANLIB}" \
156 -                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
157 -                 TAGS) \
158 -         || exit 1
159 -
160 -@endif readline
161 +maybe-TAGS-readline: ;
162  
163  .PHONY: maybe-install-info-readline install-info-readline
164 -maybe-install-info-readline:
165 -@if readline
166 -maybe-install-info-readline: install-info-readline
167 -
168 -install-info-readline: \
169 -    configure-readline \
170 -    info-readline 
171 -       @[ -f ./readline/Makefile ] || exit 0; \
172 -       r=`${PWD_COMMAND}`; export r; \
173 -       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
174 -       $(SET_LIB_PATH) \
175 -       $(HOST_EXPORTS) \
176 -       for flag in $(EXTRA_HOST_FLAGS) ; do \
177 -         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
178 -       done; \
179 -       echo "Doing install-info in readline" ; \
180 -       (cd readline && \
181 -         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
182 -                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
183 -                 "RANLIB=$${RANLIB}" \
184 -                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
185 -                 install-info) \
186 -         || exit 1
187 -
188 -@endif readline
189 +maybe-install-info-readline: ;
190  
191  .PHONY: maybe-installcheck-readline installcheck-readline
192 -maybe-installcheck-readline:
193 -@if readline
194 -maybe-installcheck-readline: installcheck-readline
195 -
196 -installcheck-readline: \
197 -    configure-readline 
198 -       @[ -f ./readline/Makefile ] || exit 0; \
199 -       r=`${PWD_COMMAND}`; export r; \
200 -       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
201 -       $(SET_LIB_PATH) \
202 -       $(HOST_EXPORTS) \
203 -       for flag in $(EXTRA_HOST_FLAGS) ; do \
204 -         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
205 -       done; \
206 -       echo "Doing installcheck in readline" ; \
207 -       (cd readline && \
208 -         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
209 -                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
210 -                 "RANLIB=$${RANLIB}" \
211 -                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
212 -                 installcheck) \
213 -         || exit 1
214 -
215 -@endif readline
216 +maybe-installcheck-readline: ;
217  
218  .PHONY: maybe-mostlyclean-readline mostlyclean-readline
219 -maybe-mostlyclean-readline:
220 -@if readline
221 -maybe-mostlyclean-readline: mostlyclean-readline
222 -
223 -mostlyclean-readline: 
224 -       @[ -f ./readline/Makefile ] || exit 0; \
225 -       r=`${PWD_COMMAND}`; export r; \
226 -       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
227 -       $(SET_LIB_PATH) \
228 -       $(HOST_EXPORTS) \
229 -       for flag in $(EXTRA_HOST_FLAGS) ; do \
230 -         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
231 -       done; \
232 -       echo "Doing mostlyclean in readline" ; \
233 -       (cd readline && \
234 -         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
235 -                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
236 -                 "RANLIB=$${RANLIB}" \
237 -                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
238 -                 mostlyclean) \
239 -         || exit 1
240 -
241 -@endif readline
242 +maybe-mostlyclean-readline: ;
243  
244  .PHONY: maybe-clean-readline clean-readline
245 -maybe-clean-readline:
246 -@if readline
247 +maybe-clean-readline: ;
248 +@if readline-disabled
249  maybe-clean-readline: clean-readline
250  
251  clean-readline: 
252 @@ -15844,53 +15648,9 @@ clean-readline: 
253  
254  .PHONY: maybe-distclean-readline distclean-readline
255  maybe-distclean-readline:
256 -@if readline
257 -maybe-distclean-readline: distclean-readline
258 -
259 -distclean-readline: 
260 -       @[ -f ./readline/Makefile ] || exit 0; \
261 -       r=`${PWD_COMMAND}`; export r; \
262 -       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
263 -       $(SET_LIB_PATH) \
264 -       $(HOST_EXPORTS) \
265 -       for flag in $(EXTRA_HOST_FLAGS) ; do \
266 -         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
267 -       done; \
268 -       echo "Doing distclean in readline" ; \
269 -       (cd readline && \
270 -         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
271 -                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
272 -                 "RANLIB=$${RANLIB}" \
273 -                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
274 -                 distclean) \
275 -         || exit 1
276 -
277 -@endif readline
278  
279  .PHONY: maybe-maintainer-clean-readline maintainer-clean-readline
280 -maybe-maintainer-clean-readline:
281 -@if readline
282 -maybe-maintainer-clean-readline: maintainer-clean-readline
283 -
284 -maintainer-clean-readline: 
285 -       @[ -f ./readline/Makefile ] || exit 0; \
286 -       r=`${PWD_COMMAND}`; export r; \
287 -       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
288 -       $(SET_LIB_PATH) \
289 -       $(HOST_EXPORTS) \
290 -       for flag in $(EXTRA_HOST_FLAGS) ; do \
291 -         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
292 -       done; \
293 -       echo "Doing maintainer-clean in readline" ; \
294 -       (cd readline && \
295 -         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
296 -                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
297 -                 "RANLIB=$${RANLIB}" \
298 -                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
299 -                 maintainer-clean) \
300 -         || exit 1
301 -
302 -@endif readline
303 +maybe-maintainer-clean-readline: ;
304  
305  
306  .PHONY: configure-release maybe-configure-release
307 --- a/gdb/Makefile.in
308 +++ b/gdb/Makefile.in
309 @@ -121,10 +121,10 @@ BFD_SRC = $(srcdir)/$(BFD_DIR)
310  BFD_CFLAGS = -I$(BFD_DIR) -I$(BFD_SRC)
311  
312  # Where is the READLINE library?  Typically in ../readline.
313 -READLINE_DIR = ../readline
314 -READLINE = $(READLINE_DIR)/libreadline.a
315 +READLINE =
316  READLINE_SRC = $(srcdir)/$(READLINE_DIR)
317 -READLINE_CFLAGS = -I$(READLINE_SRC)/..
318 +READLINE_CFLAGS =
319 +READLINE_LDFLAGS = -lreadline
320  
321  WARN_CFLAGS = @WARN_CFLAGS@
322  WERROR_CFLAGS = @WERROR_CFLAGS@