summaryrefslogtreecommitdiffstats
path: root/meta/packages/gcc/gcc-4.3.1/debian/ada-link-lib.dpatch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/gcc/gcc-4.3.1/debian/ada-link-lib.dpatch')
-rw-r--r--meta/packages/gcc/gcc-4.3.1/debian/ada-link-lib.dpatch1932
1 files changed, 1932 insertions, 0 deletions
diff --git a/meta/packages/gcc/gcc-4.3.1/debian/ada-link-lib.dpatch b/meta/packages/gcc/gcc-4.3.1/debian/ada-link-lib.dpatch
new file mode 100644
index 0000000000..2645fe034e
--- /dev/null
+++ b/meta/packages/gcc/gcc-4.3.1/debian/ada-link-lib.dpatch
@@ -0,0 +1,1932 @@
1#! /bin/sh -e
2
3# DP: - Install the shared Ada libraries as '.so.1', not '.so' to conform
4# DP: to the Debian policy.
5# DP: - Don't include a runtime link path (-rpath), when linking binaries.
6# DP: - Build the shared libraries on hppa-linux.
7# DP: - Instead of building libada as a target library only, build it as
8# DP: both a host and, if different, target library.
9# DP: - Build the GNAT tools in their top-level directory; do not use
10# DP: recursive makefiles.
11# DP: - Link the GNAT tools dynamically.
12# DP: - Fix a bug in src/gnattools/configure.ac whereby a nonexistent version
13# DP: of indepsw's body was selected. Regenerate configure. (PR ada/27300)
14
15# This patch seems large, but the hunks in Makefile.in are actually
16# generated from Makefile.def using autogen.
17
18dir=./
19if [ $# -eq 3 -a "$2" = '-d' ]; then
20 pdir="-d $3"
21 dir="$3/"
22elif [ $# -ne 1 ]; then
23 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
24 exit 1
25fi
26case "$1" in
27 -patch)
28 patch $pdir -f --no-backup-if-mismatch -p0 < $0
29 cd ${dir} && autoconf
30 ;;
31 -unpatch)
32 patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
33 ;;
34 *)
35 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
36 exit 1
37esac
38exit 0
39
40Index: gcc/ada/config-lang.in
41===================================================================
42--- gcc/ada/config-lang.in.orig 2007-09-03 15:14:47.000000000 +0200
43+++ gcc/ada/config-lang.in 2008-01-29 12:16:44.688811730 +0100
44@@ -35,7 +35,7 @@
45 outputs=ada/Makefile
46
47 target_libs="target-libada"
48-lang_dirs="gnattools"
49+lang_dirs="libada gnattools"
50
51 # Ada will not work until the front end starts emitting GIMPLE trees.
52 build_by_default=no
53Index: gcc/ada/link.c
54===================================================================
55--- gcc/ada/link.c.orig 2007-11-21 12:20:42.000000000 +0100
56+++ gcc/ada/link.c 2008-01-29 12:16:44.688811730 +0100
57@@ -146,8 +146,8 @@
58
59 #elif defined (__FreeBSD__)
60 const char *__gnat_object_file_option = "";
61-const char *__gnat_run_path_option = "-Wl,-rpath,";
62-char __gnat_shared_libgnat_default = STATIC;
63+char *__gnat_run_path_option = "";
64+char __gnat_shared_libgnat_default = SHARED;
65 int __gnat_link_max = 8192;
66 unsigned char __gnat_objlist_file_supported = 1;
67 unsigned char __gnat_using_gnu_linker = 1;
68@@ -155,8 +155,8 @@
69
70 #elif defined (linux)
71 const char *__gnat_object_file_option = "";
72-const char *__gnat_run_path_option = "-Wl,-rpath,";
73-char __gnat_shared_libgnat_default = STATIC;
74+const char *__gnat_run_path_option = "";
75+char __gnat_shared_libgnat_default = SHARED;
76 int __gnat_link_max = 8192;
77 unsigned char __gnat_objlist_file_supported = 1;
78 unsigned char __gnat_using_gnu_linker = 1;
79Index: gcc/ada/Makefile.in
80===================================================================
81--- gcc/ada/Makefile.in.orig 2008-01-29 12:10:06.222766372 +0100
82+++ gcc/ada/Makefile.in 2008-01-29 12:17:55.465175005 +0100
83@@ -114,7 +114,7 @@
84 MAKEINFO = makeinfo
85 TEXI2DVI = texi2dvi
86 TEXI2PDF = texi2pdf
87-GNATBIND_FLAGS = -static -x
88+GNATBIND_FLAGS = -shared -x
89 ADA_CFLAGS =
90 ADAFLAGS = -W -Wall -gnatpg -gnata
91 SOME_ADAFLAGS =-gnata
92@@ -247,7 +247,6 @@
93 LIBDEPS = $(LIBINTL_DEP) $(LIBIBERTY)
94 # Default is no TGT_LIB; one might be passed down or something
95 TGT_LIB =
96-TOOLS_LIBS = $(EXTRA_GNATTOOLS_OBJS) targext.o link.o $(LIBGNAT) ../../../libiberty/libiberty.a $(SYSLIBS) $(TGT_LIB)
97
98 # Specify the directories to be searched for header files.
99 # Both . and srcdir are used, in that order,
100@@ -293,30 +292,6 @@
101 # defined in this file into the environment.
102 .NOEXPORT:
103
104-# Lists of files for various purposes.
105-
106-GNATLINK_OBJS = gnatlink.o \
107- a-except.o ali.o alloc.o butil.o casing.o csets.o debug.o fmap.o fname.o \
108- gnatvsn.o hostparm.o indepsw.o interfac.o i-c.o i-cstrin.o namet.o opt.o \
109- osint.o output.o rident.o s-exctab.o s-secsta.o s-stalib.o s-stoele.o \
110- sdefault.o snames.o stylesw.o switch.o system.o table.o targparm.o tree_io.o \
111- types.o validsw.o widechar.o
112-
113-GNATMAKE_OBJS = a-except.o ali.o ali-util.o s-casuti.o \
114- alloc.o atree.o binderr.o butil.o casing.o csets.o debug.o elists.o einfo.o\
115- erroutc.o errutil.o err_vars.o fmap.o fname.o fname-uf.o fname-sf.o \
116- gnatmake.o gnatvsn.o hostparm.o interfac.o i-c.o i-cstrin.o krunch.o lib.o \
117- make.o makeusg.o makeutl.o mlib.o mlib-fil.o mlib-prj.o mlib-tgt.o \
118- mlib-tgt-specific.o mlib-utl.o namet.o nlists.o opt.o osint.o osint-m.o output.o \
119- prj.o prj-attr.o prj-attr-pm.o prj-com.o prj-dect.o prj-env.o prj-err.o prj-ext.o prj-nmsc.o \
120- prj-pars.o prj-part.o prj-proc.o prj-strt.o prj-tree.o prj-util.o \
121- rident.o s-exctab.o s-secsta.o s-stalib.o s-stoele.o \
122- scans.o scng.o sdefault.o sfn_scan.o s-purexc.o s-htable.o \
123- sinfo.o sinput.o sinput-c.o sinput-p.o \
124- snames.o stand.o stringt.o styleg.o stylesw.o system.o validsw.o switch.o switch-m.o \
125- table.o targparm.o tempdir.o tree_io.o types.o \
126- uintp.o uname.o urealp.o usage.o widechar.o \
127- $(EXTRA_GNATMAKE_OBJS)
128
129 # Convert the target variable into a space separated list of architecture,
130 # manufacturer, and operating system and assign each of those to its own
131@@ -1017,6 +992,11 @@
132 GMEM_LIB = gmemlib
133 endif
134
135+ifeq ($(strip $(filter-out hppa% unknown linux gnu,$(targ))),)
136+ GNATLIB_SHARED = gnatlib-shared-dual
137+ LIBRARY_VERSION := $(LIB_VERSION)
138+endif
139+
140 ifeq ($(strip $(filter-out hppa% hp hpux10%,$(targ))),)
141 LIBGNAT_TARGET_PAIRS = \
142 a-excpol.adb<a-excpol-abort.adb \
143@@ -1666,128 +1646,6 @@
144 a-[a-o]*.adb a-[p-z]*.adb a-[a-o]*.ads a-[p-z]*.ads g-*.ad? i-*.ad? \
145 s-[a-o]*.adb s-[p-z]*.adb s-[a-o]*.ads s-[p-z]*.ads
146
147-LIBGNAT=../rts/libgnat.a
148-
149-GCC_LINK=$(CC) -static-libgcc $(ADA_INCLUDES)
150-
151-# when compiling the tools, the runtime has to be first on the path so that
152-# it hides the runtime files lying with the rest of the sources
153-ifeq ($(TOOLSCASE),native)
154- vpath %.ads ../rts ../
155- vpath %.adb ../rts ../
156- vpath %.c ../rts ../
157- vpath %.h ../rts ../
158-endif
159-
160-# in the cross tools case, everything is compiled with the native
161-# gnatmake/link. Therefore only -I needs to be modified in ADA_INCLUDES
162-ifeq ($(TOOLSCASE),cross)
163- vpath %.ads ../
164- vpath %.adb ../
165- vpath %.c ../
166- vpath %.h ../
167-endif
168-
169-../../gnatchop$(exeext):
170- $(GNATMAKE) -c $(ADA_INCLUDES) gnatchop --GCC="$(CC) $(ALL_ADAFLAGS)"
171- $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatchop
172- $(GNATLINK) -v gnatchop -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
173-
174-../../gnat$(exeext):
175- $(GNATMAKE) -c $(ADA_INCLUDES) gnatcmd --GCC="$(CC) $(ALL_ADAFLAGS)"
176- $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatcmd
177- $(GNATLINK) -v gnatcmd -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
178-
179-../../gnatkr$(exeext):
180- $(GNATMAKE) -c $(ADA_INCLUDES) gnatkr --GCC="$(CC) $(ALL_ADAFLAGS)"
181- $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatkr
182- $(GNATLINK) -v gnatkr -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
183-
184-../../gnatls$(exeext):
185- $(GNATMAKE) -c $(ADA_INCLUDES) gnatls --GCC="$(CC) $(ALL_ADAFLAGS)"
186- $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatls
187- $(GNATLINK) -v gnatls -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
188-
189-../../gnatname$(exeext):
190- $(GNATMAKE) -c $(ADA_INCLUDES) gnatname --GCC="$(CC) $(ALL_ADAFLAGS)"
191- $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatname
192- $(GNATLINK) -v gnatname -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
193-
194-../../gprmake$(exeext):
195- $(GNATMAKE) -c $(ADA_INCLUDES) gprmake --GCC="$(CC) $(ALL_ADAFLAGS)"
196- $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gprmake
197- $(GNATLINK) -v gprmake -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
198-
199-../../gnatprep$(exeext):
200- $(GNATMAKE) -c $(ADA_INCLUDES) gnatprep --GCC="$(CC) $(ALL_ADAFLAGS)"
201- $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatprep
202- $(GNATLINK) -v gnatprep -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
203-
204-../../gnatxref$(exeext):
205- $(GNATMAKE) -c $(ADA_INCLUDES) gnatxref --GCC="$(CC) $(ALL_ADAFLAGS)"
206- $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatxref
207- $(GNATLINK) -v gnatxref -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
208-
209-../../gnatfind$(exeext):
210- $(GNATMAKE) -c $(ADA_INCLUDES) gnatfind --GCC="$(CC) $(ALL_ADAFLAGS)"
211- $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatfind
212- $(GNATLINK) -v gnatfind -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
213-
214-../../gnatclean$(exeext):
215- $(GNATMAKE) -c $(ADA_INCLUDES) gnatclean --GCC="$(CC) $(ALL_ADAFLAGS)"
216- $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatclean
217- $(GNATLINK) -v gnatclean -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
218-
219-../../gnatsym$(exeext):
220- $(GNATMAKE) -c $(ADA_INCLUDES) gnatsym --GCC="$(CC) $(ALL_ADAFLAGS)"
221- $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatsym
222- $(GNATLINK) -v gnatsym -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
223-
224-../../gnatdll$(exeext):
225- $(GNATMAKE) -c $(ADA_INCLUDES) gnatdll --GCC="$(CC) $(ALL_ADAFLAGS)"
226- $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) $(GNATBIND_FLAGS) gnatdll
227- $(GNATLINK) -v gnatdll -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
228-
229-../../vxaddr2line$(exeext): targext.o
230- $(GNATMAKE) -c $(ADA_INCLUDES) vxaddr2line --GCC="$(CC) $(ALL_ADAFLAGS)"
231- $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) vxaddr2line
232- $(GNATLINK) -v vxaddr2line -o $@ --GCC="$(GCC_LINK)" targext.o $(CLIB)
233-
234-gnatmake-re: link.o targext.o
235- $(GNATMAKE) $(ADA_INCLUDES) -u sdefault --GCC="$(CC) $(MOST_ADA_FLAGS)"
236- $(GNATMAKE) -c $(ADA_INCLUDES) gnatmake --GCC="$(CC) $(ALL_ADAFLAGS)"
237- $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatmake
238- $(GNATLINK) -v gnatmake -o ../../gnatmake$(exeext) \
239- --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
240-
241-# Note the use of the "mv" command in order to allow gnatlink to be linked with
242-# with the former version of gnatlink itself which cannot override itself.
243-gnatlink-re: link.o targext.o
244- $(GNATMAKE) -c $(ADA_INCLUDES) gnatlink --GCC="$(CC) $(ALL_ADAFLAGS)"
245- $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlink
246- $(GNATLINK) -v gnatlink -o ../../gnatlinknew$(exeext) \
247- --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
248- $(MV) ../../gnatlinknew$(exeext) ../../gnatlink$(exeext)
249-
250-# Needs to be built with CC=gcc
251-# Since the RTL should be built with the latest compiler, remove the
252-# stamp target in the parent directory whenever gnat1 is rebuilt
253-
254-# Likewise for the tools
255-../../gnatmake$(exeext): $(P) b_gnatm.o link.o targext.o $(GNATMAKE_OBJS)
256- $(GCC_LINK) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatm.o $(GNATMAKE_OBJS) \
257- $(TOOLS_LIBS)
258-
259-../../gnatlink$(exeext): $(P) b_gnatl.o link.o targext.o $(GNATLINK_OBJS)
260- $(GCC_LINK) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatl.o $(GNATLINK_OBJS) \
261- $(TOOLS_LIBS)
262-
263-../../gnatbl$(exeext): gnatbl.o
264- $(GCC_LINK) -o $@ $(ALL_CFLAGS) $(LDFLAGS) gnatbl.o $(TOOLS_LIBS)
265-
266-gnatbl.o: gnatbl.c adaint.h
267- $(CC) $(ALL_CFLAGS) $(INCLUDES) -c $< $(OUTPUT_OPTION)
268-
269 ../stamp-gnatlib:
270 @if [ ! -f stamp-gnatlib ] ; \
271 then \
272@@ -1823,12 +1681,10 @@
273 # permission is required.
274 for file in gnat gnarl; do \
275 if [ -f rts/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) ]; then \
276- $(INSTALL) rts/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
277+ $(INSTALL) rts/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext).1 \
278 $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
279- fi; \
280- if [ -f rts/lib$${file}$(soext) ]; then \
281- $(LN_S) lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
282- $(DESTDIR)$(ADA_RTL_OBJ_DIR)/lib$${file}$(soext); \
283+ $(LN_S) lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext).1 \
284+ $(DESTDIR)$(ADA_RTL_OBJ_DIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext); \
285 fi; \
286 done
287 # This copy must be done preserving the date on the original file.
288@@ -1838,18 +1694,6 @@
289 cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.adb
290 cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.ads
291
292-../stamp-gnatlib2:
293- $(RM) rts/s-*.ali
294- $(RM) rts/s-*$(objext)
295- $(RM) rts/a-*.ali
296- $(RM) rts/a-*$(objext)
297- $(RM) rts/*.ali
298- $(RM) rts/*$(objext)
299- $(RM) rts/*$(arext)
300- $(RM) rts/*$(soext)
301- touch ../stamp-gnatlib2
302- $(RM) ../stamp-gnatlib
303-
304 # NOTE: The $(foreach ...) commands assume ";" is the valid separator between
305 # successive target commands. Although the Gnu make documentation
306 # implies this is true on all systems, I suspect it may not be, So care
307@@ -1859,7 +1703,7 @@
308
309 # GNULLI Begin ###########################################################
310
311-../stamp-gnatlib1: Makefile ../stamp-gnatlib2
312+../stamp-gnatlib1: Makefile
313 $(RMDIR) rts
314 $(MKDIR) rts
315 $(CHMOD) u+w rts
316@@ -1885,7 +1729,7 @@
317 # Example: cd rts; ar rc libfoo.a $(LONG_LIST_OF_OBJS)
318 # is guaranteed to overflow the buffer.
319
320-gnatlib: ../stamp-gnatlib1 ../stamp-gnatlib2
321+gnatlib: ../stamp-gnatlib1
322 $(MAKE) -C rts \
323 CC="`echo \"$(GCC_FOR_TARGET)\" \
324 | sed -e 's,^\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \
325@@ -1924,64 +1768,75 @@
326 rts/memtrack.o
327 $(RANLIB_FOR_TARGET) rts/libgmem$(arext)
328 endif
329- $(CHMOD) a-wx rts/*.ali
330 touch ../stamp-gnatlib
331
332 # Warning: this target assumes that LIBRARY_VERSION has been set correctly.
333-gnatlib-shared-default:
334- $(MAKE) $(FLAGS_TO_PASS) \
335- GNATLIBFLAGS="$(GNATLIBFLAGS)" \
336- GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
337- THREAD_KIND="$(THREAD_KIND)" \
338- gnatlib
339- $(RM) rts/libgna*$(soext)
340+gnatlib-shared-default: ../stamp-gnatlib1
341+ $(MAKE) -C rts \
342+ CC="`echo \"$(GCC_FOR_TARGET)\" \
343+ | sed -e 's,^\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \
344+ INCLUDES="$(INCLUDES_FOR_SUBDIR) -I./../.." \
345+ CFLAGS="$(GNATLIBCFLAGS_FOR_C)" \
346+ srcdir=$(fsrcdir) \
347+ -f ../Makefile $(LIBGNAT_OBJS)
348+ $(MAKE) -C rts \
349+ CC="`echo \"$(GCC_FOR_TARGET)\" \
350+ | sed -e 's,^\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \
351+ ADA_INCLUDES="" \
352+ CFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
353+ ADAFLAGS="$(GNATLIBFLAGS)" \
354+ THREAD_KIND="$(THREAD_KIND)" \
355+ srcdir=$(fsrcdir) \
356+ -f ../Makefile \
357+ $(GNATRTL_OBJS)
358+ $(RM) rts/libgna*$(soext) rts/libgna*$(soext).1
359 cd rts; ../../xgcc -B../../ -shared $(GNATLIBCFLAGS) \
360 $(TARGET_LIBGCC2_CFLAGS) \
361- -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
362+ -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext).1 \
363 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
364 g-trasym.o convert_addresses.o \
365- $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
366+ $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext).1 \
367 $(MISCLIB) -lm
368 cd rts; ../../xgcc -B../../ -shared $(GNATLIBCFLAGS) \
369 $(TARGET_LIBGCC2_CFLAGS) \
370- -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
371+ -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext).1 \
372 $(GNATRTL_TASKING_OBJS) \
373- $(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
374+ $(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext).1 \
375 $(THREADSLIB)
376- cd rts; $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
377- libgnat$(soext)
378- cd rts; $(LN_S) libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
379- libgnarl$(soext)
380+ cd rts; for lib in gnat gnarl; do \
381+ l=lib$${lib}$(hyphen)$(LIBRARY_VERSION)$(soext); \
382+ $(LN_S) $$l.1 $$l; \
383+ done
384+# Delete the object files, lest they be linked statically into the tools
385+# executables. Only the .ali, .a and .so files must remain.
386+ rm -f rts/*.o
387+ $(CHMOD) a-wx rts/*.ali
388
389 gnatlib-shared-dual:
390 $(MAKE) $(FLAGS_TO_PASS) \
391 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
392 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
393 THREAD_KIND="$(THREAD_KIND)" \
394- gnatlib-shared-default
395- $(MV) rts/libgna*$(soext) .
396- $(RM) ../stamp-gnatlib2
397+ gnatlib
398+ $(RM) rts/*.o rts/*.ali
399 $(MAKE) $(FLAGS_TO_PASS) \
400 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
401 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
402 THREAD_KIND="$(THREAD_KIND)" \
403- gnatlib
404- $(MV) libgna*$(soext) rts
405+ gnatlib-shared-default
406
407 gnatlib-shared-dual-win32:
408 $(MAKE) $(FLAGS_TO_PASS) \
409 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
410- GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
411+ GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
412 THREAD_KIND="$(THREAD_KIND)" \
413- gnatlib-shared-win32
414- $(MV) rts/libgna*$(soext) .
415- $(RM) ../stamp-gnatlib2
416+ gnatlib
417+ $(RM) rts/*.o rts/*.ali
418 $(MAKE) $(FLAGS_TO_PASS) \
419 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
420- GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
421+ GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
422 THREAD_KIND="$(THREAD_KIND)" \
423- gnatlib
424- $(MV) libgna*$(soext) rts
425+ gnatlib-shared-win32
426
427 # ??? we need to add the option to support auto-import of arrays/records to
428 # the GNATLIBFLAGS when this will be supported by GNAT. At this point we will
429@@ -2090,22 +1945,6 @@
430 gnat-cross: force
431 make $(GNAT1_ADA_OBJS) CC="gcc -B../stage1/" CFLAGS="-S -gnatp"
432
433-# Compiling object files from source files.
434-
435-# Note that dependencies on obstack.h are not written
436-# because that file is not part of GCC.
437-# Dependencies on gvarargs.h are not written
438-# because all that file does, when not compiling with GCC,
439-# is include the system varargs.h.
440-
441-b_gnatl.c : $(GNATLINK_OBJS)
442- $(GNATBIND) -C $(ADA_INCLUDES) -o b_gnatl.c gnatlink.ali
443-b_gnatl.o : b_gnatl.c
444-
445-b_gnatm.c : $(GNATMAKE_OBJS)
446- $(GNATBIND) -C $(ADA_INCLUDES) -o b_gnatm.c gnatmake.ali
447-b_gnatm.o : b_gnatm.c
448-
449 ADA_INCLUDE_DIR = $(libsubdir)/adainclude
450 ADA_RTL_OBJ_DIR = $(libsubdir)/adalib
451
452@@ -2225,19 +2064,3 @@
453 .PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4
454
455 force:
456-
457-# Gnatlbr, Vms_help, and Gnat.hlp are only used on VMS
458-
459-../../gnatlbr$(exeext): ../../prefix.o
460- $(GNATMAKE) -c $(ADA_INCLUDES) gnatlbr --GCC="$(CC) $(ALL_ADAFLAGS)"
461- $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlbr
462- $(GNATLINK) -v gnatlbr -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
463-
464-../../vms_help$(exeext):
465- $(GNATMAKE) -c $(ADA_INCLUDES) vms_help --GCC="$(CC) $(ALL_ADAFLAGS)"
466- $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) vms_help
467- $(GNATLINK) -v vms_help -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
468-
469-../../gnat.hlp: ../../vms_help$(exeext)
470- ../../vms_help$(exeext) $(fsrcdir)/gnat.help_in \
471- $(fsrcdir)/vms_data.ads ../../gnat.hlp
472Index: gnattools/Makefile.in
473===================================================================
474--- gnattools/Makefile.in.orig 2007-07-05 10:19:48.000000000 +0200
475+++ gnattools/Makefile.in 2008-01-29 12:16:44.696811771 +0100
476@@ -18,6 +18,8 @@
477 # Default target; must be first.
478 all: gnattools
479
480+.SUFFIXES:
481+
482 # Standard autoconf-set variables.
483 SHELL = @SHELL@
484 srcdir = @srcdir@
485@@ -32,112 +34,16 @@
486 LN_S=@LN_S@
487 target_noncanonical=@target_noncanonical@
488
489-# Variables for the user (or the top level) to override.
490-objext=.o
491-TRACE=no
492-ADA_FOR_BUILD=
493-ADA_FOR_TARGET=
494-LDFLAGS=
495-PWD_COMMAND = $${PWDCMD-pwd}
496-
497-# The tedious process of getting CFLAGS right.
498-CFLAGS=-g
499-LOOSE_WARN = -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
500-GCC_WARN_CFLAGS = $(LOOSE_WARN) $(NOCOMMON_FLAG)
501-
502-ADA_CFLAGS=
503-T_ADA_CFLAGS=
504-# HPPA is literally the only target which sets X_ADA_CFLAGS
505-X_ADA_CFLAGS=@x_ada_cflags@
506-ALL_ADA_CFLAGS=$(X_ADA_CFLAGS) $(T_ADA_CFLAGS) $(ADA_CFLAGS)
507-
508-# Variables for gnattools.
509-ADAFLAGS= -gnatpg -gnata
510-ADA_INCLUDE_DIR = $(libsubdir)/adainclude
511-ADA_RTL_OBJ_DIR = $(libsubdir)/adalib
512-
513-# For finding the GCC build dir, which is used far too much
514-GCC_DIR=../gcc
515-# Include fragment generated by GCC configure; shared with libada for now.
516-include $(GCC_DIR)/libada-mk
517-# Variables based on those gleaned from the GCC makefile. :-P
518-libsubdir=$(libdir)/gcc/$(target_noncanonical)/$(gcc_version)
519-
520-# Get possible host-specific override for libsubdir (ick).
521-xmake_file=$(subst /config,/../gcc/config,$(gcc_xmake_file))
522-ifneq ($(xmake_file),)
523-include $(xmake_file)
524-endif
525-
526-# Absolute srcdir for gcc/ada (why do we want absolute? I dunno)
527-fsrcdir := $(shell cd $(srcdir)/../gcc/ada/; ${PWD_COMMAND})
528-
529-# Useful "subroutines" for the excess includes
530-INCLUDES_FOR_SUBDIR = -I. -I.. -I../.. -I$(fsrcdir) -I$(fsrcdir)/../config \
531- -I$(fsrcdir)/../../include -I$(fsrcdir)/..
532-ADA_INCLUDES_FOR_SUBDIR = -I. -I$(fsrcdir)
533-
534-# Variables for gnattools1, native
535-TOOLS_FLAGS_TO_PASS_1= \
536- "CC=../../xgcc -B../../" \
537- "CFLAGS=$(CFLAGS) $(WARN_CFLAGS)" \
538- "LDFLAGS=$(LDFLAGS)" \
539- "ADAFLAGS=$(ADAFLAGS)" \
540- "INCLUDES=$(INCLUDES_FOR_SUBDIR)" \
541- "ADA_INCLUDES=-I- -I../rts $(ADA_INCLUDES_FOR_SUBDIR)"\
542- "exeext=$(exeext)" \
543- "fsrcdir=$(fsrcdir)" \
544- "srcdir=$(fsrcdir)" \
545- "GNATBIND=../../gnatbind" \
546- "TOOLSCASE=native"
547-
548-# Variables for regnattools
549-TOOLS_FLAGS_TO_PASS_1re= \
550- "CC=../../xgcc -B../../" \
551- "CFLAGS=$(CFLAGS)" \
552- "ADAFLAGS=$(ADAFLAGS)" \
553- "INCLUDES=$(INCLUDES_FOR_SUBDIR)" \
554- "ADA_INCLUDES=-I../rts $(ADA_INCLUDES_FOR_SUBDIR)"\
555- "exeext=$(exeext)" \
556- "fsrcdir=$(fsrcdir)" \
557- "srcdir=$(fsrcdir)" \
558- "GNATMAKE=../../gnatmake" \
559- "GNATLINK=../../gnatlink" \
560- "GNATBIND=../../gnatbind" \
561- "TOOLSCASE=cross" \
562- "INCLUDES="
563-
564-# Variables for gnattools2, native
565-TOOLS_FLAGS_TO_PASS_NATIVE= \
566- "CC=../../xgcc -B../../" \
567- "CFLAGS=$(CFLAGS)" \
568- "ADAFLAGS=$(ADAFLAGS)" \
569- "INCLUDES=$(INCLUDES_FOR_SUBDIR)" \
570- "ADA_INCLUDES=-I../rts $(ADA_INCLUDES_FOR_SUBDIR)" \
571- "exeext=$(exeext)" \
572- "fsrcdir=$(fsrcdir)" \
573- "srcdir=$(fsrcdir)" \
574- "GNATMAKE=../../gnatmake" \
575- "GNATLINK=../../gnatlink" \
576- "GNATBIND=../../gnatbind" \
577- "TOOLSCASE=native"
578-
579-# Variables for gnattools, cross
580-TOOLS_FLAGS_TO_PASS_CROSS= \
581- "CC=$(CC)" \
582- "CFLAGS=$(CFLAGS) $(WARN_CFLAGS)" \
583- "LDFLAGS=$(LDFLAGS)" \
584- "ADAFLAGS=$(ADAFLAGS)" \
585- "INCLUDES=$(INCLUDES_FOR_SUBDIR)" \
586- "ADA_INCLUDES=-I$(RTS_DIR)../adainclude -I$(RTS_DIR) $(ADA_INCLUDES_FOR_SUBDIR)" \
587- "exeext=$(exeext)" \
588- "fsrcdir=$(fsrcdir)" \
589- "srcdir=$(fsrcdir)" \
590- "GNATMAKE=gnatmake" \
591- "GNATLINK=gnatlink" \
592- "GNATBIND=gnatbind" \
593- "TOOLSCASE=cross" \
594- "LIBGNAT="
595+CFLAGS=-O2 -Wall
596+INCLUDES = -I@srcdir@/../gcc/ada -I@srcdir@/../gcc
597+ADA_CFLAGS=-O2 -gnatn
598+ADA_INCLUDES=-nostdinc -I- -I. -I../gcc/ada/rts -I@srcdir@/../gcc/ada
599+LIB_VERSION=$(strip $(shell grep ' Library_Version :' \
600+ @srcdir@/../gcc/ada/gnatvsn.ads | sed -e 's/.*"\(.*\)".*/\1/'))
601+ADA_LIBS := -L../gcc/ada/rts -lgnat-$(LIB_VERSION)
602+
603+# We will use the just-built compiler to compile and link everything.
604+GCC=../gcc/xgcc -B../gcc/
605
606 # File lists
607 # ----------
608@@ -146,17 +52,136 @@
609 EXTRA_GNATTOOLS = @EXTRA_GNATTOOLS@
610 TOOLS_TARGET_PAIRS = @TOOLS_TARGET_PAIRS@
611
612-# These are built by gnatmake, and in both native and cross configurations.
613-GNATTOOLS2_FILES = \
614- ../../gnatchop$(exeext) \
615- ../../gnat$(exeext) \
616- ../../gnatkr$(exeext) \
617- ../../gnatls$(exeext) \
618- ../../gnatprep$(exeext) \
619- ../../gnatxref$(exeext) \
620- ../../gnatfind$(exeext) \
621- ../../gnatname$(exeext) \
622- ../../gnatclean$(exeext)
623+# Stage 1 builds xgcc and gnatbind; we can use them to build
624+# gnatmake-static and gnatlink-static, then use gnatmake-static and
625+# gnatlink-static to build the other tools. The reason we first build
626+# statically-linked versions of gnatmake and gnatlink is so we can run
627+# them with confidence on all build platforms, without LD_LIBRARY_PATH
628+# or some such variable.
629+
630+# The tools we will build using gnatmake-static and gnatlink-static.
631+TOOLS := gnat gnatbind gnatchop gnatclean gnatfind gnatkr gnatls gnatlink
632+TOOLS += gnatmake gnatname gnatprep gnatxref gprmake
633+
634+# Since we don't have gnatmake, we must specify the full list of
635+# object files necessary to build gnatmake and gnatlink.
636+# TODO: remove from these lists the objects that are part of
637+# libgnatvsn and libgnatprj.
638+GNATLINK_OBJS = \
639+ali.o \
640+alloc.o \
641+butil.o \
642+casing.o \
643+csets.o \
644+debug.o \
645+fmap.o \
646+fname.o \
647+gnatlink.o \
648+gnatvsn.o \
649+hostparm.o \
650+indepsw.o \
651+namet.o \
652+opt.o \
653+osint.o \
654+output.o \
655+prefix.o \
656+rident.o \
657+sdefault.o \
658+snames.o \
659+stylesw.o \
660+switch.o \
661+table.o \
662+targparm.o \
663+tree_io.o \
664+types.o \
665+validsw.o \
666+version.o \
667+widechar.o
668+
669+GNATMAKE_OBJS = \
670+ali-util.o \
671+ali.o \
672+alloc.o \
673+atree.o \
674+binderr.o \
675+butil.o \
676+casing.o \
677+csets.o \
678+debug.o \
679+einfo.o\
680+elists.o \
681+err_vars.o \
682+erroutc.o \
683+errutil.o \
684+fmap.o \
685+fname-sf.o \
686+fname-uf.o \
687+fname.o \
688+gnatmake.o \
689+gnatvsn.o \
690+hostparm.o \
691+krunch.o \
692+lib.o \
693+make.o \
694+makeusg.o \
695+makeutl.o \
696+mlib-fil.o \
697+mlib-prj.o \
698+mlib-tgt.o \
699+mlib-tgt-specific.o \
700+mlib-utl.o \
701+mlib.o \
702+namet.o \
703+nlists.o \
704+opt.o \
705+osint-m.o \
706+osint.o \
707+output.o \
708+prefix.o \
709+prj-attr-pm.o \
710+prj-attr.o \
711+prj-com.o \
712+prj-dect.o \
713+prj-env.o \
714+prj-err.o \
715+prj-ext.o \
716+prj-nmsc.o \
717+prj-pars.o \
718+prj-part.o \
719+prj-proc.o \
720+prj-strt.o \
721+prj-tree.o \
722+prj-util.o \
723+prj.o \
724+rident.o \
725+scans.o \
726+scng.o \
727+sdefault.o \
728+sfn_scan.o \
729+sinfo.o \
730+sinput-c.o \
731+sinput-p.o \
732+sinput.o \
733+snames.o \
734+stand.o \
735+stringt.o \
736+styleg.o \
737+stylesw.o \
738+switch-m.o \
739+switch.o \
740+table.o \
741+targparm.o \
742+tempdir.o \
743+tree_io.o \
744+types.o \
745+uintp.o \
746+uname.o \
747+urealp.o \
748+usage.o \
749+validsw.o \
750+version.o \
751+widechar.o \
752+$(EXTRA_GNATMAKE_OBJS)
753
754 # Makefile targets
755 # ----------------
756@@ -164,126 +189,106 @@
757 .PHONY: gnattools gnattools-native gnattools-cross regnattools
758 gnattools: @default_gnattools_target@
759
760-# Sanity check
761-$(GCC_DIR)/stamp-gnatlib:
762- @if [ ! -f $(GCC_DIR)/stamp-gnatlib ] ; \
763- then \
764- echo "Cannot build gnattools while gnatlib is out of date or unbuilt" ; \
765- false; \
766- else \
767- true; \
768- fi
769-
770-
771 # Build directory for the tools. Let's copy the target-dependent
772 # sources using the same mechanism as for gnatlib. The other sources are
773-# accessed using the vpath directive in ada/Makefile.in
774+# accessed using the vpath directive.
775+
776+stamp-gnattools-sources:
777+ $(LN_S) ../gcc/ada/sdefault.adb .
778+ $(foreach PAIR,$(TOOLS_TARGET_PAIRS), \
779+ rm -f $(word 1,$(subst <, ,$(PAIR)));\
780+ $(LN_S) @srcdir@/../gcc/ada/$(word 2,$(subst <, ,$(PAIR))) \
781+ $(word 1,$(subst <, ,$(PAIR)));)
782+ touch $@
783+
784+gnattools-native: ../gcc/ada/rts/libgnat-$(LIB_VERSION).so
785+gnattools-native: stamp-gnattools-sources
786+gnattools-native: $(TOOLS) gnatbl
787+
788+$(TOOLS) gnatcmd: | gnatmake-static gnatlink-static
789+
790+vpath %.c @srcdir@/../gcc/ada:@srcdir@/../gcc
791+vpath %.h @srcdir@/../gcc/ada
792+vpath %.adb .:@srcdir@/../gcc/ada
793+vpath %.ads @srcdir@/../gcc/ada
794+
795+# Because the just-built gcc is a host tool like us, we can use some
796+# of its object files, e.g. prefix.o and version.o.
797+vpath prefix.o ../gcc
798+vpath version.o ../gcc
799+
800+# gnatlink
801+
802+gnatlink-static: $(GNATLINK_OBJS) b_gnatl.o link.o
803+ $(GCC) -o $@ $^ \
804+ ../gcc/ada/rts/libgnat.a \
805+ ../libiberty/libiberty.a
806+
807+gnatlink: $(GNATLINK_OBJS) b_gnatl.o link.o
808+ $(GCC) -o $@ $^ $(ADA_LIBS) ../libiberty/libiberty.a
809+
810+b_gnatl.o: b_gnatl.c adaint.h
811+ $(GCC) -c -o $@ $(CFLAGS) $<
812+
813+b_gnatl.c: $(GNATLINK_OBJS)
814+ ../gcc/gnatbind -C -o $@ $(ADA_INCLUDES) gnatlink.ali
815+
816+# gnatmake
817+
818+gnatmake-static: $(GNATMAKE_OBJS) b_gnatm.o link.o
819+ $(GCC) -o $@ $(ADA_CFLAGS) $^ \
820+ ../gcc/ada/rts/libgnat.a \
821+ ../libiberty/libiberty.a
822+
823+gnatmake: $(GNATMAKE_OBJS) b_gnatm.o link.o
824+ $(GCC) -o $@ $(ADA_CFLAGS) $^ $(ADA_LIBS) ../libiberty/libiberty.a
825+
826+b_gnatm.o: b_gnatm.c adaint.h
827+ $(GCC) -c -o $@ $(CFLAGS) $<
828+
829+b_gnatm.c: $(GNATMAKE_OBJS) adaint.h
830+ ../gcc/gnatbind -C -o $@ $(ADA_INCLUDES) gnatmake.ali
831+
832+# Other tools
833+gnatkr: version.o
834+ ./gnatmake-static -c -b $@ $(ADA_CFLAGS) $(ADA_INCLUDES) \
835+ --GCC="$(GCC)" \
836+ --GNATBIND=../gcc/gnatbind
837+ ./gnatlink-static -o $@ $@.ali $^ $(ADA_INCLUDES) $(ADA_LIBS) \
838+ --GCC="$(GCC) $(ADA_INCLUDES)"
839+
840+gnat: gnatcmd
841+ cp -lp $< $@
842+
843+gnatbind gnatchop gnatclean gnatcmd gnatfind gnatls gnatname gnatprep gnatxref gprmake: \
844+link.o version.o prefix.o
845+ ./gnatmake-static -c -b $@ $(ADA_CFLAGS) $(ADA_INCLUDES) \
846+ --GCC="$(GCC)" \
847+ --GNATBIND=../gcc/gnatbind
848+ ./gnatlink-static -o $@ $@.ali $^ $(ADA_INCLUDES) $(ADA_LIBS) \
849+ ../libiberty/libiberty.a \
850+ --GCC="$(GCC) $(ADA_INCLUDES)"
851+
852+gnatbl: gnatbl.c link.o version.o prefix.o
853+ $(GCC) -o $@ $< $(CFLAGS) \
854+ -I../gcc -I@srcdir@/../gcc/config -I@srcdir@/../gcc \
855+ -I@srcdir@/../include \
856+ $(filter-out %.c,$^) \
857+ $(ADA_LIBS) ../libiberty/libiberty.a
858+
859+# Force compiling sdefault.adb, not .ads, to produce sdefault.o
860+sdefault.o: sdefault.adb
861+
862+sdefault.adb: stamp-gnattools-sources
863+
864+%.o: %.adb
865+ $(GCC) -c -o $@ $< $(ADA_CFLAGS) $(ADA_INCLUDES)
866+
867+%.o: %.ads
868+ $(GCC) -c -o $@ $< $(ADA_CFLAGS) $(ADA_INCLUDES)
869
870-$(GCC_DIR)/stamp-tools:
871- -rm -rf $(GCC_DIR)/ada/tools
872- -mkdir -p $(GCC_DIR)/ada/tools
873- -(cd $(GCC_DIR)/ada/tools; $(LN_S) ../sdefault.adb .)
874- -$(foreach PAIR,$(TOOLS_TARGET_PAIRS), \
875- rm -f $(GCC_DIR)/ada/tools/$(word 1,$(subst <, ,$(PAIR)));\
876- $(LN_S) $(fsrcdir)/$(word 2,$(subst <, ,$(PAIR))) \
877- $(GCC_DIR)/ada/tools/$(word 1,$(subst <, ,$(PAIR)));)
878- touch $(GCC_DIR)/stamp-tools
879-
880-# gnatmake/link tools cannot always be built with gnatmake/link for bootstrap
881-# reasons: gnatmake should be built with a recent compiler, a recent compiler
882-# may not generate ALI files compatible with an old gnatmake so it is important
883-# to be able to build gnatmake without a version of gnatmake around. Once
884-# everything has been compiled once, gnatmake can be recompiled with itself
885-# (see target regnattools)
886-gnattools-native: $(GCC_DIR)/stamp-tools $(GCC_DIR)/stamp-gnatlib
887- # gnattools1
888- $(MAKE) -C $(GCC_DIR)/ada/tools -f ../Makefile \
889- $(TOOLS_FLAGS_TO_PASS_1) \
890- ../../gnatmake$(exeext) ../../gnatlink$(exeext) ../../gnatbl$(exeext)
891- # gnattools2
892- $(MAKE) -C $(GCC_DIR)/ada/tools -f ../Makefile \
893- $(TOOLS_FLAGS_TO_PASS_NATIVE) \
894- $(GNATTOOLS2_FILES)
895-
896-# gnatmake/link can be built with recent gnatmake/link if they are available.
897-# This is especially convenient for building cross tools or for rebuilding
898-# the tools when the original bootstrap has already be done.
899-regnattools: $(GCC_DIR)/stamp-gnatlib
900- # gnattools1-re
901- $(MAKE) -C $(GCC_DIR)/ada/tools -f ../Makefile \
902- $(TOOLS_FLAGS_TO_PASS_1re) \
903- gnatmake-re gnatlink-re
904- # gnattools2
905- $(MAKE) -C $(GCC_DIR)/ada/tools -f ../Makefile \
906- $(TOOLS_FLAGS_TO_PASS_NATIVE) \
907- $(GNATTOOLS2_FILES)
908-
909-# For cross builds of gnattools,
910-# put the host RTS dir first in the PATH to hide the default runtime
911-# files that are among the sources
912-# FIXME: This should be done in configure.
913-RTS_DIR:=$(strip $(subst \,/,$(shell gnatls -v | grep adalib )))
914-gnattools-cross: $(GCC_DIR)/stamp-tools
915- # gnattools1-re
916- $(MAKE) -C $(GCC_DIR)/ada/tools -f ../Makefile \
917- $(TOOLS_FLAGS_TO_PASS_CROSS) INCLUDES="" \
918- gnatmake-re gnatlink-re
919- # gnattools2
920- $(MAKE) -C $(GCC_DIR)/ada/tools -f ../Makefile \
921- $(TOOLS_FLAGS_TO_PASS_CROSS) \
922- $(GNATTOOLS2_FILES)
923- # gnattools4 (cross only)
924- $(MAKE) -C $(GCC_DIR)/ada/tools -f ../Makefile \
925- $(TOOLS_FLAGS_TO_PASS_CROSS) \
926- top_buildir=../../.. \
927- ../../vxaddr2line$(exeext)
928- # Rename cross tools to where the GCC makefile wants them when
929- # installing. FIXME: installation should be done elsewhere.
930- if [ -f $(GCC_DIR)/gnatbind$(exeext) ] ; then \
931- mv $(GCC_DIR)/gnatbind$(exeext) $(GCC_DIR)/gnatbind-cross$(exeext); \
932- fi
933- if [ -f $(GCC_DIR)/gnatbl$(exeext) ] ; then \
934- mv $(GCC_DIR)/gnatbl$(exeext) $(GCC_DIR)/gnatbl-cross$(exeext); \
935- fi
936- if [ -f $(GCC_DIR)/gnatchop$(exeext) ] ; then \
937- mv $(GCC_DIR)/gnatchop$(exeext) $(GCC_DIR)/gnatchop-cross$(exeext); \
938- fi
939- if [ -f $(GCC_DIR)/gnat$(exeext) ] ; then \
940- mv $(GCC_DIR)/gnat$(exeext) $(GCC_DIR)/gnat-cross$(exeext); \
941- fi
942- if [ -f $(GCC_DIR)/gnatkr$(exeext) ] ; then \
943- mv $(GCC_DIR)/gnatkr$(exeext) $(GCC_DIR)/gnatkr-cross$(exeext); \
944- fi
945- if [ -f $(GCC_DIR)/gnatlink$(exeext) ] ; then \
946- mv $(GCC_DIR)/gnatlink$(exeext) $(GCC_DIR)/gnatlink-cross$(exeext); \
947- fi
948- if [ -f $(GCC_DIR)/gnatls$(exeext) ] ; then \
949- mv $(GCC_DIR)/gnatls$(exeext) $(GCC_DIR)/gnatls-cross$(exeext); \
950- fi
951- if [ -f $(GCC_DIR)/gnatmake$(exeext) ] ; then \
952- mv $(GCC_DIR)/gnatmake$(exeext) $(GCC_DIR)/gnatmake-cross$(exeext); \
953- fi
954- if [ -f $(GCC_DIR)/gnatmem$(exeext) ] ; then \
955- mv $(GCC_DIR)/gnatmem$(exeext) $(GCC_DIR)/gnatmem-cross$(exeext); \
956- fi
957- if [ -f $(GCC_DIR)/gnatname$(exeext) ] ; then \
958- mv $(GCC_DIR)/gnatname$(exeext) $(GCC_DIR)/gnatname-cross$(exeext); \
959- fi
960- if [ -f $(GCC_DIR)/gnatprep$(exeext) ] ; then \
961- mv $(GCC_DIR)/gnatprep$(exeext) $(GCC_DIR)/gnatprep-cross$(exeext); \
962- fi
963- if [ -f $(GCC_DIR)/gnatxref$(exeext) ] ; then \
964- mv $(GCC_DIR)/gnatxref$(exeext) $(GCC_DIR)/gnatxref-cross$(exeext); \
965- fi
966- if [ -f $(GCC_DIR)/gnatfind$(exeext) ] ; then \
967- mv $(GCC_DIR)/gnatfind$(exeext) $(GCC_DIR)/gnatfind-cross$(exeext); \
968- fi
969- if [ -f $(GCC_DIR)/gnatclean$(exeext) ] ; then \
970- mv $(GCC_DIR)/gnatclean$(exeext) $(GCC_DIR)/gnatclean-cross$(exeext); \
971- fi
972- if [ -f $(GCC_DIR)/gnatsym$(exeext) ] ; then \
973- mv $(GCC_DIR)/gnatsym$(exeext) $(GCC_DIR)/gnatsym-cross$(exeext); \
974- fi
975+%.o: %.c
976+ $(GCC) -c -o $@ $< $(CFLAGS) $(INCLUDES)
977
978 # Other
979 # -----
980@@ -311,6 +316,7 @@
981
982 # Installation rules.
983 install:
984+ $(INSTALL) -s gnatmake gnatlink $(TOOLS) gnatbl $(DESTDIR)$(bindir)
985
986 install-info:
987
988@@ -320,8 +326,10 @@
989
990 # Cleaning rules.
991 mostlyclean:
992+ $(RM) gnatmake gnatlink $(TOOLS) gnatbl *.o *.ali
993
994 clean:
995+ $(RM) *.ads *.adb stamp-gnattools-sources
996
997 distclean:
998 $(RM) Makefile config.status config.log
999Index: libada/Makefile.in
1000===================================================================
1001--- libada/Makefile.in.orig 2007-03-04 01:29:34.000000000 +0100
1002+++ libada/Makefile.in 2008-01-29 12:16:44.696811771 +0100
1003@@ -49,7 +49,7 @@
1004
1005 # For finding the GCC build dir, which is used far too much
1006 host_subdir = @host_subdir@
1007-GCC_DIR=../../$(host_subdir)/gcc
1008+GCC_DIR=../$(host_subdir)/gcc
1009 # Include fragment generated by GCC configure.
1010 include $(GCC_DIR)/libada-mk
1011
1012Index: Makefile.def
1013===================================================================
1014--- Makefile.def.orig 2007-11-21 12:21:09.000000000 +0100
1015+++ Makefile.def 2008-01-29 12:16:44.696811771 +0100
1016@@ -116,7 +116,20 @@
1017 missing=distclean;
1018 missing=maintainer-clean; };
1019 host_modules= { module= utils; no_check=true; };
1020-host_modules= { module= gnattools; };
1021+host_modules= { module= libada; no_install=true; no_check=true;
1022+ missing= info;
1023+ missing= dvi;
1024+ missing= html;
1025+ missing= TAGS;
1026+ missing= install-info;
1027+ missing= installcheck; };
1028+host_modules= { module= gnattools; no_check=true;
1029+ missing= info;
1030+ missing= dvi;
1031+ missing= html;
1032+ missing= TAGS;
1033+ missing= install-info;
1034+ missing= installcheck; };
1035
1036 target_modules = { module= libstdc++-v3; lib_path=.libs; raw_cxx=true; };
1037 target_modules = { module= libmudflap; lib_path=.libs; };
1038@@ -141,7 +154,13 @@
1039 target_modules = { module= boehm-gc; };
1040 target_modules = { module= qthreads; };
1041 target_modules = { module= rda; };
1042-target_modules = { module= libada; };
1043+target_modules = { module= libada; no_install=true; no_check=true;
1044+ missing= info;
1045+ missing= dvi;
1046+ missing= html;
1047+ missing= TAGS;
1048+ missing= install-info;
1049+ missing= installcheck; };
1050 target_modules = { module= libgomp; lib_path=.libs; };
1051
1052 // These are (some of) the make targets to be done in each subdirectory.
1053@@ -311,7 +330,7 @@
1054
1055 dependencies = { module=all-fixincludes; on=all-libiberty; };
1056
1057-dependencies = { module=all-gnattools; on=all-target-libada; };
1058+dependencies = { module=all-gnattools; on=all-libada; };
1059
1060 dependencies = { module=configure-mpfr; on=all-gmp; };
1061
1062Index: Makefile.in
1063===================================================================
1064--- Makefile.in.orig 2008-01-13 22:19:42.000000000 +0100
1065+++ Makefile.in 2008-01-29 12:16:44.740811997 +0100
1066@@ -699,6 +699,7 @@
1067 maybe-configure-tk \
1068 maybe-configure-libtermcap \
1069 maybe-configure-utils \
1070+ maybe-configure-libada \
1071 maybe-configure-gnattools
1072 .PHONY: configure-target
1073 configure-target: \
1074@@ -849,6 +850,7 @@
1075 all-host: maybe-all-tk
1076 all-host: maybe-all-libtermcap
1077 all-host: maybe-all-utils
1078+all-host: maybe-all-libada
1079 all-host: maybe-all-gnattools
1080
1081 .PHONY: all-target
1082@@ -962,6 +964,7 @@
1083 info-host: maybe-info-tk
1084 info-host: maybe-info-libtermcap
1085 info-host: maybe-info-utils
1086+info-host: maybe-info-libada
1087 info-host: maybe-info-gnattools
1088
1089 .PHONY: info-target
1090@@ -1068,6 +1071,7 @@
1091 dvi-host: maybe-dvi-tk
1092 dvi-host: maybe-dvi-libtermcap
1093 dvi-host: maybe-dvi-utils
1094+dvi-host: maybe-dvi-libada
1095 dvi-host: maybe-dvi-gnattools
1096
1097 .PHONY: dvi-target
1098@@ -1174,6 +1178,7 @@
1099 pdf-host: maybe-pdf-tk
1100 pdf-host: maybe-pdf-libtermcap
1101 pdf-host: maybe-pdf-utils
1102+pdf-host: maybe-pdf-libada
1103 pdf-host: maybe-pdf-gnattools
1104
1105 .PHONY: pdf-target
1106@@ -1280,6 +1285,7 @@
1107 html-host: maybe-html-tk
1108 html-host: maybe-html-libtermcap
1109 html-host: maybe-html-utils
1110+html-host: maybe-html-libada
1111 html-host: maybe-html-gnattools
1112
1113 .PHONY: html-target
1114@@ -1386,6 +1392,7 @@
1115 TAGS-host: maybe-TAGS-tk
1116 TAGS-host: maybe-TAGS-libtermcap
1117 TAGS-host: maybe-TAGS-utils
1118+TAGS-host: maybe-TAGS-libada
1119 TAGS-host: maybe-TAGS-gnattools
1120
1121 .PHONY: TAGS-target
1122@@ -1492,6 +1499,7 @@
1123 install-info-host: maybe-install-info-tk
1124 install-info-host: maybe-install-info-libtermcap
1125 install-info-host: maybe-install-info-utils
1126+install-info-host: maybe-install-info-libada
1127 install-info-host: maybe-install-info-gnattools
1128
1129 .PHONY: install-info-target
1130@@ -1598,6 +1606,7 @@
1131 install-pdf-host: maybe-install-pdf-tk
1132 install-pdf-host: maybe-install-pdf-libtermcap
1133 install-pdf-host: maybe-install-pdf-utils
1134+install-pdf-host: maybe-install-pdf-libada
1135 install-pdf-host: maybe-install-pdf-gnattools
1136
1137 .PHONY: install-pdf-target
1138@@ -1704,6 +1713,7 @@
1139 install-html-host: maybe-install-html-tk
1140 install-html-host: maybe-install-html-libtermcap
1141 install-html-host: maybe-install-html-utils
1142+install-html-host: maybe-install-html-libada
1143 install-html-host: maybe-install-html-gnattools
1144
1145 .PHONY: install-html-target
1146@@ -1810,6 +1820,7 @@
1147 installcheck-host: maybe-installcheck-tk
1148 installcheck-host: maybe-installcheck-libtermcap
1149 installcheck-host: maybe-installcheck-utils
1150+installcheck-host: maybe-installcheck-libada
1151 installcheck-host: maybe-installcheck-gnattools
1152
1153 .PHONY: installcheck-target
1154@@ -1916,6 +1927,7 @@
1155 mostlyclean-host: maybe-mostlyclean-tk
1156 mostlyclean-host: maybe-mostlyclean-libtermcap
1157 mostlyclean-host: maybe-mostlyclean-utils
1158+mostlyclean-host: maybe-mostlyclean-libada
1159 mostlyclean-host: maybe-mostlyclean-gnattools
1160
1161 .PHONY: mostlyclean-target
1162@@ -2022,6 +2034,7 @@
1163 clean-host: maybe-clean-tk
1164 clean-host: maybe-clean-libtermcap
1165 clean-host: maybe-clean-utils
1166+clean-host: maybe-clean-libada
1167 clean-host: maybe-clean-gnattools
1168
1169 .PHONY: clean-target
1170@@ -2128,6 +2141,7 @@
1171 distclean-host: maybe-distclean-tk
1172 distclean-host: maybe-distclean-libtermcap
1173 distclean-host: maybe-distclean-utils
1174+distclean-host: maybe-distclean-libada
1175 distclean-host: maybe-distclean-gnattools
1176
1177 .PHONY: distclean-target
1178@@ -2234,6 +2248,7 @@
1179 maintainer-clean-host: maybe-maintainer-clean-tk
1180 maintainer-clean-host: maybe-maintainer-clean-libtermcap
1181 maintainer-clean-host: maybe-maintainer-clean-utils
1182+maintainer-clean-host: maybe-maintainer-clean-libada
1183 maintainer-clean-host: maybe-maintainer-clean-gnattools
1184
1185 .PHONY: maintainer-clean-target
1186@@ -2394,6 +2409,7 @@
1187 maybe-check-tk \
1188 maybe-check-libtermcap \
1189 maybe-check-utils \
1190+ maybe-check-libada \
1191 maybe-check-gnattools
1192
1193 .PHONY: check-target
1194@@ -2526,6 +2542,7 @@
1195 maybe-install-tk \
1196 maybe-install-libtermcap \
1197 maybe-install-utils \
1198+ maybe-install-libada \
1199 maybe-install-gnattools
1200
1201 .PHONY: install-host
1202@@ -2599,6 +2616,7 @@
1203 maybe-install-tk \
1204 maybe-install-libtermcap \
1205 maybe-install-utils \
1206+ maybe-install-libada \
1207 maybe-install-gnattools
1208
1209 .PHONY: install-target
1210@@ -38875,6 +38893,321 @@
1211
1212
1213
1214+.PHONY: configure-libada maybe-configure-libada
1215+maybe-configure-libada:
1216+@if gcc-bootstrap
1217+configure-libada: stage_current
1218+@endif gcc-bootstrap
1219+@if libada
1220+maybe-configure-libada: configure-libada
1221+configure-libada:
1222+ @: $(MAKE); $(unstage)
1223+ @r=`${PWD_COMMAND}`; export r; \
1224+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1225+ test ! -f $(HOST_SUBDIR)/libada/Makefile || exit 0; \
1226+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libada ; \
1227+ $(HOST_EXPORTS) \
1228+ echo Configuring in $(HOST_SUBDIR)/libada; \
1229+ cd "$(HOST_SUBDIR)/libada" || exit 1; \
1230+ case $(srcdir) in \
1231+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
1232+ *) topdir=`echo $(HOST_SUBDIR)/libada/ | \
1233+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
1234+ esac; \
1235+ srcdiroption="--srcdir=$${topdir}/libada"; \
1236+ libsrcdir="$$s/libada"; \
1237+ $(SHELL) $${libsrcdir}/configure \
1238+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
1239+ --target=${target_alias} $${srcdiroption} \
1240+ || exit 1
1241+@endif libada
1242+
1243+
1244+
1245+
1246+
1247+.PHONY: all-libada maybe-all-libada
1248+maybe-all-libada:
1249+@if gcc-bootstrap
1250+all-libada: stage_current
1251+@endif gcc-bootstrap
1252+@if libada
1253+TARGET-libada=all
1254+maybe-all-libada: all-libada
1255+all-libada: configure-libada
1256+ @: $(MAKE); $(unstage)
1257+ @r=`${PWD_COMMAND}`; export r; \
1258+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1259+ $(HOST_EXPORTS) \
1260+ (cd $(HOST_SUBDIR)/libada && \
1261+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-libada))
1262+@endif libada
1263+
1264+
1265+
1266+
1267+.PHONY: check-libada maybe-check-libada
1268+maybe-check-libada:
1269+@if libada
1270+maybe-check-libada: check-libada
1271+
1272+check-libada:
1273+
1274+@endif libada
1275+
1276+.PHONY: install-libada maybe-install-libada
1277+maybe-install-libada:
1278+@if libada
1279+maybe-install-libada: install-libada
1280+
1281+install-libada:
1282+
1283+@endif libada
1284+
1285+# Other targets (info, dvi, pdf, etc.)
1286+
1287+.PHONY: maybe-info-libada info-libada
1288+maybe-info-libada:
1289+@if libada
1290+maybe-info-libada: info-libada
1291+
1292+# libada doesn't support info.
1293+info-libada:
1294+
1295+@endif libada
1296+
1297+.PHONY: maybe-dvi-libada dvi-libada
1298+maybe-dvi-libada:
1299+@if libada
1300+maybe-dvi-libada: dvi-libada
1301+
1302+# libada doesn't support dvi.
1303+dvi-libada:
1304+
1305+@endif libada
1306+
1307+.PHONY: maybe-pdf-libada pdf-libada
1308+maybe-pdf-libada:
1309+@if libada
1310+maybe-pdf-libada: pdf-libada
1311+
1312+pdf-libada: \
1313+ configure-libada
1314+ @: $(MAKE); $(unstage)
1315+ @[ -f ./libada/Makefile ] || exit 0; \
1316+ r=`${PWD_COMMAND}`; export r; \
1317+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1318+ $(HOST_EXPORTS) \
1319+ for flag in $(EXTRA_HOST_FLAGS) ; do \
1320+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1321+ done; \
1322+ echo "Doing pdf in libada" ; \
1323+ (cd $(HOST_SUBDIR)/libada && \
1324+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
1325+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1326+ "RANLIB=$${RANLIB}" \
1327+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
1328+ pdf) \
1329+ || exit 1
1330+
1331+@endif libada
1332+
1333+.PHONY: maybe-html-libada html-libada
1334+maybe-html-libada:
1335+@if libada
1336+maybe-html-libada: html-libada
1337+
1338+# libada doesn't support html.
1339+html-libada:
1340+
1341+@endif libada
1342+
1343+.PHONY: maybe-TAGS-libada TAGS-libada
1344+maybe-TAGS-libada:
1345+@if libada
1346+maybe-TAGS-libada: TAGS-libada
1347+
1348+# libada doesn't support TAGS.
1349+TAGS-libada:
1350+
1351+@endif libada
1352+
1353+.PHONY: maybe-install-info-libada install-info-libada
1354+maybe-install-info-libada:
1355+@if libada
1356+maybe-install-info-libada: install-info-libada
1357+
1358+# libada doesn't support install-info.
1359+install-info-libada:
1360+
1361+@endif libada
1362+
1363+.PHONY: maybe-install-pdf-libada install-pdf-libada
1364+maybe-install-pdf-libada:
1365+@if libada
1366+maybe-install-pdf-libada: install-pdf-libada
1367+
1368+install-pdf-libada: \
1369+ configure-libada \
1370+ pdf-libada
1371+ @: $(MAKE); $(unstage)
1372+ @[ -f ./libada/Makefile ] || exit 0; \
1373+ r=`${PWD_COMMAND}`; export r; \
1374+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1375+ $(HOST_EXPORTS) \
1376+ for flag in $(EXTRA_HOST_FLAGS) ; do \
1377+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1378+ done; \
1379+ echo "Doing install-pdf in libada" ; \
1380+ (cd $(HOST_SUBDIR)/libada && \
1381+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
1382+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1383+ "RANLIB=$${RANLIB}" \
1384+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
1385+ install-pdf) \
1386+ || exit 1
1387+
1388+@endif libada
1389+
1390+.PHONY: maybe-install-html-libada install-html-libada
1391+maybe-install-html-libada:
1392+@if libada
1393+maybe-install-html-libada: install-html-libada
1394+
1395+install-html-libada: \
1396+ configure-libada \
1397+ html-libada
1398+ @: $(MAKE); $(unstage)
1399+ @[ -f ./libada/Makefile ] || exit 0; \
1400+ r=`${PWD_COMMAND}`; export r; \
1401+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1402+ $(HOST_EXPORTS) \
1403+ for flag in $(EXTRA_HOST_FLAGS) ; do \
1404+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1405+ done; \
1406+ echo "Doing install-html in libada" ; \
1407+ (cd $(HOST_SUBDIR)/libada && \
1408+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
1409+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1410+ "RANLIB=$${RANLIB}" \
1411+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
1412+ install-html) \
1413+ || exit 1
1414+
1415+@endif libada
1416+
1417+.PHONY: maybe-installcheck-libada installcheck-libada
1418+maybe-installcheck-libada:
1419+@if libada
1420+maybe-installcheck-libada: installcheck-libada
1421+
1422+# libada doesn't support installcheck.
1423+installcheck-libada:
1424+
1425+@endif libada
1426+
1427+.PHONY: maybe-mostlyclean-libada mostlyclean-libada
1428+maybe-mostlyclean-libada:
1429+@if libada
1430+maybe-mostlyclean-libada: mostlyclean-libada
1431+
1432+mostlyclean-libada:
1433+ @: $(MAKE); $(unstage)
1434+ @[ -f ./libada/Makefile ] || exit 0; \
1435+ r=`${PWD_COMMAND}`; export r; \
1436+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1437+ $(HOST_EXPORTS) \
1438+ for flag in $(EXTRA_HOST_FLAGS) ; do \
1439+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1440+ done; \
1441+ echo "Doing mostlyclean in libada" ; \
1442+ (cd $(HOST_SUBDIR)/libada && \
1443+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
1444+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1445+ "RANLIB=$${RANLIB}" \
1446+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
1447+ mostlyclean) \
1448+ || exit 1
1449+
1450+@endif libada
1451+
1452+.PHONY: maybe-clean-libada clean-libada
1453+maybe-clean-libada:
1454+@if libada
1455+maybe-clean-libada: clean-libada
1456+
1457+clean-libada:
1458+ @: $(MAKE); $(unstage)
1459+ @[ -f ./libada/Makefile ] || exit 0; \
1460+ r=`${PWD_COMMAND}`; export r; \
1461+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1462+ $(HOST_EXPORTS) \
1463+ for flag in $(EXTRA_HOST_FLAGS) ; do \
1464+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1465+ done; \
1466+ echo "Doing clean in libada" ; \
1467+ (cd $(HOST_SUBDIR)/libada && \
1468+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
1469+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1470+ "RANLIB=$${RANLIB}" \
1471+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
1472+ clean) \
1473+ || exit 1
1474+
1475+@endif libada
1476+
1477+.PHONY: maybe-distclean-libada distclean-libada
1478+maybe-distclean-libada:
1479+@if libada
1480+maybe-distclean-libada: distclean-libada
1481+
1482+distclean-libada:
1483+ @: $(MAKE); $(unstage)
1484+ @[ -f ./libada/Makefile ] || exit 0; \
1485+ r=`${PWD_COMMAND}`; export r; \
1486+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1487+ $(HOST_EXPORTS) \
1488+ for flag in $(EXTRA_HOST_FLAGS) ; do \
1489+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1490+ done; \
1491+ echo "Doing distclean in libada" ; \
1492+ (cd $(HOST_SUBDIR)/libada && \
1493+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
1494+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1495+ "RANLIB=$${RANLIB}" \
1496+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
1497+ distclean) \
1498+ || exit 1
1499+
1500+@endif libada
1501+
1502+.PHONY: maybe-maintainer-clean-libada maintainer-clean-libada
1503+maybe-maintainer-clean-libada:
1504+@if libada
1505+maybe-maintainer-clean-libada: maintainer-clean-libada
1506+
1507+maintainer-clean-libada:
1508+ @: $(MAKE); $(unstage)
1509+ @[ -f ./libada/Makefile ] || exit 0; \
1510+ r=`${PWD_COMMAND}`; export r; \
1511+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1512+ $(HOST_EXPORTS) \
1513+ for flag in $(EXTRA_HOST_FLAGS) ; do \
1514+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1515+ done; \
1516+ echo "Doing maintainer-clean in libada" ; \
1517+ (cd $(HOST_SUBDIR)/libada && \
1518+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
1519+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1520+ "RANLIB=$${RANLIB}" \
1521+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
1522+ maintainer-clean) \
1523+ || exit 1
1524+
1525+@endif libada
1526+
1527+
1528+
1529 .PHONY: configure-gnattools maybe-configure-gnattools
1530 maybe-configure-gnattools:
1531 @if gcc-bootstrap
1532@@ -38934,12 +39267,6 @@
1533 maybe-check-gnattools: check-gnattools
1534
1535 check-gnattools:
1536- @: $(MAKE); $(unstage)
1537- @r=`${PWD_COMMAND}`; export r; \
1538- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1539- $(HOST_EXPORTS) \
1540- (cd $(HOST_SUBDIR)/gnattools && \
1541- $(MAKE) $(FLAGS_TO_PASS) check)
1542
1543 @endif gnattools
1544
1545@@ -38965,24 +39292,8 @@
1546 @if gnattools
1547 maybe-info-gnattools: info-gnattools
1548
1549-info-gnattools: \
1550- configure-gnattools
1551- @: $(MAKE); $(unstage)
1552- @[ -f ./gnattools/Makefile ] || exit 0; \
1553- r=`${PWD_COMMAND}`; export r; \
1554- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1555- $(HOST_EXPORTS) \
1556- for flag in $(EXTRA_HOST_FLAGS) ; do \
1557- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1558- done; \
1559- echo "Doing info in gnattools" ; \
1560- (cd $(HOST_SUBDIR)/gnattools && \
1561- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
1562- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1563- "RANLIB=$${RANLIB}" \
1564- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
1565- info) \
1566- || exit 1
1567+# gnattools doesn't support info.
1568+info-gnattools:
1569
1570 @endif gnattools
1571
1572@@ -38991,24 +39302,8 @@
1573 @if gnattools
1574 maybe-dvi-gnattools: dvi-gnattools
1575
1576-dvi-gnattools: \
1577- configure-gnattools
1578- @: $(MAKE); $(unstage)
1579- @[ -f ./gnattools/Makefile ] || exit 0; \
1580- r=`${PWD_COMMAND}`; export r; \
1581- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1582- $(HOST_EXPORTS) \
1583- for flag in $(EXTRA_HOST_FLAGS) ; do \
1584- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1585- done; \
1586- echo "Doing dvi in gnattools" ; \
1587- (cd $(HOST_SUBDIR)/gnattools && \
1588- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
1589- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1590- "RANLIB=$${RANLIB}" \
1591- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
1592- dvi) \
1593- || exit 1
1594+# gnattools doesn't support dvi.
1595+dvi-gnattools:
1596
1597 @endif gnattools
1598
1599@@ -39043,24 +39338,8 @@
1600 @if gnattools
1601 maybe-html-gnattools: html-gnattools
1602
1603-html-gnattools: \
1604- configure-gnattools
1605- @: $(MAKE); $(unstage)
1606- @[ -f ./gnattools/Makefile ] || exit 0; \
1607- r=`${PWD_COMMAND}`; export r; \
1608- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1609- $(HOST_EXPORTS) \
1610- for flag in $(EXTRA_HOST_FLAGS) ; do \
1611- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1612- done; \
1613- echo "Doing html in gnattools" ; \
1614- (cd $(HOST_SUBDIR)/gnattools && \
1615- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
1616- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1617- "RANLIB=$${RANLIB}" \
1618- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
1619- html) \
1620- || exit 1
1621+# gnattools doesn't support html.
1622+html-gnattools:
1623
1624 @endif gnattools
1625
1626@@ -39069,24 +39348,8 @@
1627 @if gnattools
1628 maybe-TAGS-gnattools: TAGS-gnattools
1629
1630-TAGS-gnattools: \
1631- configure-gnattools
1632- @: $(MAKE); $(unstage)
1633- @[ -f ./gnattools/Makefile ] || exit 0; \
1634- r=`${PWD_COMMAND}`; export r; \
1635- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1636- $(HOST_EXPORTS) \
1637- for flag in $(EXTRA_HOST_FLAGS) ; do \
1638- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1639- done; \
1640- echo "Doing TAGS in gnattools" ; \
1641- (cd $(HOST_SUBDIR)/gnattools && \
1642- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
1643- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1644- "RANLIB=$${RANLIB}" \
1645- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
1646- TAGS) \
1647- || exit 1
1648+# gnattools doesn't support TAGS.
1649+TAGS-gnattools:
1650
1651 @endif gnattools
1652
1653@@ -39095,25 +39358,8 @@
1654 @if gnattools
1655 maybe-install-info-gnattools: install-info-gnattools
1656
1657-install-info-gnattools: \
1658- configure-gnattools \
1659- info-gnattools
1660- @: $(MAKE); $(unstage)
1661- @[ -f ./gnattools/Makefile ] || exit 0; \
1662- r=`${PWD_COMMAND}`; export r; \
1663- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1664- $(HOST_EXPORTS) \
1665- for flag in $(EXTRA_HOST_FLAGS) ; do \
1666- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1667- done; \
1668- echo "Doing install-info in gnattools" ; \
1669- (cd $(HOST_SUBDIR)/gnattools && \
1670- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
1671- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1672- "RANLIB=$${RANLIB}" \
1673- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
1674- install-info) \
1675- || exit 1
1676+# gnattools doesn't support install-info.
1677+install-info-gnattools:
1678
1679 @endif gnattools
1680
1681@@ -39176,24 +39422,8 @@
1682 @if gnattools
1683 maybe-installcheck-gnattools: installcheck-gnattools
1684
1685-installcheck-gnattools: \
1686- configure-gnattools
1687- @: $(MAKE); $(unstage)
1688- @[ -f ./gnattools/Makefile ] || exit 0; \
1689- r=`${PWD_COMMAND}`; export r; \
1690- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1691- $(HOST_EXPORTS) \
1692- for flag in $(EXTRA_HOST_FLAGS) ; do \
1693- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1694- done; \
1695- echo "Doing installcheck in gnattools" ; \
1696- (cd $(HOST_SUBDIR)/gnattools && \
1697- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
1698- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1699- "RANLIB=$${RANLIB}" \
1700- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
1701- installcheck) \
1702- || exit 1
1703+# gnattools doesn't support installcheck.
1704+installcheck-gnattools:
1705
1706 @endif gnattools
1707
1708@@ -48296,13 +48526,8 @@
1709 @if target-libada
1710 maybe-check-target-libada: check-target-libada
1711
1712+# Dummy target for uncheckable module.
1713 check-target-libada:
1714- @: $(MAKE); $(unstage)
1715- @r=`${PWD_COMMAND}`; export r; \
1716- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1717- $(NORMAL_TARGET_EXPORTS) \
1718- (cd $(TARGET_SUBDIR)/libada && \
1719- $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
1720
1721 @endif target-libada
1722
1723@@ -48311,13 +48536,8 @@
1724 @if target-libada
1725 maybe-install-target-libada: install-target-libada
1726
1727-install-target-libada: installdirs
1728- @: $(MAKE); $(unstage)
1729- @r=`${PWD_COMMAND}`; export r; \
1730- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1731- $(NORMAL_TARGET_EXPORTS) \
1732- (cd $(TARGET_SUBDIR)/libada && \
1733- $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
1734+# Dummy target for uninstallable.
1735+install-target-libada:
1736
1737 @endif target-libada
1738
1739@@ -48328,24 +48548,8 @@
1740 @if target-libada
1741 maybe-info-target-libada: info-target-libada
1742
1743-info-target-libada: \
1744- configure-target-libada
1745- @: $(MAKE); $(unstage)
1746- @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
1747- r=`${PWD_COMMAND}`; export r; \
1748- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1749- $(NORMAL_TARGET_EXPORTS) \
1750- echo "Doing info in $(TARGET_SUBDIR)/libada" ; \
1751- for flag in $(EXTRA_TARGET_FLAGS); do \
1752- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1753- done; \
1754- (cd $(TARGET_SUBDIR)/libada && \
1755- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
1756- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1757- "RANLIB=$${RANLIB}" \
1758- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
1759- info) \
1760- || exit 1
1761+# libada doesn't support info.
1762+info-target-libada:
1763
1764 @endif target-libada
1765
1766@@ -48354,24 +48558,8 @@
1767 @if target-libada
1768 maybe-dvi-target-libada: dvi-target-libada
1769
1770-dvi-target-libada: \
1771- configure-target-libada
1772- @: $(MAKE); $(unstage)
1773- @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
1774- r=`${PWD_COMMAND}`; export r; \
1775- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1776- $(NORMAL_TARGET_EXPORTS) \
1777- echo "Doing dvi in $(TARGET_SUBDIR)/libada" ; \
1778- for flag in $(EXTRA_TARGET_FLAGS); do \
1779- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1780- done; \
1781- (cd $(TARGET_SUBDIR)/libada && \
1782- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
1783- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1784- "RANLIB=$${RANLIB}" \
1785- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
1786- dvi) \
1787- || exit 1
1788+# libada doesn't support dvi.
1789+dvi-target-libada:
1790
1791 @endif target-libada
1792
1793@@ -48406,24 +48594,8 @@
1794 @if target-libada
1795 maybe-html-target-libada: html-target-libada
1796
1797-html-target-libada: \
1798- configure-target-libada
1799- @: $(MAKE); $(unstage)
1800- @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
1801- r=`${PWD_COMMAND}`; export r; \
1802- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1803- $(NORMAL_TARGET_EXPORTS) \
1804- echo "Doing html in $(TARGET_SUBDIR)/libada" ; \
1805- for flag in $(EXTRA_TARGET_FLAGS); do \
1806- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1807- done; \
1808- (cd $(TARGET_SUBDIR)/libada && \
1809- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
1810- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1811- "RANLIB=$${RANLIB}" \
1812- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
1813- html) \
1814- || exit 1
1815+# libada doesn't support html.
1816+html-target-libada:
1817
1818 @endif target-libada
1819
1820@@ -48432,24 +48604,8 @@
1821 @if target-libada
1822 maybe-TAGS-target-libada: TAGS-target-libada
1823
1824-TAGS-target-libada: \
1825- configure-target-libada
1826- @: $(MAKE); $(unstage)
1827- @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
1828- r=`${PWD_COMMAND}`; export r; \
1829- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1830- $(NORMAL_TARGET_EXPORTS) \
1831- echo "Doing TAGS in $(TARGET_SUBDIR)/libada" ; \
1832- for flag in $(EXTRA_TARGET_FLAGS); do \
1833- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1834- done; \
1835- (cd $(TARGET_SUBDIR)/libada && \
1836- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
1837- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1838- "RANLIB=$${RANLIB}" \
1839- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
1840- TAGS) \
1841- || exit 1
1842+# libada doesn't support TAGS.
1843+TAGS-target-libada:
1844
1845 @endif target-libada
1846
1847@@ -48458,25 +48614,8 @@
1848 @if target-libada
1849 maybe-install-info-target-libada: install-info-target-libada
1850
1851-install-info-target-libada: \
1852- configure-target-libada \
1853- info-target-libada
1854- @: $(MAKE); $(unstage)
1855- @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
1856- r=`${PWD_COMMAND}`; export r; \
1857- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1858- $(NORMAL_TARGET_EXPORTS) \
1859- echo "Doing install-info in $(TARGET_SUBDIR)/libada" ; \
1860- for flag in $(EXTRA_TARGET_FLAGS); do \
1861- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1862- done; \
1863- (cd $(TARGET_SUBDIR)/libada && \
1864- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
1865- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1866- "RANLIB=$${RANLIB}" \
1867- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
1868- install-info) \
1869- || exit 1
1870+# libada doesn't support install-info.
1871+install-info-target-libada:
1872
1873 @endif target-libada
1874
1875@@ -48539,24 +48678,8 @@
1876 @if target-libada
1877 maybe-installcheck-target-libada: installcheck-target-libada
1878
1879-installcheck-target-libada: \
1880- configure-target-libada
1881- @: $(MAKE); $(unstage)
1882- @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
1883- r=`${PWD_COMMAND}`; export r; \
1884- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1885- $(NORMAL_TARGET_EXPORTS) \
1886- echo "Doing installcheck in $(TARGET_SUBDIR)/libada" ; \
1887- for flag in $(EXTRA_TARGET_FLAGS); do \
1888- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1889- done; \
1890- (cd $(TARGET_SUBDIR)/libada && \
1891- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
1892- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1893- "RANLIB=$${RANLIB}" \
1894- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
1895- installcheck) \
1896- || exit 1
1897+# libada doesn't support installcheck.
1898+installcheck-target-libada:
1899
1900 @endif target-libada
1901
1902@@ -51490,7 +51613,7 @@
1903 all-stageprofile-libcpp: maybe-all-stageprofile-intl
1904 all-stagefeedback-libcpp: maybe-all-stagefeedback-intl
1905 all-fixincludes: maybe-all-libiberty
1906-all-gnattools: maybe-all-target-libada
1907+all-gnattools: maybe-all-libada
1908 configure-mpfr: maybe-all-gmp
1909
1910 configure-stage1-mpfr: maybe-all-stage1-gmp
1911Index: configure.ac
1912===================================================================
1913--- configure.ac.orig 2008-01-29 12:10:06.002765243 +0100
1914+++ configure.ac 2008-01-29 12:16:44.744812017 +0100
1915@@ -155,7 +155,7 @@
1916
1917 # these libraries are used by various programs built for the host environment
1918 #
1919-host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber gmp mpfr"
1920+host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber gmp mpfr libada"
1921
1922 # these tools are built for the host environment
1923 # Note, the powerpc-eabi build depends on sim occurring before gdb in order to
1924@@ -263,7 +263,7 @@
1925
1926 # Similarly, some are only suitable for cross toolchains.
1927 # Remove these if host=target.
1928-cross_only="target-libgloss target-newlib target-opcodes"
1929+cross_only="target-libgloss target-newlib target-opcodes target-libada"
1930
1931 case $is_cross_compiler in
1932 no) skipdirs="${skipdirs} ${cross_only}" ;;