]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/ada/gcc-interface/Makefile.in
Makefile.in: Revert most changes.
[thirdparty/gcc.git] / gcc / ada / gcc-interface / Makefile.in
1 # Makefile for GNU Ada Compiler (GNAT).
2 # Copyright (C) 1994-2012 Free Software Foundation, Inc.
3
4 #This file is part of GCC.
5
6 #GCC is free software; you can redistribute it and/or modify
7 #it under the terms of the GNU General Public License as published by
8 #the Free Software Foundation; either version 3, or (at your option)
9 #any later version.
10
11 #GCC is distributed in the hope that it will be useful,
12 #but WITHOUT ANY WARRANTY; without even the implied warranty of
13 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 #GNU General Public License for more details.
15
16 #You should have received a copy of the GNU General Public License
17 #along with GCC; see the file COPYING3. If not see
18 #<http://www.gnu.org/licenses/>.
19
20 # The makefile built from this file lives in the language subdirectory.
21 # Its purpose is to provide support for:
22 #
23 # 1) recursion where necessary, and only then (building .o's), and
24 # 2) building and debugging cc1 from the language subdirectory, and
25 # 3) nothing else.
26 #
27 # The parent makefile handles all other chores, with help from the
28 # language makefile fragment, of course.
29 #
30 # The targets for external use are:
31 # all, TAGS, ???mostlyclean, ???clean.
32
33 # This makefile will only work with Gnu make.
34 # The rules are written assuming a minimum subset of tools are available:
35 #
36 # Required:
37 # MAKE: Only Gnu make will work.
38 # MV: Must accept (at least) one, maybe wildcard, source argument,
39 # a file or directory destination, and support creation/
40 # modification date preservation. Gnu mv -f works.
41 # RM: Must accept an arbitrary number of space separated file
42 # arguments, or one wildcard argument. Gnu rm works.
43 # RMDIR: Must delete a directory and all its contents. Gnu rm -rf works.
44 # ECHO: Must support command line redirection. Any Unix-like
45 # shell will typically provide this, otherwise a custom version
46 # is trivial to write.
47 # AR: Gnu ar works.
48 # MKDIR: Gnu mkdir works.
49 # CHMOD: Gnu chmod works.
50 # true: Does nothing and returns a normal successful return code.
51 # pwd: Prints the current directory on stdout.
52 # cd: Change directory.
53 #
54 # Optional:
55 # BISON: Gnu bison works.
56 # FLEX: Gnu flex works.
57 # Other miscellaneous tools for obscure targets.
58
59 # Suppress smart makes who think they know how to automake Yacc files
60 .y.c:
61
62 # Variables that exist for you to override.
63 # See below for how to change them for certain systems.
64
65 # Various ways of specifying flags for compilations:
66 # CFLAGS is for the user to override to, e.g., do a bootstrap with -O2.
67 # BOOT_CFLAGS is the value of CFLAGS to pass
68 # to the stage2 and stage3 compilations
69 CFLAGS = -g
70 BOOT_CFLAGS = -O $(CFLAGS)
71 # These exists to be overridden by the t-* files, respectively.
72 T_CFLAGS =
73
74 CC = cc
75 BISON = bison
76 BISONFLAGS =
77 ECHO = echo
78 LEX = flex
79 LEXFLAGS =
80 CHMOD = chmod
81 LN = ln
82 LN_S = ln -s
83 CP = cp -p
84 MV = mv -f
85 RM = rm -f
86 RMDIR = rm -rf
87 MKDIR = mkdir -p
88 AR = ar
89 AR_FLAGS = rc
90 LS = ls
91 RANLIB = @RANLIB@
92 RANLIB_FLAGS = @ranlib_flags@
93 AWK = @AWK@
94
95 COMPILER = $(CC)
96 COMPILER_FLAGS = $(CFLAGS)
97
98 SHELL = @SHELL@
99 PWD_COMMAND = $${PWDCMD-pwd}
100 # How to copy preserving the date
101 INSTALL_DATA_DATE = cp -p
102 MAKEINFO = makeinfo
103 TEXI2DVI = texi2dvi
104 TEXI2PDF = texi2pdf
105 GNATBIND_FLAGS = -static -x
106 ADA_CFLAGS =
107 ADAFLAGS = -W -Wall -gnatpg -gnata
108 FORCE_DEBUG_ADAFLAGS = -g
109 NO_SIBLING_ADAFLAGS = -fno-optimize-sibling-calls
110 NO_REORDER_ADAFLAGS = -fno-toplevel-reorder
111 GNATLIBFLAGS = -W -Wall -gnatpg -nostdinc
112 GNATLIBCFLAGS = -g -O2
113 PICFLAG_FOR_TARGET = @PICFLAG_FOR_TARGET@
114
115 # Pretend that _Unwind_GetIPInfo is available for the target by default. This
116 # should be autodetected during the configuration of libada and passed down to
117 # here, but we need something for --disable-libada and hope for the best.
118 GNATLIBCFLAGS_FOR_C = -W -Wall $(GNATLIBCFLAGS) \
119 -fexceptions -DIN_RTS -DHAVE_GETIPINFO
120 ALL_ADAFLAGS = $(CFLAGS) $(ADA_CFLAGS) $(ADAFLAGS)
121 THREAD_KIND = native
122 THREADSLIB =
123 GMEM_LIB =
124 MISCLIB =
125 OUTPUT_OPTION = @OUTPUT_OPTION@
126
127 objext = .o
128 exeext =
129 arext = .a
130 soext = .so
131 shext =
132 hyphen = -
133
134 # Define this as & to perform parallel make on a Sequent.
135 # Note that this has some bugs, and it seems currently necessary
136 # to compile all the gen* files first by hand to avoid erroneous results.
137 P =
138
139 # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
140 # It specifies -B./.
141 # It also specifies -B$(tooldir)/ to find as and ld for a cross compiler.
142 GCC_CFLAGS = $(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS)
143
144 # Tools to use when building a cross-compiler.
145 # These are used because `configure' appends `cross-make'
146 # to the makefile when making a cross-compiler.
147
148 # We don't use cross-make. Instead we use the tools from the build tree,
149 # if they are available.
150 # program_transform_name and objdir are set by configure.in.
151 program_transform_name =
152 objdir = .
153
154 target_alias=@target_alias@
155 target=@target@
156 xmake_file = @xmake_file@
157 tmake_file = @tmake_file@
158 host_canonical=@host@
159 target_cpu_default=@target_cpu_default@
160 #version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < $(srcdir)/version.c`
161 #mainversion=`sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/' < $(srcdir)/version.c`
162
163 # Directory where sources are, from where we are.
164 VPATH = $(srcdir)/ada
165
166 fsrcdir := $(shell cd $(srcdir);${PWD_COMMAND})
167 fsrcpfx := $(shell cd $(srcdir);${PWD_COMMAND})/
168 fcurdir := $(shell ${PWD_COMMAND})
169 fcurpfx := $(shell ${PWD_COMMAND})/
170
171 # Top build directory, relative to here.
172 top_builddir = ../..
173
174 # Internationalization library.
175 LIBINTL = @LIBINTL@
176 LIBINTL_DEP = @LIBINTL_DEP@
177
178 # Character encoding conversion library.
179 LIBICONV = @LIBICONV@
180 LIBICONV_DEP = @LIBICONV_DEP@
181
182 # Any system libraries needed just for GNAT.
183 SYSLIBS = @GNAT_LIBEXC@
184
185 # List extra gnattools
186 EXTRA_GNATTOOLS =
187
188 # List of target dependent sources, overridden below as necessary
189 TARGET_ADA_SRCS =
190
191 # Type of tools build we are doing; default is not compiling tools.
192 TOOLSCASE =
193
194 # Multilib handling
195 MULTISUBDIR =
196 RTSDIR = rts$(subst /,_,$(MULTISUBDIR))
197
198 # Link flags used to build gnat tools. By default we prefer to statically
199 # link with libgcc to avoid a dependency on shared libgcc (which is tricky
200 # to deal with as it may conflict with the libgcc provided by the system).
201 GCC_LINK_FLAGS=-static-libgcc
202
203 # End of variables for you to override.
204
205 all: all.indirect
206
207 # This tells GNU Make version 3 not to put all variables in the environment.
208 .NOEXPORT:
209
210 # target overrides
211 ifneq ($(tmake_file),)
212 include $(tmake_file)
213 endif
214
215 # host overrides
216 ifneq ($(xmake_file),)
217 include $(xmake_file)
218 endif
219 \f
220 # Now figure out from those variables how to compile and link.
221
222 all.indirect: Makefile ../gnat1$(exeext)
223
224 # IN_GCC is meant to distinguish between code compiled into GCC itself, i.e.
225 # for the host, and the rest. But we also use it for the tools (link.c) and
226 # even break the host/target wall by using it for the library (targext.c).
227 # autoconf inserts -DCROSS_DIRECTORY_STRUCTURE if we are building a cross
228 # compiler which does not use the native libraries and headers.
229 INTERNAL_CFLAGS = @CROSS@ -DIN_GCC
230
231 # This is the variable actually used when we compile.
232 ALL_CFLAGS = $(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS)
233
234 # Likewise.
235 ALL_CPPFLAGS = $(CPPFLAGS)
236
237 # Used with $(COMPILER).
238 ALL_COMPILERFLAGS = $(ALL_CFLAGS)
239
240 # This is where we get libiberty.a from.
241 LIBIBERTY = ../../libiberty/libiberty.a
242
243 # We need to link against libbacktrace because diagnostic.c in
244 # libcommon.a uses it.
245 LIBBACKTRACE = ../../libbacktrace/.libs/libbacktrace.a
246
247 # How to link with both our special library facilities
248 # and the system's installed libraries.
249 LIBS = $(LIBINTL) $(LIBICONV) $(LIBBACKTRACE) $(LIBIBERTY) $(SYSLIBS)
250 LIBDEPS = $(LIBINTL_DEP) $(LIBICONV_DEP) $(LIBBACKTRACE) $(LIBIBERTY)
251 # Default is no TGT_LIB; one might be passed down or something
252 TGT_LIB =
253 TOOLS_LIBS = targext.o link.o ../../ggc-none.o ../../libcommon-target.a \
254 ../../libcommon.a ../../../libcpp/libcpp.a $(LIBGNAT) $(LIBINTL) $(LIBICONV) \
255 ../../../libbacktrace/.libs/libbacktrace.a ../../../libiberty/libiberty.a \
256 $(SYSLIBS) $(TGT_LIB)
257
258 # Convert the target variable into a space separated list of architecture,
259 # manufacturer, and operating system and assign each of those to its own
260 # variable.
261 host:=$(subst -, ,$(host_canonical))
262 targ:=$(subst -, ,$(target))
263 arch:=$(word 1,$(targ))
264 ifeq ($(words $(targ)),2)
265 manu:=
266 osys:=$(word 2,$(targ))
267 else
268 manu:=$(word 2,$(targ))
269 osys:=$(word 3,$(targ))
270 endif
271
272 # Specify the directories to be searched for header files.
273 # Both . and srcdir are used, in that order,
274 # so that tm.h and config.h will be found in the compilation
275 # subdirectory rather than in the source directory.
276 INCLUDES = -I- -I. -I.. -I$(srcdir)/ada -I$(srcdir) -I$(srcdir)/../include
277
278 ADA_INCLUDES = -I- -I. -I$(srcdir)/ada
279
280 # Likewise, but valid for subdirectories of the current dir.
281 # FIXME: for VxWorks, we cannot add $(fsrcdir) because the regs.h file in
282 # that directory conflicts with a system header file.
283 ifneq ($(findstring vxworks,$(osys)),)
284 INCLUDES_FOR_SUBDIR = -iquote . -iquote .. -iquote ../.. \
285 -iquote $(fsrcdir)/ada \
286 -I$(fsrcdir)/../include
287 else
288 INCLUDES_FOR_SUBDIR = -iquote . -iquote .. -iquote ../.. \
289 -iquote $(fsrcdir)/ada -iquote $(fsrcdir) \
290 -I$(fsrcdir)/../include
291 endif
292
293 ADA_INCLUDES_FOR_SUBDIR = -I. -I$(fsrcdir)/ada
294
295 # Avoid a lot of time thinking about remaking Makefile.in and *.def.
296 .SUFFIXES: .in .def
297
298 # Say how to compile Ada programs.
299 .SUFFIXES: .ada .adb .ads .asm
300
301 # Always use -I$(srcdir)/config when compiling.
302 .asm.o:
303 $(CC) -c -x assembler $< $(OUTPUT_OPTION)
304
305 .c.o:
306 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) \
307 $(INCLUDES) $< $(OUTPUT_OPTION)
308
309 .adb.o:
310 $(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
311
312 .ads.o:
313 $(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
314
315 # how to regenerate this file
316 Makefile: ../config.status $(srcdir)/ada/gcc-interface/Makefile.in $(srcdir)/ada/Makefile.in $(srcdir)/version.c
317 cd ..; \
318 LANGUAGES="$(CONFIG_LANGUAGES)" \
319 CONFIG_HEADERS= \
320 CONFIG_FILES="ada/gcc-interface/Makefile ada/Makefile" $(SHELL) config.status
321
322 # This tells GNU make version 3 not to export all the variables
323 # defined in this file into the environment.
324 .NOEXPORT:
325 \f
326 # Lists of files for various purposes.
327
328 GNATLINK_OBJS = gnatlink.o \
329 a-except.o ali.o alloc.o butil.o casing.o csets.o debug.o fmap.o fname.o \
330 gnatvsn.o hostparm.o indepsw.o interfac.o i-c.o i-cstrin.o namet.o opt.o \
331 osint.o output.o rident.o s-exctab.o s-secsta.o s-stalib.o s-stoele.o \
332 sdefault.o snames.o stylesw.o switch.o system.o table.o targparm.o tree_io.o \
333 types.o validsw.o widechar.o
334
335 GNATMAKE_OBJS = a-except.o ali.o ali-util.o aspects.o s-casuti.o alloc.o \
336 atree.o binderr.o butil.o casing.o csets.o debug.o elists.o einfo.o errout.o \
337 erroutc.o errutil.o err_vars.o fmap.o fname.o fname-uf.o fname-sf.o \
338 gnatmake.o gnatvsn.o hostparm.o interfac.o i-c.o i-cstrin.o krunch.o lib.o \
339 make.o makeusg.o makeutl.o mlib.o mlib-fil.o mlib-prj.o mlib-tgt.o \
340 mlib-tgt-specific.o mlib-utl.o namet.o nlists.o opt.o osint.o osint-m.o \
341 output.o prj.o prj-attr.o prj-attr-pm.o prj-com.o prj-dect.o prj-env.o \
342 prj-conf.o prj-pp.o prj-err.o prj-ext.o prj-nmsc.o prj-pars.o prj-part.o \
343 prj-proc.o prj-strt.o prj-tree.o prj-util.o restrict.o rident.o s-exctab.o \
344 s-secsta.o s-stalib.o s-stoele.o scans.o scng.o sdefault.o sfn_scan.o \
345 s-purexc.o s-htable.o scil_ll.o sem_aux.o sinfo.o sinput.o sinput-c.o \
346 sinput-p.o snames.o stand.o stringt.o styleg.o stylesw.o system.o validsw.o \
347 switch.o switch-m.o table.o targparm.o tempdir.o tree_io.o types.o uintp.o \
348 uname.o urealp.o usage.o widechar.o \
349 $(EXTRA_GNATMAKE_OBJS)
350
351 # Make arch match the current multilib so that the RTS selection code
352 # picks up the right files. For a given target this must be coherent
353 # with MULTILIB_DIRNAMES defined in gcc/config/target/t-*.
354
355 ifeq ($(strip $(filter-out %x86_64, $(arch))),)
356 ifeq ($(strip $(MULTISUBDIR)),/32)
357 arch:=i686
358 else
359 ifeq ($(strip $(MULTISUBDIR)),/x32)
360 arch:=x32
361 endif
362 endif
363 endif
364
365 # ???: handle more multilib targets
366
367 # LIBGNAT_TARGET_PAIRS is a list of pairs of filenames.
368 # The members of each pair must be separated by a '<' and no whitespace.
369 # Each pair must be separated by some amount of whitespace from the following
370 # pair.
371
372 # Non-tasking case:
373
374 LIBGNAT_TARGET_PAIRS = \
375 a-intnam.ads<a-intnam-dummy.ads \
376 s-inmaop.adb<s-inmaop-dummy.adb \
377 s-intman.adb<s-intman-dummy.adb \
378 s-osinte.ads<s-osinte-dummy.ads \
379 s-osprim.adb<s-osprim-posix.adb \
380 s-taprop.adb<s-taprop-dummy.adb \
381 s-taspri.ads<s-taspri-dummy.ads
382
383 # When using the GCC exception handling mechanism, we need to use an
384 # alternate body for a-exexpr.adb (a-exexpr-gcc.adb)
385
386 EH_MECHANISM=
387
388 # Default shared object option. Note that we rely on the fact that the "soname"
389 # option will always be present and last in this flag, so that we can have
390 # $(SO_OPTS)libgnat-x.xx
391
392 SO_OPTS = -Wl,-soname,
393
394 # Default gnatlib-shared target.
395 # By default, equivalent to gnatlib.
396 # Set to gnatlib-shared-default, gnatlib-shared-dual, or a platform specific
397 # target when supported.
398 GNATLIB_SHARED = gnatlib
399
400 # default value for gnatmake's target dependent file
401 MLIB_TGT = mlib-tgt
402
403 # By default, build socket support units. On platforms that do not support
404 # sockets, reset this variable to empty and add DUMMY_SOCKETS_TARGET_PAIRS
405 # to LIBGNAT_TARGET_PAIRS.
406
407 GNATRTL_SOCKETS_OBJS = g-soccon$(objext) g-socket$(objext) g-socthi$(objext) \
408 g-soliop$(objext) g-sothco$(objext)
409
410 DUMMY_SOCKETS_TARGET_PAIRS = \
411 g-socket.adb<g-socket-dummy.adb \
412 g-socket.ads<g-socket-dummy.ads \
413 g-socthi.adb<g-socthi-dummy.adb \
414 g-socthi.ads<g-socthi-dummy.ads \
415 g-sothco.adb<g-sothco-dummy.adb \
416 g-sothco.ads<g-sothco-dummy.ads
417
418 # On platforms where atomic increment/decrement operations are supported,
419 # special version of Ada.Strings.Unbounded package can be used.
420
421 ATOMICS_TARGET_PAIRS = \
422 a-stunau.adb<a-stunau-shared.adb \
423 a-suteio.adb<a-suteio-shared.adb \
424 a-strunb.ads<a-strunb-shared.ads \
425 a-strunb.adb<a-strunb-shared.adb \
426 a-stwiun.adb<a-stwiun-shared.adb \
427 a-stwiun.ads<a-stwiun-shared.ads \
428 a-swunau.adb<a-swunau-shared.adb \
429 a-swuwti.adb<a-swuwti-shared.adb \
430 a-stzunb.adb<a-stzunb-shared.adb \
431 a-stzunb.ads<a-stzunb-shared.ads \
432 a-szunau.adb<a-szunau-shared.adb \
433 a-szuzti.adb<a-szuzti-shared.adb
434
435 ATOMICS_BUILTINS_TARGET_PAIRS = \
436 s-atocou.adb<s-atocou-builtin.adb
437
438 # Special version of units for x86 and x86-64 platforms.
439
440 X86_TARGET_PAIRS = \
441 a-numaux.ads<a-numaux-x86.ads \
442 a-numaux.adb<a-numaux-x86.adb \
443 s-atocou.adb<s-atocou-x86.adb
444
445 X86_64_TARGET_PAIRS = \
446 a-numaux.ads<a-numaux-x86.ads \
447 a-numaux.adb<a-numaux-x86.adb \
448 s-atocou.adb<s-atocou-builtin.adb
449
450 LIB_VERSION = $(strip $(shell grep ' Library_Version :' $(fsrcpfx)ada/gnatvsn.ads | sed -e 's/.*"\(.*\)".*/\1/'))
451
452 # Additionnal object files from C source to be added to libgnat.
453 EXTRA_LIBGNAT_OBJS=
454 # Additionnal C source file to be added to libgnat without corresponding object
455 # file (included files).
456 EXTRA_LIBGNAT_SRCS=
457
458 # $(filter-out PATTERN...,TEXT) removes all PATTERN words from TEXT.
459 # $(strip STRING) removes leading and trailing spaces from STRING.
460 # If what's left is null then it's a match.
461
462 # m68k VxWorks
463 ifeq ($(strip $(filter-out m68k% wrs vx%,$(targ))),)
464 LIBGNAT_TARGET_PAIRS = \
465 a-intnam.ads<a-intnam-vxworks.ads \
466 a-numaux.ads<a-numaux-vxworks.ads \
467 s-inmaop.adb<s-inmaop-vxworks.adb \
468 s-interr.adb<s-interr-hwint.adb \
469 s-intman.ads<s-intman-vxworks.ads \
470 s-intman.adb<s-intman-vxworks.adb \
471 s-osinte.adb<s-osinte-vxworks.adb \
472 s-osinte.ads<s-osinte-vxworks.ads \
473 s-osprim.adb<s-osprim-vxworks.adb \
474 s-parame.ads<s-parame-vxworks.ads \
475 s-parame.adb<s-parame-vxworks.adb \
476 s-stchop.ads<s-stchop-limit.ads \
477 s-stchop.adb<s-stchop-vxworks.adb \
478 s-taprop.adb<s-taprop-vxworks.adb \
479 s-tasinf.ads<s-tasinf-vxworks.ads \
480 s-taspri.ads<s-taspri-vxworks.ads \
481 s-tpopsp.adb<s-tpopsp-vxworks.adb \
482 s-vxwork.ads<s-vxwork-m68k.ads \
483 g-socthi.ads<g-socthi-vxworks.ads \
484 g-socthi.adb<g-socthi-vxworks.adb \
485 g-stsifd.adb<g-stsifd-sockets.adb \
486 system.ads<system-vxworks-m68k.ads
487
488 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb
489
490 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
491 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o s-vxwext.o
492
493 EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
494
495 ifeq ($(strip $(filter-out yes,$(TRACE))),)
496 LIBGNAT_TARGET_PAIRS += \
497 s-traces.adb<s-traces-default.adb \
498 s-tratas.adb<s-tratas-default.adb \
499 s-trafor.adb<s-trafor-default.adb \
500 s-trafor.ads<s-trafor-default.ads \
501 s-tfsetr.adb<s-tfsetr-vxworks.adb
502 endif
503 endif
504
505 # PowerPC and e500v2 VxWorks
506 ifeq ($(strip $(filter-out e500% powerpc% wrs vxworks,$(targ))),)
507 LIBGNAT_TARGET_PAIRS = \
508 a-intnam.ads<a-intnam-vxworks.ads \
509 a-numaux.ads<a-numaux-vxworks.ads \
510 s-inmaop.adb<s-inmaop-vxworks.adb \
511 s-intman.ads<s-intman-vxworks.ads \
512 s-intman.adb<s-intman-vxworks.adb \
513 s-osinte.ads<s-osinte-vxworks.ads \
514 s-osinte.adb<s-osinte-vxworks.adb \
515 s-osprim.adb<s-osprim-vxworks.adb \
516 s-parame.ads<s-parame-vxworks.ads \
517 s-parame.adb<s-parame-vxworks.adb \
518 s-stchop.ads<s-stchop-limit.ads \
519 s-stchop.adb<s-stchop-vxworks.adb \
520 s-taprop.adb<s-taprop-vxworks.adb \
521 s-tasinf.ads<s-tasinf-vxworks.ads \
522 s-taspri.ads<s-taspri-vxworks.ads \
523 s-vxwork.ads<s-vxwork-ppc.ads \
524 g-socthi.ads<g-socthi-vxworks.ads \
525 g-socthi.adb<g-socthi-vxworks.adb \
526 g-stsifd.adb<g-stsifd-sockets.adb \
527 $(ATOMICS_TARGET_PAIRS) \
528 $(ATOMICS_BUILTINS_TARGET_PAIRS)
529
530 TOOLS_TARGET_PAIRS=\
531 mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
532 indepsw.adb<indepsw-gnu.adb
533
534 ifeq ($(strip $(filter-out yes,$(TRACE))),)
535 LIBGNAT_TARGET_PAIRS += \
536 s-traces.adb<s-traces-default.adb \
537 s-trafor.adb<s-trafor-default.adb \
538 s-trafor.ads<s-trafor-default.ads \
539 s-tratas.adb<s-tratas-default.adb \
540 s-tfsetr.adb<s-tfsetr-vxworks.adb
541 endif
542
543 ifeq ($(strip $(filter-out rtp,$(THREAD_KIND))),)
544 LIBGNAT_TARGET_PAIRS += \
545 s-vxwext.ads<s-vxwext-rtp.ads \
546 s-vxwext.adb<s-vxwext-rtp.adb \
547 s-tpopsp.adb<s-tpopsp-vxworks-rtp.adb \
548 system.ads<system-vxworks-ppc-rtp.ads
549
550 EXTRA_GNATRTL_NONTASKING_OBJS=s-vxwexc.o
551 else
552 ifeq ($(strip $(filter-out rtp-smp,$(THREAD_KIND))),)
553 LIBGNAT_TARGET_PAIRS += \
554 s-mudido.adb<s-mudido-affinity.adb \
555 s-vxwext.ads<s-vxwext-rtp.ads \
556 s-vxwext.adb<s-vxwext-rtp-smp.adb \
557 s-tpopsp.adb<s-tpopsp-vxworks-tls.adb \
558 system.ads<system-vxworks-ppc-rtp.ads
559
560 EXTRA_GNATRTL_NONTASKING_OBJS=s-vxwexc.o
561 EXTRA_LIBGNAT_OBJS+=affinity.o
562 else
563 ifeq ($(strip $(filter-out kernel-smp,$(THREAD_KIND))),)
564 LIBGNAT_TARGET_PAIRS += \
565 s-interr.adb<s-interr-hwint.adb \
566 s-mudido.adb<s-mudido-affinity.adb \
567 s-tpopsp.adb<s-tpopsp-vxworks-tls.adb \
568 s-vxwext.ads<s-vxwext-kernel.ads \
569 s-vxwext.adb<s-vxwext-kernel-smp.adb \
570 system.ads<system-vxworks-ppc-kernel.ads
571
572 EH_MECHANISM=-gcc
573 EXTRA_LIBGNAT_OBJS+=affinity.o
574 else
575 LIBGNAT_TARGET_PAIRS += \
576 s-interr.adb<s-interr-hwint.adb \
577 s-tpopsp.adb<s-tpopsp-vxworks.adb
578
579 ifeq ($(strip $(filter-out kernel,$(THREAD_KIND))),)
580 EH_MECHANISM=-gcc
581 LIBGNAT_TARGET_PAIRS += \
582 s-vxwext.ads<s-vxwext-kernel.ads \
583 s-vxwext.adb<s-vxwext-kernel.adb \
584 system.ads<system-vxworks-ppc-kernel.ads
585 else
586 LIBGNAT_TARGET_PAIRS += \
587 system.ads<system-vxworks-ppc.ads
588 endif
589 endif
590 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o s-vxwexc.o
591 EXTRA_LIBGNAT_OBJS+=sigtramp-ppcvxw.o
592 endif
593 endif
594
595 EXTRA_GNATRTL_TASKING_OBJS += s-vxwork.o s-vxwext.o
596
597 EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
598 endif
599
600 # PowerPC and e500v2 VxWorks 653
601 ifeq ($(strip $(filter-out powerpc% e500v2 wrs vxworksae,$(targ))),)
602 # target pairs for vthreads runtime
603 LIBGNAT_TARGET_PAIRS = \
604 a-elchha.adb<a-elchha-vxworks-ppc-full.adb \
605 a-intnam.ads<a-intnam-vxworks.ads \
606 a-numaux.ads<a-numaux-vxworks.ads \
607 g-io.adb<g-io-vxworks-ppc-cert.adb \
608 s-inmaop.adb<s-inmaop-vxworks.adb \
609 s-interr.adb<s-interr-hwint.adb \
610 s-intman.ads<s-intman-vxworks.ads \
611 s-intman.adb<s-intman-vxworks.adb \
612 s-osinte.adb<s-osinte-vxworks.adb \
613 s-osinte.ads<s-osinte-vxworks.ads \
614 s-osprim.adb<s-osprim-vxworks.adb \
615 s-parame.ads<s-parame-ae653.ads \
616 s-parame.adb<s-parame-vxworks.adb \
617 s-taprop.adb<s-taprop-vxworks.adb \
618 s-tasinf.ads<s-tasinf-vxworks.ads \
619 s-taspri.ads<s-taspri-vxworks.ads \
620 s-tpopsp.adb<s-tpopsp-vxworks.adb \
621 s-vxwext.adb<s-vxwext-noints.adb \
622 s-vxwext.ads<s-vxwext-vthreads.ads \
623 s-vxwork.ads<s-vxwork-ppc.ads \
624 system.ads<system-vxworks-ppc-vthread.ads \
625 $(ATOMICS_TARGET_PAIRS) \
626 $(ATOMICS_BUILTINS_TARGET_PAIRS)
627
628 TOOLS_TARGET_PAIRS=\
629 mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
630 indepsw.adb<indepsw-gnu.adb
631
632 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o s-vxwexc.o
633 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o s-vxwext.o
634
635 EXTRA_LIBGNAT_OBJS+=sigtramp-ppcvxw.o
636
637 # Extra pairs for the vthreads runtime
638 ifeq ($(strip $(filter-out vthreads,$(THREAD_KIND))),)
639 LIBGNAT_TARGET_PAIRS += \
640 s-thread.adb<s-thread-ae653.adb \
641 $(DUMMY_SOCKETS_TARGET_PAIRS)
642
643 GNATRTL_SOCKETS_OBJS =
644 EXTRA_GNATRTL_NONTASKING_OBJS += s-thread.o
645 else
646 LIBGNAT_TARGET_PAIRS += \
647 g-socthi.ads<g-socthi-vxworks.ads \
648 g-socthi.adb<g-socthi-vxworks.adb \
649 g-stsifd.adb<g-stsifd-sockets.adb
650 endif
651
652 ifeq ($(strip $(filter-out yes,$(TRACE))),)
653 LIBGNAT_TARGET_PAIRS += \
654 s-traces.adb<s-traces-default.adb \
655 s-trafor.adb<s-trafor-default.adb \
656 s-trafor.ads<s-trafor-default.ads \
657 s-tratas.adb<s-tratas-default.adb \
658 s-tfsetr.adb<s-tfsetr-vxworks.adb
659 endif
660 endif
661
662 # PowerPC and e500v2 VxWorks MILS
663 ifeq ($(strip $(filter-out e500% powerpc% wrs vxworksmils,$(targ))),)
664 # target pairs for vthreads runtime
665 LIBGNAT_TARGET_PAIRS = \
666 a-elchha.adb<a-elchha-vx6-raven-cert.adb \
667 a-intnam.ads<a-intnam-vxworks.ads \
668 a-numaux.ads<a-numaux-vxworks.ads \
669 g-io.adb<g-io-vxworks-ppc-cert.adb \
670 s-inmaop.adb<s-inmaop-vxworks.adb \
671 s-interr.adb<s-interr-hwint.adb \
672 s-intman.ads<s-intman-vxworks.ads \
673 s-intman.adb<s-intman-vxworks.adb \
674 s-osinte.adb<s-osinte-vxworks.adb \
675 s-osinte.ads<s-osinte-vxworks.ads \
676 s-osprim.adb<s-osprim-vxworks.adb \
677 s-parame.ads<s-parame-ae653.ads \
678 s-parame.adb<s-parame-vxworks.adb \
679 s-stchop.adb<s-stchop-vxworks.adb \
680 s-stchop.ads<s-stchop-limit.ads \
681 s-taprop.adb<s-taprop-vxworks.adb \
682 s-tasinf.ads<s-tasinf-vxworks.ads \
683 s-taspri.ads<s-taspri-vxworks.ads \
684 s-thread.adb<s-thread-ae653.adb \
685 s-tpopsp.adb<s-tpopsp-vxworks.adb \
686 s-vxwork.ads<s-vxwork-ppc.ads \
687 system.ads<system-vxworks-ppc-mils.ads \
688 $(ATOMICS_TARGET_PAIRS) \
689 $(ATOMICS_BUILTINS_TARGET_PAIRS) \
690 $(DUMMY_SOCKETS_TARGET_PAIRS)
691
692 TOOLS_TARGET_PAIRS=\
693 mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
694 indepsw.adb<indepsw-gnu.adb
695
696 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o s-thread.o s-vxwexc.o
697 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o s-vxwext.o
698
699 EXTRA_LIBGNAT_OBJS+=vx_stack_info.o sigtramp-ppcvxw.o
700 GNATRTL_SOCKETS_OBJS =
701
702 ifeq ($(strip $(filter-out yes,$(TRACE))),)
703 LIBGNAT_TARGET_PAIRS += \
704 s-traces.adb<s-traces-default.adb \
705 s-trafor.adb<s-trafor-default.adb \
706 s-trafor.ads<s-trafor-default.ads \
707 s-tratas.adb<s-tratas-default.adb \
708 s-tfsetr.adb<s-tfsetr-vxworks.adb
709 endif
710 endif
711
712 # VxWorksae / VxWorks 653 for x86 (vxsim) - ?? VxWorks mils not implemented
713 ifeq ($(strip $(filter-out %86 wrs vxworksae vxworksmils,$(targ))),)
714 # target pairs for kernel + vthreads runtime
715 LIBGNAT_TARGET_PAIRS = \
716 a-elchha.adb<a-elchha-vxworks-ppc-full.adb \
717 a-intnam.ads<a-intnam-vxworks.ads \
718 a-sytaco.ads<1asytaco.ads \
719 a-sytaco.adb<1asytaco.adb \
720 g-io.adb<g-io-vxworks-ppc-cert.adb \
721 s-inmaop.adb<s-inmaop-vxworks.adb \
722 s-interr.adb<s-interr-hwint.adb \
723 s-intman.ads<s-intman-vxworks.ads \
724 s-intman.adb<s-intman-vxworks.adb \
725 s-osinte.adb<s-osinte-vxworks.adb \
726 s-osinte.ads<s-osinte-vxworks.ads \
727 s-osprim.adb<s-osprim-vxworks.adb \
728 s-parame.ads<s-parame-ae653.ads \
729 s-taprop.adb<s-taprop-vxworks.adb \
730 s-tasinf.ads<s-tasinf-vxworks.ads \
731 s-taspri.ads<s-taspri-vxworks.ads \
732 s-tpopsp.adb<s-tpopsp-vxworks.adb \
733 s-vxwext.adb<s-vxwext-noints.adb \
734 s-vxwext.ads<s-vxwext-vthreads.ads \
735 s-vxwork.ads<s-vxwork-x86.ads \
736 $(ATOMICS_TARGET_PAIRS) \
737 $(X86_TARGET_PAIRS) \
738 system.ads<system-vxworks-x86.ads
739
740 TOOLS_TARGET_PAIRS=\
741 mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
742 indepsw.adb<indepsw-gnu.adb
743
744 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o s-vxwexc.o
745 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o s-vxwext.o
746
747 # Extra pairs for the vthreads runtime
748 ifeq ($(strip $(filter-out vthreads,$(THREAD_KIND))),)
749 LIBGNAT_TARGET_PAIRS += \
750 s-thread.adb<s-thread-ae653.adb \
751 $(DUMMY_SOCKETS_TARGET_PAIRS)
752
753 GNATRTL_SOCKETS_OBJS =
754 EXTRA_GNATRTL_NONTASKING_OBJS += s-thread.o
755 else
756 LIBGNAT_TARGET_PAIRS += \
757 g-socthi.ads<g-socthi-vxworks.ads \
758 g-socthi.adb<g-socthi-vxworks.adb \
759 g-stsifd.adb<g-stsifd-sockets.adb
760 endif
761
762 ifeq ($(strip $(filter-out yes,$(TRACE))),)
763 LIBGNAT_TARGET_PAIRS += \
764 s-traces.adb<s-traces-default.adb \
765 s-trafor.adb<s-trafor-default.adb \
766 s-trafor.ads<s-trafor-default.ads \
767 s-tratas.adb<s-tratas-default.adb \
768 s-tfsetr.adb<s-tfsetr-vxworks.adb
769 endif
770 endif
771
772 # Sparc VxWorks
773 ifeq ($(strip $(filter-out sparc% wrs vx%,$(targ))),)
774 LIBGNAT_TARGET_PAIRS = \
775 a-intnam.ads<a-intnam-vxworks.ads \
776 a-numaux.ads<a-numaux-vxworks.ads \
777 s-inmaop.adb<s-inmaop-vxworks.adb \
778 s-interr.adb<s-interr-hwint.adb \
779 s-intman.ads<s-intman-vxworks.ads \
780 s-intman.adb<s-intman-vxworks.adb \
781 s-osinte.adb<s-osinte-vxworks.adb \
782 s-osinte.ads<s-osinte-vxworks.ads \
783 s-osprim.adb<s-osprim-vxworks.adb \
784 s-parame.ads<s-parame-vxworks.ads \
785 s-parame.adb<s-parame-vxworks.adb \
786 s-stchop.ads<s-stchop-limit.ads \
787 s-stchop.adb<s-stchop-vxworks.adb \
788 s-taprop.adb<s-taprop-vxworks.adb \
789 s-tasinf.ads<s-tasinf-vxworks.ads \
790 s-taspri.ads<s-taspri-vxworks.ads \
791 s-tpopsp.adb<s-tpopsp-vxworks.adb \
792 g-socthi.ads<g-socthi-vxworks.ads \
793 g-socthi.adb<g-socthi-vxworks.adb \
794 g-stsifd.adb<g-stsifd-sockets.adb
795
796 TOOLS_TARGET_PAIRS=\
797 mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
798 indepsw.adb<indepsw-gnu.adb
799
800 ifeq ($(arch),sparc)
801 # 32-bits
802 LIBGNAT_TARGET_PAIRS += \
803 s-vxwork.ads<s-vxwork-sparc.ads \
804 system.ads<system-vxworks-sparc-kernel.ads
805 else
806 # 64-bits
807 LIBGNAT_TARGET_PAIRS += \
808 s-vxwork.ads<s-vxwork-sparcv9.ads \
809 system.ads<system-vxworks-sparcv9.ads
810 endif
811
812 ifeq ($(strip $(filter-out kernel,$(THREAD_KIND))),)
813 LIBGNAT_TARGET_PAIRS += \
814 s-vxwext.ads<s-vxwext-kernel.ads \
815 s-vxwext.adb<s-vxwext-kernel.adb
816 endif
817
818 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
819 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o s-vxwext.o
820
821 EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
822 endif
823
824 # x86 VxWorks
825 ifeq ($(strip $(filter-out %86 wrs vxworks,$(targ))),)
826 LIBGNAT_TARGET_PAIRS = \
827 a-intnam.ads<a-intnam-vxworks.ads \
828 i-vxwork.ads<i-vxwork-x86.ads \
829 s-osinte.adb<s-osinte-vxworks.adb \
830 s-osinte.ads<s-osinte-vxworks.ads \
831 s-inmaop.adb<s-inmaop-vxworks.adb \
832 s-intman.ads<s-intman-vxworks.ads \
833 s-intman.adb<s-intman-vxworks.adb \
834 s-osprim.adb<s-osprim-vxworks.adb \
835 s-parame.ads<s-parame-vxworks.ads \
836 s-parame.adb<s-parame-vxworks.adb \
837 s-stchop.ads<s-stchop-limit.ads \
838 s-stchop.adb<s-stchop-vxworks.adb \
839 s-taprop.adb<s-taprop-vxworks.adb \
840 s-tasinf.ads<s-tasinf-vxworks.ads \
841 s-taspri.ads<s-taspri-vxworks.ads \
842 s-vxwork.ads<s-vxwork-x86.ads \
843 g-socthi.ads<g-socthi-vxworks.ads \
844 g-socthi.adb<g-socthi-vxworks.adb \
845 g-stsifd.adb<g-stsifd-sockets.adb \
846 $(ATOMICS_TARGET_PAIRS) \
847 $(X86_TARGET_PAIRS)
848
849 TOOLS_TARGET_PAIRS=\
850 mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
851 indepsw.adb<indepsw-gnu.adb
852
853 ifeq ($(strip $(filter-out yes,$(TRACE))),)
854 LIBGNAT_TARGET_PAIRS += \
855 s-traces.adb<s-traces-default.adb \
856 s-trafor.adb<s-trafor-default.adb \
857 s-trafor.ads<s-trafor-default.ads \
858 s-tratas.adb<s-tratas-default.adb \
859 s-tfsetr.adb<s-tfsetr-vxworks.adb
860 endif
861
862 ifeq ($(strip $(filter-out rtp,$(THREAD_KIND))),)
863 LIBGNAT_TARGET_PAIRS += \
864 s-vxwext.ads<s-vxwext-rtp.ads \
865 s-vxwext.adb<s-vxwext-rtp.adb \
866 s-tpopsp.adb<s-tpopsp-vxworks-rtp.adb \
867 system.ads<system-vxworks-x86-rtp.ads
868
869 EXTRA_GNATRTL_NONTASKING_OBJS=s-vxwexc.o
870 else
871 ifeq ($(strip $(filter-out rtp-smp, $(THREAD_KIND))),)
872 LIBGNAT_TARGET_PAIRS += \
873 s-mudido.adb<s-mudido-affinity.adb \
874 s-vxwext.ads<s-vxwext-rtp.ads \
875 s-vxwext.adb<s-vxwext-rtp-smp.adb \
876 s-tpopsp.adb<s-tpopsp-vxworks-tls.adb \
877 system.ads<system-vxworks-x86-rtp.ads
878
879 EXTRA_GNATRTL_NONTASKING_OBJS=s-vxwexc.o
880 EXTRA_LIBGNAT_OBJS+=affinity.o
881 else
882 ifeq ($(strip $(filter-out kernel-smp, $(THREAD_KIND))),)
883 LIBGNAT_TARGET_PAIRS += \
884 s-interr.adb<s-interr-hwint.adb \
885 s-mudido.adb<s-mudido-affinity.adb \
886 s-tpopsp.adb<s-tpopsp-vxworks-tls.adb \
887 s-vxwext.ads<s-vxwext-kernel.ads \
888 s-vxwext.adb<s-vxwext-kernel-smp.adb \
889 system.ads<system-vxworks-x86-kernel.ads
890 EXTRA_LIBGNAT_OBJS+=affinity.o
891 else
892 LIBGNAT_TARGET_PAIRS += \
893 s-interr.adb<s-interr-hwint.adb \
894 s-tpopsp.adb<s-tpopsp-vxworks.adb
895
896 ifeq ($(strip $(filter-out kernel,$(THREAD_KIND))),)
897 LIBGNAT_TARGET_PAIRS += \
898 s-vxwext.ads<s-vxwext-kernel.ads \
899 s-vxwext.adb<s-vxwext-kernel.adb \
900 system.ads<system-vxworks-x86-kernel.ads
901 else
902 LIBGNAT_TARGET_PAIRS += \
903 system.ads<system-vxworks-x86.ads
904 endif
905 endif
906
907 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o s-vxwexc.o
908 endif
909 endif
910 EXTRA_GNATRTL_TASKING_OBJS += s-vxwork.o s-vxwext.o
911
912 EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
913 endif
914
915 # ARM VxWorks
916 ifeq ($(strip $(filter-out arm% coff wrs vx%,$(targ))),)
917 LIBGNAT_TARGET_PAIRS = \
918 a-intnam.ads<a-intnam-vxworks.ads \
919 a-numaux.ads<a-numaux-vxworks.ads \
920 s-inmaop.adb<s-inmaop-vxworks.adb \
921 s-interr.adb<s-interr-hwint.adb \
922 s-intman.ads<s-intman-vxworks.ads \
923 s-intman.adb<s-intman-vxworks.adb \
924 s-osinte.adb<s-osinte-vxworks.adb \
925 s-osinte.ads<s-osinte-vxworks.ads \
926 s-osprim.adb<s-osprim-vxworks.adb \
927 s-parame.ads<s-parame-vxworks.ads \
928 s-parame.adb<s-parame-vxworks.adb \
929 s-stchop.ads<s-stchop-limit.ads \
930 s-stchop.adb<s-stchop-vxworks.adb \
931 s-taprop.adb<s-taprop-vxworks.adb \
932 s-tasinf.ads<s-tasinf-vxworks.ads \
933 s-taspri.ads<s-taspri-vxworks.ads \
934 s-tpopsp.adb<s-tpopsp-vxworks.adb \
935 s-vxwork.ads<s-vxwork-arm.ads \
936 g-socthi.ads<g-socthi-vxworks.ads \
937 g-socthi.adb<g-socthi-vxworks.adb \
938 g-stsifd.adb<g-stsifd-sockets.adb \
939 system.ads<system-vxworks-arm.ads
940
941 TOOLS_TARGET_PAIRS=\
942 mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
943 indepsw.adb<indepsw-gnu.adb
944
945 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
946 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o s-vxwext.o
947
948 EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
949 endif
950
951 # MIPS VxWorks
952 ifeq ($(strip $(filter-out mips% wrs vx%,$(targ))),)
953 LIBGNAT_TARGET_PAIRS = \
954 a-intnam.ads<a-intnam-vxworks.ads \
955 a-numaux.ads<a-numaux-vxworks.ads \
956 s-inmaop.adb<s-inmaop-vxworks.adb \
957 s-interr.adb<s-interr-hwint.adb \
958 s-intman.ads<s-intman-vxworks.ads \
959 s-intman.adb<s-intman-vxworks.adb \
960 s-osinte.adb<s-osinte-vxworks.adb \
961 s-osinte.ads<s-osinte-vxworks.ads \
962 s-osprim.adb<s-osprim-vxworks.adb \
963 s-parame.ads<s-parame-vxworks.ads \
964 s-parame.adb<s-parame-vxworks.adb \
965 s-stchop.ads<s-stchop-limit.ads \
966 s-stchop.adb<s-stchop-vxworks.adb \
967 s-taprop.adb<s-taprop-vxworks.adb \
968 s-tasinf.ads<s-tasinf-vxworks.ads \
969 s-taspri.ads<s-taspri-vxworks.ads \
970 s-tpopsp.adb<s-tpopsp-vxworks.adb \
971 s-vxwork.ads<s-vxwork-mips.ads \
972 g-socthi.ads<g-socthi-vxworks.ads \
973 g-socthi.adb<g-socthi-vxworks.adb \
974 g-stsifd.adb<g-stsifd-sockets.adb \
975 system.ads<system-vxworks-mips.ads
976
977 TOOLS_TARGET_PAIRS=\
978 mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
979 indepsw.adb<indepsw-gnu.adb
980
981 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
982 EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o s-vxwext.o
983
984 EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
985 endif
986
987 ifeq ($(strip $(filter-out arm% linux-androideabi,$(arch) $(osys)-$(word 4,$(targ)))),)
988 LIBGNAT_TARGET_PAIRS = \
989 a-intnam.ads<a-intnam-linux.ads \
990 s-inmaop.adb<s-inmaop-posix.adb \
991 s-intman.adb<s-intman-posix.adb \
992 s-linux.ads<s-linux.ads \
993 s-osinte.adb<s-osinte-android.adb \
994 s-osinte.ads<s-osinte-android.ads \
995 s-osprim.adb<s-osprim-posix.adb \
996 s-taprop.adb<s-taprop-posix.adb \
997 s-taspri.ads<s-taspri-posix-noaltstack.ads \
998 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
999 system.ads<system-linux-armel.ads \
1000 $(DUMMY_SOCKETS_TARGET_PAIRS)
1001
1002 TOOLS_TARGET_PAIRS = \
1003 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1004 indepsw.adb<indepsw-gnu.adb
1005
1006 GNATRTL_SOCKETS_OBJS =
1007 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1008 EH_MECHANISM=
1009 THREADSLIB =
1010 GNATLIB_SHARED = gnatlib-shared-dual
1011 LIBRARY_VERSION := $(LIB_VERSION)
1012 endif
1013
1014 # Sparc Solaris
1015 ifeq ($(strip $(filter-out sparc% sun solaris%,$(targ))),)
1016 LIBGNAT_TARGET_PAIRS_COMMON = \
1017 a-intnam.ads<a-intnam-solaris.ads \
1018 s-inmaop.adb<s-inmaop-posix.adb \
1019 s-intman.adb<s-intman-solaris.adb \
1020 s-mudido.adb<s-mudido-affinity.adb \
1021 s-osinte.adb<s-osinte-solaris.adb \
1022 s-osinte.ads<s-osinte-solaris.ads \
1023 s-osprim.adb<s-osprim-solaris.adb \
1024 s-taprop.adb<s-taprop-solaris.adb \
1025 s-tasinf.adb<s-tasinf-solaris.adb \
1026 s-tasinf.ads<s-tasinf-solaris.ads \
1027 s-taspri.ads<s-taspri-solaris.ads \
1028 s-tpopsp.adb<s-tpopsp-solaris.adb \
1029 g-soliop.ads<g-soliop-solaris.ads
1030
1031 LIBGNAT_TARGET_PAIRS_32 = \
1032 system.ads<system-solaris-sparc.ads
1033
1034 LIBGNAT_TARGET_PAIRS_64 = \
1035 system.ads<system-solaris-sparcv9.ads \
1036 $(ATOMICS_TARGET_PAIRS) \
1037 $(ATOMICS_BUILTINS_TARGET_PAIRS)
1038
1039 ifeq ($(strip $(filter-out sparc sun solaris%,$(targ))),)
1040 ifeq ($(strip $(MULTISUBDIR)),/sparcv9)
1041 LIBGNAT_TARGET_PAIRS = \
1042 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
1043 else
1044 LIBGNAT_TARGET_PAIRS = \
1045 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
1046 endif
1047 else
1048 ifeq ($(strip $(MULTISUBDIR)),/sparcv8plus)
1049 LIBGNAT_TARGET_PAIRS = \
1050 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
1051 else
1052 LIBGNAT_TARGET_PAIRS = \
1053 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
1054 endif
1055 endif
1056
1057 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-solaris.adb
1058
1059 EH_MECHANISM=-gcc
1060 THREADSLIB = -lposix4 -lthread
1061 MISCLIB = -lposix4 -lnsl -lsocket
1062 SO_OPTS = -Wl,-h,
1063 GNATLIB_SHARED = gnatlib-shared-dual
1064 GMEM_LIB = gmemlib
1065 LIBRARY_VERSION := $(LIB_VERSION)
1066
1067 ifeq ($(strip $(filter-out pthread PTHREAD,$(THREAD_KIND))),)
1068 LIBGNAT_TARGET_PAIRS = \
1069 a-intnam.ads<a-intnam-solaris.ads \
1070 s-inmaop.adb<s-inmaop-posix.adb \
1071 s-intman.adb<s-intman-posix.adb \
1072 s-osinte.adb<s-osinte-posix.adb \
1073 s-osinte.ads<s-osinte-solaris-posix.ads \
1074 s-osprim.adb<s-osprim-solaris.adb \
1075 s-taprop.adb<s-taprop-posix.adb \
1076 s-taspri.ads<s-taspri-posix.ads \
1077 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1078 g-soliop.ads<g-soliop-solaris.ads \
1079 system.ads<system-solaris-sparc.ads
1080
1081 THREADSLIB = -lposix4 -lpthread
1082 endif
1083
1084 ifeq ($(strip $(filter-out m64,$(THREAD_KIND))),)
1085 LIBGNAT_TARGET_PAIRS = $(LIBGNAT_TARGET_PAIRS_64)
1086 endif
1087 endif
1088
1089 # x86 and x86-64 solaris
1090 ifeq ($(strip $(filter-out %86 %x86_64 solaris2%,$(arch) $(osys))),)
1091 LIBGNAT_TARGET_PAIRS_COMMON = \
1092 a-intnam.ads<a-intnam-solaris.ads \
1093 s-inmaop.adb<s-inmaop-posix.adb \
1094 s-intman.adb<s-intman-solaris.adb \
1095 s-mudido.adb<s-mudido-affinity.adb \
1096 s-osinte.adb<s-osinte-solaris.adb \
1097 s-osinte.ads<s-osinte-solaris.ads \
1098 s-osprim.adb<s-osprim-solaris.adb \
1099 s-taprop.adb<s-taprop-solaris.adb \
1100 s-tasinf.adb<s-tasinf-solaris.adb \
1101 s-tasinf.ads<s-tasinf-solaris.ads \
1102 s-taspri.ads<s-taspri-solaris.ads \
1103 s-tpopsp.adb<s-tpopsp-solaris.adb \
1104 g-soliop.ads<g-soliop-solaris.ads \
1105 $(ATOMICS_TARGET_PAIRS)
1106
1107 LIBGNAT_TARGET_PAIRS_32 = \
1108 $(X86_TARGET_PAIRS) \
1109 system.ads<system-solaris-x86.ads
1110
1111 LIBGNAT_TARGET_PAIRS_64 = \
1112 $(X86_64_TARGET_PAIRS) \
1113 system.ads<system-solaris-x86_64.ads
1114
1115 ifeq ($(strip $(filter-out %86 solaris2%,$(arch) $(osys))),)
1116 ifeq ($(strip $(MULTISUBDIR)),/amd64)
1117 LIBGNAT_TARGET_PAIRS = \
1118 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
1119 else
1120 LIBGNAT_TARGET_PAIRS = \
1121 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
1122 endif
1123 else
1124 ifeq ($(strip $(MULTISUBDIR)),/32)
1125 LIBGNAT_TARGET_PAIRS = \
1126 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
1127 else
1128 LIBGNAT_TARGET_PAIRS = \
1129 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
1130 endif
1131 endif
1132
1133 TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-solaris.adb
1134
1135 EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
1136
1137 EH_MECHANISM=-gcc
1138 THREADSLIB = -lposix4 -lthread
1139 MISCLIB = -lposix4 -lnsl -lsocket
1140 SO_OPTS = -Wl,-h,
1141 GNATLIB_SHARED = gnatlib-shared-dual
1142 GMEM_LIB = gmemlib
1143 LIBRARY_VERSION := $(LIB_VERSION)
1144 endif
1145
1146 # x86 Linux
1147 ifeq ($(strip $(filter-out %86 linux%,$(arch) $(osys))),)
1148 LIBGNAT_TARGET_PAIRS = \
1149 a-intnam.ads<a-intnam-linux.ads \
1150 a-synbar.adb<a-synbar-posix.adb \
1151 a-synbar.ads<a-synbar-posix.ads \
1152 s-inmaop.adb<s-inmaop-posix.adb \
1153 s-intman.adb<s-intman-posix.adb \
1154 s-tpopsp.adb<s-tpopsp-tls.adb \
1155 g-sercom.adb<g-sercom-linux.adb \
1156 a-exetim.adb<a-exetim-posix.adb \
1157 a-exetim.ads<a-exetim-default.ads \
1158 s-linux.ads<s-linux.ads \
1159 s-osinte.adb<s-osinte-posix.adb \
1160 $(ATOMICS_TARGET_PAIRS)
1161
1162 LIBGNAT_TARGET_PAIRS_32 = \
1163 $(X86_TARGET_PAIRS) \
1164 system.ads<system-linux-x86.ads
1165
1166 LIBGNAT_TARGET_PAIRS_64 = \
1167 $(X86_64_TARGET_PAIRS) \
1168 system.ads<system-linux-x86_64.ads
1169
1170 ifeq ($(strip $(MULTISUBDIR)),/64)
1171 LIBGNAT_TARGET_PAIRS += $(LIBGNAT_TARGET_PAIRS_64)
1172 else
1173 LIBGNAT_TARGET_PAIRS += $(LIBGNAT_TARGET_PAIRS_32)
1174 endif
1175
1176 ifeq ($(strip $(filter-out xenomai,$(THREAD_KIND))),)
1177 LIBGNAT_TARGET_PAIRS += \
1178 s-osinte.ads<s-osinte-linux-xenomai.ads \
1179 s-osprim.adb<s-osprim-linux-xenomai.adb \
1180 s-taprop.adb<s-taprop-linux-xenomai.adb \
1181 s-taspri.ads<s-taspri-linux-xenomai.ads
1182 else
1183 LIBGNAT_TARGET_PAIRS += \
1184 s-mudido.adb<s-mudido-affinity.adb \
1185 s-osinte.ads<s-osinte-linux.ads \
1186 s-osprim.adb<s-osprim-posix.adb \
1187 s-taprop.adb<s-taprop-linux.adb \
1188 s-tasinf.ads<s-tasinf-linux.ads \
1189 s-tasinf.adb<s-tasinf-linux.adb \
1190 s-taspri.ads<s-taspri-posix.ads
1191 endif
1192
1193 EH_MECHANISM=-gcc
1194 THREADSLIB = -lpthread -lrt
1195 EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
1196 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o a-exetim.o
1197
1198 TOOLS_TARGET_PAIRS = \
1199 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1200 indepsw.adb<indepsw-gnu.adb
1201
1202 GNATLIB_SHARED = gnatlib-shared-dual
1203 GMEM_LIB = gmemlib
1204 LIBRARY_VERSION := $(LIB_VERSION)
1205 endif
1206
1207 # x86 kfreebsd
1208 ifeq ($(strip $(filter-out %86 kfreebsd%,$(arch) $(osys))),)
1209 LIBGNAT_TARGET_PAIRS = \
1210 a-intnam.ads<a-intnam-freebsd.ads \
1211 s-inmaop.adb<s-inmaop-posix.adb \
1212 s-intman.adb<s-intman-posix.adb \
1213 s-osinte.adb<s-osinte-posix.adb \
1214 s-osinte.ads<s-osinte-kfreebsd-gnu.ads \
1215 s-osprim.adb<s-osprim-posix.adb \
1216 s-taprop.adb<s-taprop-linux.adb \
1217 s-tasinf.ads<s-tasinf-linux.ads \
1218 s-tasinf.adb<s-tasinf-linux.adb \
1219 s-taspri.ads<s-taspri-posix.ads \
1220 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1221 $(ATOMICS_TARGET_PAIRS) \
1222 $(X86_TARGET_PAIRS) \
1223 system.ads<system-freebsd-x86.ads
1224
1225 TOOLS_TARGET_PAIRS = \
1226 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1227 indepsw.adb<indepsw-gnu.adb
1228
1229 EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
1230
1231 EH_MECHANISM=-gcc
1232 THREADSLIB = -lpthread
1233 GNATLIB_SHARED = gnatlib-shared-dual
1234 GMEM_LIB = gmemlib
1235 LIBRARY_VERSION := $(LIB_VERSION)
1236 MISCLIB = -lutil
1237 endif
1238
1239 ifeq ($(strip $(filter-out x86_64 kfreebsd%,$(arch) $(osys))),)
1240 LIBGNAT_TARGET_PAIRS = \
1241 a-intnam.ads<a-intnam-freebsd.ads \
1242 a-numaux.adb<a-numaux-x86.adb \
1243 a-numaux.ads<a-numaux-x86.ads \
1244 s-inmaop.adb<s-inmaop-posix.adb \
1245 s-intman.adb<s-intman-posix.adb \
1246 s-osinte.adb<s-osinte-posix.adb \
1247 s-osinte.ads<s-osinte-kfreebsd-gnu.ads \
1248 s-osprim.adb<s-osprim-posix.adb \
1249 s-taprop.adb<s-taprop-linux.adb \
1250 s-tasinf.ads<s-tasinf-linux.ads \
1251 s-tasinf.adb<s-tasinf-linux.adb \
1252 s-taspri.ads<s-taspri-posix.ads \
1253 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1254 system.ads<system-freebsd-x86_64.ads
1255
1256 TOOLS_TARGET_PAIRS = \
1257 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1258 indepsw.adb<indepsw-gnu.adb
1259
1260 EH_MECHANISM=-gcc
1261 THREADSLIB = -lpthread
1262 GNATLIB_SHARED = gnatlib-shared-dual
1263 GMEM_LIB = gmemlib
1264 LIBRARY_VERSION := $(LIB_VERSION)
1265 endif
1266
1267 # x86 FreeBSD
1268 ifeq ($(strip $(filter-out %86 freebsd%,$(arch) $(osys))),)
1269 LIBGNAT_TARGET_PAIRS = \
1270 a-intnam.ads<a-intnam-freebsd.ads \
1271 s-inmaop.adb<s-inmaop-posix.adb \
1272 s-intman.adb<s-intman-posix.adb \
1273 s-osinte.adb<s-osinte-freebsd.adb \
1274 s-osinte.ads<s-osinte-freebsd.ads \
1275 s-osprim.adb<s-osprim-posix.adb \
1276 s-taprop.adb<s-taprop-posix.adb \
1277 s-taspri.ads<s-taspri-posix.ads \
1278 s-tpopsp.adb<s-tpopsp-posix.adb \
1279 $(ATOMICS_TARGET_PAIRS) \
1280 $(X86_TARGET_PAIRS) \
1281 system.ads<system-freebsd-x86.ads
1282
1283 TOOLS_TARGET_PAIRS = \
1284 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
1285 GNATLIB_SHARED = gnatlib-shared-dual
1286
1287 EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
1288
1289 EH_MECHANISM=-gcc
1290 THREADSLIB= -lpthread
1291 GMEM_LIB = gmemlib
1292 LIBRARY_VERSION := $(LIB_VERSION)
1293 MISCLIB = -lutil
1294 endif
1295
1296 # x86-64 FreeBSD
1297 ifeq ($(strip $(filter-out %86_64 freebsd%,$(arch) $(osys))),)
1298 LIBGNAT_TARGET_PAIRS = \
1299 a-intnam.ads<a-intnam-freebsd.ads \
1300 s-inmaop.adb<s-inmaop-posix.adb \
1301 s-intman.adb<s-intman-posix.adb \
1302 s-osinte.adb<s-osinte-freebsd.adb \
1303 s-osinte.ads<s-osinte-freebsd.ads \
1304 s-osprim.adb<s-osprim-posix.adb \
1305 s-taprop.adb<s-taprop-posix.adb \
1306 s-taspri.ads<s-taspri-posix.ads \
1307 s-tpopsp.adb<s-tpopsp-posix.adb \
1308 $(ATOMICS_TARGET_PAIRS) \
1309 $(X86_64_TARGET_PAIRS) \
1310 system.ads<system-freebsd-x86_64.ads
1311
1312 TOOLS_TARGET_PAIRS = \
1313 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
1314 GNATLIB_SHARED = gnatlib-shared-dual
1315
1316 EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
1317
1318 EH_MECHANISM=-gcc
1319 THREADSLIB= -lpthread
1320 GMEM_LIB = gmemlib
1321 LIBRARY_VERSION := $(LIB_VERSION)
1322 MISCLIB = -lutil
1323 endif
1324
1325 # S390 Linux
1326 ifeq ($(strip $(filter-out s390% linux%,$(arch) $(osys))),)
1327 LIBGNAT_TARGET_PAIRS_COMMON = \
1328 a-intnam.ads<a-intnam-linux.ads \
1329 s-inmaop.adb<s-inmaop-posix.adb \
1330 s-intman.adb<s-intman-posix.adb \
1331 s-linux.ads<s-linux.ads \
1332 s-osinte.adb<s-osinte-posix.adb \
1333 s-osinte.ads<s-osinte-linux.ads \
1334 s-osprim.adb<s-osprim-posix.adb \
1335 s-taprop.adb<s-taprop-linux.adb \
1336 s-tasinf.ads<s-tasinf-linux.ads \
1337 s-tasinf.adb<s-tasinf-linux.adb \
1338 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1339 s-tpopsp.adb<s-tpopsp-posix-foreign.adb
1340
1341 LIBGNAT_TARGET_PAIRS_32 = \
1342 system.ads<system-linux-s390.ads
1343
1344 LIBGNAT_TARGET_PAIRS_64 = \
1345 system.ads<system-linux-s390x.ads
1346
1347 ifeq ($(strip $(filter-out s390x,$(arch))),)
1348 ifeq ($(strip $(MULTISUBDIR)),/32)
1349 LIBGNAT_TARGET_PAIRS = \
1350 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
1351 else
1352 LIBGNAT_TARGET_PAIRS = \
1353 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
1354 endif
1355 else
1356 LIBGNAT_TARGET_PAIRS = \
1357 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
1358 endif
1359
1360 TOOLS_TARGET_PAIRS = \
1361 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1362 indepsw.adb<indepsw-gnu.adb
1363
1364 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1365 EH_MECHANISM=-gcc
1366 THREADSLIB = -lpthread
1367 GNATLIB_SHARED = gnatlib-shared-dual
1368 LIBRARY_VERSION := $(LIB_VERSION)
1369 endif
1370
1371 # HP/PA HP-UX 10
1372 ifeq ($(strip $(filter-out hppa% hp hpux10%,$(targ))),)
1373 LIBGNAT_TARGET_PAIRS = \
1374 a-excpol.adb<a-excpol-abort.adb \
1375 a-intnam.ads<a-intnam-hpux.ads \
1376 s-inmaop.adb<s-inmaop-posix.adb \
1377 s-interr.adb<s-interr-sigaction.adb \
1378 s-intman.adb<s-intman-posix.adb \
1379 s-osinte.adb<s-osinte-hpux-dce.adb \
1380 s-osinte.ads<s-osinte-hpux-dce.ads \
1381 s-parame.ads<s-parame-hpux.ads \
1382 s-osprim.adb<s-osprim-posix.adb \
1383 s-taprop.adb<s-taprop-hpux-dce.adb \
1384 s-taspri.ads<s-taspri-hpux-dce.ads \
1385 s-tpopsp.adb<s-tpopsp-posix.adb \
1386 system.ads<system-hpux.ads
1387
1388 EH_MECHANISM=-gcc
1389 endif
1390
1391 # HP/PA HP-UX 11
1392 ifeq ($(strip $(filter-out hppa% hp hpux11%,$(targ))),)
1393 LIBGNAT_TARGET_PAIRS = \
1394 a-intnam.ads<a-intnam-hpux.ads \
1395 s-inmaop.adb<s-inmaop-posix.adb \
1396 s-intman.adb<s-intman-posix.adb \
1397 s-osinte.adb<s-osinte-posix.adb \
1398 s-osinte.ads<s-osinte-hpux.ads \
1399 s-parame.ads<s-parame-hpux.ads \
1400 s-osprim.adb<s-osprim-posix.adb \
1401 s-traceb.adb<s-traceb-hpux.adb \
1402 s-taprop.adb<s-taprop-posix.adb \
1403 s-taspri.ads<s-taspri-posix.ads \
1404 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1405 system.ads<system-hpux.ads
1406
1407 TOOLS_TARGET_PAIRS = mlib-tgt-specific.adb<mlib-tgt-specific-hpux.adb
1408 EH_MECHANISM=-gcc
1409 TGT_LIB = /usr/lib/libcl.a
1410 THREADSLIB = -lpthread
1411 GMEM_LIB = gmemlib
1412 soext = .sl
1413 SO_OPTS = -Wl,+h,
1414 GNATLIB_SHARED = gnatlib-shared-dual
1415 LIBRARY_VERSION := $(LIB_VERSION)
1416 endif
1417
1418 # IBM AIX
1419 ifeq ($(strip $(filter-out ibm aix%,$(manu) $(osys))),)
1420 LIBGNAT_TARGET_PAIRS_COMMON = \
1421 a-intnam.ads<a-intnam-aix.ads \
1422 s-inmaop.adb<s-inmaop-posix.adb \
1423 s-intman.adb<s-intman-posix.adb \
1424 s-osinte.adb<s-osinte-aix.adb \
1425 s-osinte.ads<s-osinte-aix.ads \
1426 s-osprim.adb<s-osprim-posix.adb \
1427 s-taprop.adb<s-taprop-posix.adb \
1428 s-taspri.ads<s-taspri-posix.ads \
1429 s-tpopsp.adb<s-tpopsp-posix.adb \
1430 $(ATOMICS_TARGET_PAIRS) \
1431 $(ATOMICS_BUILTINS_TARGET_PAIRS)
1432
1433 LIBGNAT_TARGET_PAIRS_32 = \
1434 system.ads<system-aix.ads
1435
1436 LIBGNAT_TARGET_PAIRS_64 = \
1437 system.ads<system-aix64.ads
1438
1439 ifeq ($(findstring ppc64, \
1440 $(shell $(GCC_FOR_TARGET) $(GNATLIBCFLAGS) \
1441 -print-multi-os-directory)), \
1442 ppc64)
1443 LIBGNAT_TARGET_PAIRS = \
1444 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
1445 TOOLS_TARGET_PAIRS = \
1446 indepsw.adb<indepsw-aix.adb
1447 else
1448 LIBGNAT_TARGET_PAIRS = \
1449 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
1450 TOOLS_TARGET_PAIRS = \
1451 indepsw.adb<indepsw-gnu.adb
1452 endif
1453
1454 THREADSLIB = -lpthreads
1455 EH_MECHANISM=-gcc
1456 TOOLS_TARGET_PAIRS += \
1457 mlib-tgt-specific.adb<mlib-tgt-specific-aix.adb
1458
1459 GMEM_LIB = gmemlib
1460 endif
1461
1462 # RTEMS
1463 ifeq ($(strip $(filter-out rtems%,$(osys))),)
1464 LIBGNAT_TARGET_PAIRS = \
1465 system.ads<system-rtems.ads \
1466 a-intnam.ads<a-intnam-rtems.ads \
1467 s-inmaop.adb<s-inmaop-posix.adb \
1468 s-intman.adb<s-intman-posix.adb \
1469 s-osinte.adb<s-osinte-rtems.adb \
1470 s-osinte.ads<s-osinte-rtems.ads \
1471 s-osprim.adb<s-osprim-posix.adb \
1472 s-parame.adb<s-parame-rtems.adb \
1473 s-taprop.adb<s-taprop-posix.adb \
1474 s-taspri.ads<s-taspri-posix.ads \
1475 s-tpopsp.adb<s-tpopsp-rtems.adb \
1476 s-stchop.adb<s-stchop-rtems.adb \
1477 s-interr.adb<s-interr-hwint.adb
1478 endif
1479
1480 # OpenVMS (host)
1481 ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(host))),)
1482
1483 soext = .exe
1484 hyphen = _
1485 LN = cp -p
1486 LN_S = cp -p
1487
1488 endif
1489
1490 # OpenVMS (target)
1491 ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(targ))),)
1492 LIBGNAT_TARGET_PAIRS = \
1493 a-caldel.adb<a-caldel-vms.adb \
1494 a-calend.adb<a-calend-vms.adb \
1495 a-calend.ads<a-calend-vms.ads \
1496 a-dirval.adb<a-dirval-vms.adb \
1497 a-excpol.adb<a-excpol-abort.adb \
1498 a-intnam.ads<a-intnam-vms.ads \
1499 a-numaux.ads<a-numaux-vms.ads \
1500 g-expect.adb<g-expect-vms.adb \
1501 g-socthi.ads<g-socthi-vms.ads \
1502 g-socthi.adb<g-socthi-vms.adb \
1503 g-stsifd.adb<g-stsifd-sockets.adb \
1504 i-cstrea.adb<i-cstrea-vms.adb \
1505 memtrack.adb<memtrack-vms_64.adb \
1506 s-auxdec.ads<s-auxdec-vms_64.ads \
1507 s-inmaop.adb<s-inmaop-vms.adb \
1508 s-interr.adb<s-interr-vms.adb \
1509 s-intman.adb<s-intman-vms.adb \
1510 s-intman.ads<s-intman-vms.ads \
1511 s-memory.adb<s-memory-vms_64.adb \
1512 s-memory.ads<s-memory-vms_64.ads \
1513 s-ransee.adb<s-ransee-vms.adb \
1514 s-osprim.adb<s-osprim-vms.adb \
1515 s-osprim.ads<s-osprim-vms.ads \
1516 s-osinte.adb<s-osinte-vms.adb \
1517 s-osinte.ads<s-osinte-vms.ads \
1518 s-taprop.adb<s-taprop-vms.adb \
1519 s-tasdeb.adb<s-tasdeb-vms.adb \
1520 s-taspri.ads<s-taspri-vms.ads \
1521 s-tpopsp.adb<s-tpopsp-vms.adb \
1522 s-tpopde.adb<s-tpopde-vms.adb \
1523 s-tpopde.ads<s-tpopde-vms.ads
1524
1525 ifeq ($(strip $(filter-out ia64 hp vms% openvms%,$(targ))),)
1526 LIBGNAT_TARGET_PAIRS += \
1527 g-enblsp.adb<g-enblsp-vms-ia64.adb \
1528 g-trasym.adb<g-trasym-vms-ia64.adb \
1529 s-asthan.adb<s-asthan-vms-ia64.adb \
1530 s-auxdec.adb<s-auxdec-vms-ia64.adb \
1531 s-vaflop.adb<s-vaflop-vms-ia64.adb \
1532 system.ads<system-vms-ia64.ads \
1533 s-parame.ads<s-parame-vms-ia64.ads \
1534 $(ATOMICS_TARGET_PAIRS) \
1535 $(ATOMICS_BUILTINS_TARGET_PAIRS)
1536
1537 EXTRA_LIBGNAT_SRCS+=tb-ivms.c
1538
1539 TOOLS_TARGET_PAIRS= \
1540 mlib-tgt-specific.adb<mlib-tgt-specific-vms-ia64.adb \
1541 symbols.adb<symbols-vms.adb \
1542 symbols-processing.adb<symbols-processing-vms-ia64.adb
1543 else
1544 ifeq ($(strip $(filter-out alpha64 dec vms% openvms% alphavms%,$(targ))),)
1545 LIBGNAT_TARGET_PAIRS += \
1546 g-enblsp.adb<g-enblsp-vms-alpha.adb \
1547 g-trasym.adb<g-trasym-vms-alpha.adb \
1548 s-asthan.adb<s-asthan-vms-alpha.adb \
1549 s-auxdec.adb<s-auxdec-vms-alpha.adb \
1550 s-traent.adb<s-traent-vms.adb \
1551 s-traent.ads<s-traent-vms.ads \
1552 s-vaflop.adb<s-vaflop-vms-alpha.adb \
1553 system.ads<system-vms_64.ads \
1554 s-parame.ads<s-parame-vms-alpha.ads \
1555 $(ATOMICS_TARGET_PAIRS) \
1556 $(ATOMICS_BUILTINS_TARGET_PAIRS)
1557
1558 EXTRA_LIBGNAT_SRCS+=tb-alvms.c
1559
1560 TOOLS_TARGET_PAIRS= \
1561 mlib-tgt-specific.adb<mlib-tgt-specific-vms-alpha.adb \
1562 symbols.adb<symbols-vms.adb \
1563 symbols-processing.adb<symbols-processing-vms-alpha.adb
1564 endif
1565 endif
1566
1567 EXTRA_GNATMAKE_OBJS = mlib-tgt-vms_common.o
1568
1569 GMEM_LIB = gmemlib
1570 EH_MECHANISM=-gcc
1571 GNATLIB_SHARED=gnatlib-shared-vms
1572 EXTRA_GNATRTL_NONTASKING_OBJS+=s-po32gl.o
1573 EXTRA_GNATRTL_TASKING_OBJS=s-tpopde.o
1574 EXTRA_GNATTOOLS = \
1575 ../../gnatsym$(exeext)
1576 # This command transforms (YYYYMMDD) into YY,MMDD
1577 GSMATCH_VERSION := $(shell grep "^ *Gnat_Static_Version_String" $(fsrcpfx)ada/gnatvsn.ads | sed -e 's/.*(\(.*\)).*/\1/' -e 's/\(..\)\(..\)\(....\).*/\2,\3/')
1578 TOOLS_LIBS_LO := --for-linker=sys\\$$\$$library:trace.exe
1579 LIBRARY_VERSION := $(subst .,_,$(LIB_VERSION))
1580 endif
1581
1582 # *-elf
1583 ifeq ($(strip $(filter-out avr none powerpc% eabispe leon% erc32% unknown elf,$(targ))),)
1584 TOOLS_TARGET_PAIRS=\
1585 mlib-tgt-specific.adb<mlib-tgt-specific-xi.adb \
1586 indepsw.adb<indepsw-gnu.adb
1587 endif
1588
1589 # Cygwin/Mingw32
1590 ifeq ($(strip $(filter-out cygwin% mingw32% pe,$(osys))),)
1591 # Cygwin provides a full Posix environment, and so we use the default
1592 # versions of s-memory and g-socthi rather than the Windows-specific
1593 # MinGW versions. Ideally we would use all the default versions for
1594 # Cygwin and none of the MinGW versions, but for historical reasons
1595 # the Cygwin port has always been a CygMing frankenhybrid and it is
1596 # a long-term project to disentangle them.
1597 ifeq ($(strip $(filter-out cygwin%,$(osys))),)
1598 LIBGNAT_TARGET_PAIRS = \
1599 s-memory.adb<s-memory.adb \
1600 g-socthi.ads<g-socthi.ads \
1601 g-socthi.adb<g-socthi.adb
1602 else
1603 LIBGNAT_TARGET_PAIRS = \
1604 s-memory.adb<s-memory-mingw.adb \
1605 g-socthi.ads<g-socthi-mingw.ads \
1606 g-socthi.adb<g-socthi-mingw.adb
1607 endif
1608 LIBGNAT_TARGET_PAIRS += \
1609 a-dirval.adb<a-dirval-mingw.adb \
1610 a-excpol.adb<a-excpol-abort.adb \
1611 s-gloloc.adb<s-gloloc-mingw.adb \
1612 s-inmaop.adb<s-inmaop-dummy.adb \
1613 s-taspri.ads<s-taspri-mingw.ads \
1614 s-tasinf.adb<s-tasinf-mingw.adb \
1615 s-tasinf.ads<s-tasinf-mingw.ads \
1616 g-stsifd.adb<g-stsifd-sockets.adb \
1617 g-soliop.ads<g-soliop-mingw.ads \
1618 $(ATOMICS_TARGET_PAIRS)
1619
1620 ifeq ($(strip $(filter-out rtx_w32 rtx_rtss,$(THREAD_KIND))),)
1621 LIBGNAT_TARGET_PAIRS += \
1622 s-intman.adb<s-intman-dummy.adb \
1623 s-osinte.ads<s-osinte-rtx.ads \
1624 s-osprim.adb<s-osprim-rtx.adb \
1625 s-taprop.adb<s-taprop-rtx.adb \
1626 $(X86_TARGET_PAIRS)
1627
1628 EXTRA_GNATRTL_NONTASKING_OBJS = s-win32.o
1629
1630 ifeq ($(strip $(filter-out rtx_w32,$(THREAD_KIND))),)
1631 LIBGNAT_TARGET_PAIRS += system.ads<system-rtx.ads
1632
1633 EH_MECHANISM=-gcc
1634 else
1635 LIBGNAT_TARGET_PAIRS += \
1636 system.ads<system-rtx-rtss.ads \
1637 s-parame.adb<s-parame-vxworks.adb
1638
1639 EH_MECHANISM=
1640 endif
1641
1642 else
1643 LIBGNAT_TARGET_PAIRS += \
1644 a-exetim.adb<a-exetim-mingw.adb \
1645 a-exetim.ads<a-exetim-mingw.ads \
1646 a-intnam.ads<a-intnam-mingw.ads \
1647 g-sercom.adb<g-sercom-mingw.adb \
1648 s-interr.adb<s-interr-sigaction.adb \
1649 s-intman.adb<s-intman-mingw.adb \
1650 s-mudido.adb<s-mudido-affinity.adb \
1651 s-osinte.ads<s-osinte-mingw.ads \
1652 s-osprim.adb<s-osprim-mingw.adb \
1653 s-taprop.adb<s-taprop-mingw.adb
1654
1655 ifeq ($(strip $(filter-out x86_64%,$(arch))),)
1656 ifeq ($(strip $(MULTISUBDIR)),/32)
1657 LIBGNAT_TARGET_PAIRS += \
1658 $(X86_TARGET_PAIRS) \
1659 system.ads<system-mingw.ads
1660 SO_OPTS= -m32 -Wl,-soname,
1661 else
1662 LIBGNAT_TARGET_PAIRS += \
1663 $(X86_64_TARGET_PAIRS) \
1664 system.ads<system-mingw-x86_64.ads
1665 SO_OPTS = -m64 -Wl,-soname,
1666 endif
1667 else
1668 ifeq ($(strip $(MULTISUBDIR)),/64)
1669 LIBGNAT_TARGET_PAIRS += \
1670 $(X86_64_TARGET_PAIRS) \
1671 system.ads<system-mingw-x86_64.ads
1672 SO_OPTS = -m64 -Wl,-soname,
1673 else
1674 LIBGNAT_TARGET_PAIRS += \
1675 $(X86_TARGET_PAIRS) \
1676 system.ads<system-mingw.ads
1677 SO_OPTS = -m32 -Wl,-soname,
1678 endif
1679 endif
1680
1681 EXTRA_GNATRTL_NONTASKING_OBJS = \
1682 s-win32.o s-winext.o g-regist.o g-sse.o g-ssvety.o
1683 EXTRA_GNATRTL_TASKING_OBJS = a-exetim.o
1684
1685 MISCLIB = -lws2_32
1686
1687 # ??? This will be replaced by gnatlib-shared-dual-win32 when GNAT
1688 # auto-import support for array/record will be done.
1689 GNATLIB_SHARED = gnatlib-shared-win32
1690
1691 EH_MECHANISM=-gcc
1692 endif
1693
1694 TOOLS_TARGET_PAIRS= \
1695 mlib-tgt-specific.adb<mlib-tgt-specific-mingw.adb \
1696 indepsw.adb<indepsw-mingw.adb
1697
1698 GMEM_LIB = gmemlib
1699 EXTRA_GNATTOOLS = ../../gnatdll$(exeext)
1700 EXTRA_GNATMAKE_OBJS = mdll.o mdll-utl.o mdll-fil.o
1701 soext = .dll
1702 LIBRARY_VERSION := $(LIB_VERSION)
1703 endif
1704
1705 # Mips Linux
1706 ifeq ($(strip $(filter-out mips linux%,$(arch) $(osys))),)
1707 LIBGNAT_TARGET_PAIRS = \
1708 a-intnam.ads<a-intnam-linux.ads \
1709 s-inmaop.adb<s-inmaop-posix.adb \
1710 s-intman.adb<s-intman-posix.adb \
1711 s-linux.ads<s-linux.ads \
1712 s-osinte.adb<s-osinte-posix.adb \
1713 s-osinte.ads<s-osinte-linux.ads \
1714 s-osprim.adb<s-osprim-posix.adb \
1715 s-taprop.adb<s-taprop-linux.adb \
1716 s-tasinf.ads<s-tasinf-linux.ads \
1717 s-tasinf.adb<s-tasinf-linux.adb \
1718 s-taspri.ads<s-taspri-posix.ads \
1719 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1720 system.ads<system-linux-mips.ads
1721
1722 EH_MECHANISM=-gcc
1723 THREADSLIB = -lpthread
1724 GNATLIB_SHARED = gnatlib-shared-dual
1725 GMEM_LIB = gmemlib
1726 LIBRARY_VERSION := $(LIB_VERSION)
1727 endif
1728
1729 # Mips/el Linux
1730 ifeq ($(strip $(filter-out mipsel linux%,$(arch) $(osys))),)
1731 LIBGNAT_TARGET_PAIRS_COMMON = \
1732 a-intnam.ads<a-intnam-linux.ads \
1733 s-inmaop.adb<s-inmaop-posix.adb \
1734 s-intman.adb<s-intman-posix.adb \
1735 s-linux.ads<s-linux-mipsel.ads \
1736 s-osinte.adb<s-osinte-posix.adb \
1737 s-osinte.ads<s-osinte-linux.ads \
1738 s-osprim.adb<s-osprim-posix.adb \
1739 s-taprop.adb<s-taprop-linux.adb \
1740 s-tasinf.ads<s-tasinf-linux.ads \
1741 s-tasinf.adb<s-tasinf-linux.adb \
1742 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1743 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1744 g-sercom.adb<g-sercom-linux.adb
1745
1746 LIBGNAT_TARGET_PAIRS_32 = \
1747 system.ads<system-linux-mipsel.ads
1748
1749 LIBGNAT_TARGET_PAIRS_64 = \
1750 system.ads<system-linux-mips64el.ads
1751
1752 ifeq ($(strip $(shell $(GCC_FOR_TARGET) $(GNATLIBCFLAGS) -print-multi-os-directory)),../lib64)
1753 LIBGNAT_TARGET_PAIRS = \
1754 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
1755 else
1756 LIBGNAT_TARGET_PAIRS = \
1757 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
1758 endif
1759
1760 TOOLS_TARGET_PAIRS = \
1761 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1762 indepsw.adb<indepsw-gnu.adb
1763
1764 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1765 EH_MECHANISM=-gcc
1766 THREADSLIB = -lpthread
1767 GNATLIB_SHARED = gnatlib-shared-dual
1768 GMEM_LIB = gmemlib
1769 LIBRARY_VERSION := $(LIB_VERSION)
1770 endif
1771
1772 # Mips64/el Linux
1773 ifeq ($(strip $(filter-out mips64el linux%,$(arch) $(osys))),)
1774 LIBGNAT_TARGET_PAIRS_COMMON = \
1775 a-intnam.ads<a-intnam-linux.ads \
1776 s-inmaop.adb<s-inmaop-posix.adb \
1777 s-intman.adb<s-intman-posix.adb \
1778 s-linux.ads<s-linux-mipsel.ads \
1779 s-osinte.adb<s-osinte-posix.adb \
1780 s-osinte.ads<s-osinte-linux.ads \
1781 s-osprim.adb<s-osprim-posix.adb \
1782 s-taprop.adb<s-taprop-linux.adb \
1783 s-tasinf.ads<s-tasinf-linux.ads \
1784 s-tasinf.adb<s-tasinf-linux.adb \
1785 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1786 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1787 g-sercom.adb<g-sercom-linux.adb
1788
1789 LIBGNAT_TARGET_PAIRS_32 = \
1790 system.ads<system-linux-mipsel.ads
1791
1792 LIBGNAT_TARGET_PAIRS_64 = \
1793 system.ads<system-linux-mips64el.ads
1794
1795 ifeq ($(strip $(shell $(GCC_FOR_TARGET) $(GNATLIBCFLAGS) -print-multi-os-directory)),../lib64)
1796 LIBGNAT_TARGET_PAIRS = \
1797 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
1798 else
1799 LIBGNAT_TARGET_PAIRS = \
1800 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
1801 endif
1802
1803 TOOLS_TARGET_PAIRS = \
1804 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1805 indepsw.adb<indepsw-gnu.adb
1806
1807 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1808 EH_MECHANISM=-gcc
1809 THREADSLIB = -lpthread
1810 GNATLIB_SHARED = gnatlib-shared-dual
1811 GMEM_LIB = gmemlib
1812 LIBRARY_VERSION := $(LIB_VERSION)
1813 endif
1814
1815 # PowerPC and e500v2 Linux
1816 ifeq ($(strip $(filter-out powerpc% e500% linux%,$(arch) $(osys))),)
1817 LIBGNAT_TARGET_PAIRS_COMMON = \
1818 a-exetim.adb<a-exetim-posix.adb \
1819 a-exetim.ads<a-exetim-default.ads \
1820 a-intnam.ads<a-intnam-linux.ads \
1821 a-synbar.adb<a-synbar-posix.adb \
1822 a-synbar.ads<a-synbar-posix.ads \
1823 s-inmaop.adb<s-inmaop-posix.adb \
1824 s-intman.adb<s-intman-posix.adb \
1825 s-linux.ads<s-linux.ads \
1826 s-osinte.adb<s-osinte-posix.adb \
1827 s-tpopsp.adb<s-tpopsp-tls.adb \
1828 g-sercom.adb<g-sercom-linux.adb \
1829 $(ATOMICS_TARGET_PAIRS) \
1830 $(ATOMICS_BUILTINS_TARGET_PAIRS)
1831
1832 ifeq ($(strip $(filter-out xenomai,$(THREAD_KIND))),)
1833 LIBGNAT_TARGET_PAIRS = \
1834 $(LIBGNAT_TARGET_PAIRS_COMMON)
1835
1836 LIBGNAT_TARGET_PAIRS += \
1837 s-osinte.ads<s-osinte-linux-xenomai.ads \
1838 s-osprim.adb<s-osprim-linux-xenomai.adb \
1839 s-taprop.adb<s-taprop-linux-xenomai.adb \
1840 s-taspri.ads<s-taspri-linux-xenomai.ads \
1841 system.ads<system-linux-ppc.ads
1842 else
1843 LIBGNAT_TARGET_PAIRS_32 = \
1844 system.ads<system-linux-ppc.ads
1845
1846 LIBGNAT_TARGET_PAIRS_64 = \
1847 system.ads<system-linux-ppc64.ads
1848
1849 ifeq ($(strip $(shell $(GCC_FOR_TARGET) $(GNATLIBCFLAGS) -print-multi-os-directory)),../lib64)
1850 LIBGNAT_TARGET_PAIRS = \
1851 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
1852 else
1853 LIBGNAT_TARGET_PAIRS = \
1854 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
1855 endif
1856
1857 LIBGNAT_TARGET_PAIRS += \
1858 s-mudido.adb<s-mudido-affinity.adb \
1859 s-osinte.ads<s-osinte-linux.ads \
1860 s-osprim.adb<s-osprim-posix.adb \
1861 s-taprop.adb<s-taprop-linux.adb \
1862 s-tasinf.ads<s-tasinf-linux.ads \
1863 s-tasinf.adb<s-tasinf-linux.adb \
1864 s-taspri.ads<s-taspri-posix-noaltstack.ads
1865 endif
1866
1867 TOOLS_TARGET_PAIRS = \
1868 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1869 indepsw.adb<indepsw-gnu.adb
1870
1871 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o a-exetim.o
1872 EH_MECHANISM=-gcc
1873 THREADSLIB = -lpthread -lrt
1874 GNATLIB_SHARED = gnatlib-shared-dual
1875 GMEM_LIB = gmemlib
1876 LIBRARY_VERSION := $(LIB_VERSION)
1877 endif
1878
1879 ifeq ($(strip $(filter-out arm%-linux,$(arch)-$(osys)) $(if $(findstring eabi,$(word 4,$(targ))),,$(word 4,$(targ)))),)
1880 LIBGNAT_TARGET_PAIRS = \
1881 a-intnam.ads<a-intnam-linux.ads \
1882 s-inmaop.adb<s-inmaop-posix.adb \
1883 s-intman.adb<s-intman-posix.adb \
1884 s-linux.ads<s-linux.ads \
1885 s-osinte.adb<s-osinte-posix.adb \
1886 s-osinte.ads<s-osinte-linux.ads \
1887 s-osprim.adb<s-osprim-posix.adb \
1888 s-taprop.adb<s-taprop-linux.adb \
1889 s-tasinf.ads<s-tasinf-linux.ads \
1890 s-tasinf.adb<s-tasinf-linux.adb \
1891 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1892 s-tpopsp.adb<s-tpopsp-posix-foreign.adb
1893
1894 ifeq ($(strip $(filter-out arm%b,$(arch))),)
1895 LIBGNAT_TARGET_PAIRS += \
1896 system.ads<system-linux-armeb.ads
1897 else
1898 LIBGNAT_TARGET_PAIRS += \
1899 system.ads<system-linux-armel.ads
1900 endif
1901
1902 TOOLS_TARGET_PAIRS = \
1903 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1904 indepsw.adb<indepsw-gnu.adb
1905
1906 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1907 EH_MECHANISM=
1908 THREADSLIB = -lpthread
1909 GNATLIB_SHARED = gnatlib-shared-dual
1910 GMEM_LIB = gmemlib
1911 LIBRARY_VERSION := $(LIB_VERSION)
1912 endif
1913
1914 # Sparc Linux
1915 ifeq ($(strip $(filter-out sparc% linux%,$(arch) $(osys))),)
1916 LIBGNAT_TARGET_PAIRS_COMMON = \
1917 a-intnam.ads<a-intnam-linux.ads \
1918 s-inmaop.adb<s-inmaop-posix.adb \
1919 s-intman.adb<s-intman-posix.adb \
1920 s-linux.ads<s-linux-sparc.ads \
1921 s-osinte.adb<s-osinte-posix.adb \
1922 s-osinte.ads<s-osinte-linux.ads \
1923 s-osprim.adb<s-osprim-posix.adb \
1924 s-taprop.adb<s-taprop-linux.adb \
1925 s-tasinf.ads<s-tasinf-linux.ads \
1926 s-tasinf.adb<s-tasinf-linux.adb \
1927 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1928 s-tpopsp.adb<s-tpopsp-tls.adb
1929
1930 LIBGNAT_TARGET_PAIRS_32 = \
1931 system.ads<system-linux-sparc.ads
1932
1933 LIBGNAT_TARGET_PAIRS_64 = \
1934 system.ads<system-linux-sparcv9.ads
1935
1936 ifeq ($(strip $(shell $(GCC_FOR_TARGET) $(GNATLIBCFLAGS) -print-multi-os-directory)),../lib64)
1937 LIBGNAT_TARGET_PAIRS = \
1938 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
1939 else
1940 LIBGNAT_TARGET_PAIRS = \
1941 $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
1942 endif
1943
1944 TOOLS_TARGET_PAIRS = \
1945 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1946 indepsw.adb<indepsw-gnu.adb
1947
1948 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1949 EH_MECHANISM=-gcc
1950 THREADSLIB = -lpthread
1951 GNATLIB_SHARED = gnatlib-shared-dual
1952 GMEM_LIB = gmemlib
1953 LIBRARY_VERSION := $(LIB_VERSION)
1954 endif
1955
1956 # HP/PA Linux
1957 ifeq ($(strip $(filter-out hppa% linux%,$(arch) $(osys))),)
1958 LIBGNAT_TARGET_PAIRS = \
1959 a-intnam.ads<a-intnam-linux.ads \
1960 s-inmaop.adb<s-inmaop-posix.adb \
1961 s-intman.adb<s-intman-posix.adb \
1962 s-linux.ads<s-linux-hppa.ads \
1963 s-osinte.adb<s-osinte-posix.adb \
1964 s-osinte.ads<s-osinte-linux.ads \
1965 s-osprim.adb<s-osprim-posix.adb \
1966 s-taprop.adb<s-taprop-linux.adb \
1967 s-tasinf.ads<s-tasinf-linux.ads \
1968 s-tasinf.adb<s-tasinf-linux.adb \
1969 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1970 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
1971 system.ads<system-linux-hppa.ads
1972
1973 TOOLS_TARGET_PAIRS = \
1974 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
1975 indepsw.adb<indepsw-gnu.adb
1976
1977 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1978 EH_MECHANISM=-gcc
1979 THREADSLIB = -lpthread
1980 GNATLIB_SHARED = gnatlib-shared-dual
1981 GMEM_LIB = gmemlib
1982 LIBRARY_VERSION := $(LIB_VERSION)
1983 endif
1984
1985 # SH4 Linux
1986 ifeq ($(strip $(filter-out sh4% linux%,$(arch) $(osys))),)
1987 LIBGNAT_TARGET_PAIRS = \
1988 a-intnam.ads<a-intnam-linux.ads \
1989 s-inmaop.adb<s-inmaop-posix.adb \
1990 s-intman.adb<s-intman-posix.adb \
1991 s-linux.ads<s-linux.ads \
1992 s-osinte.adb<s-osinte-posix.adb \
1993 s-osinte.ads<s-osinte-linux.ads \
1994 s-osprim.adb<s-osprim-posix.adb \
1995 s-taprop.adb<s-taprop-linux.adb \
1996 s-tasinf.ads<s-tasinf-linux.ads \
1997 s-tasinf.adb<s-tasinf-linux.adb \
1998 s-taspri.ads<s-taspri-posix-noaltstack.ads \
1999 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
2000 system.ads<system-linux-sh4.ads
2001
2002 TOOLS_TARGET_PAIRS = \
2003 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
2004 indepsw.adb<indepsw-linux.adb
2005
2006 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
2007 EH_MECHANISM=-gcc
2008 MISCLIB=
2009 THREADSLIB = -lpthread
2010 GNATLIB_SHARED = gnatlib-shared-dual
2011 GMEM_LIB = gmemlib
2012 LIBRARY_VERSION := $(LIB_VERSION)
2013 endif
2014
2015 # IA64 Linux
2016 ifeq ($(strip $(filter-out %ia64 linux%,$(arch) $(osys))),)
2017 LIBGNAT_TARGET_PAIRS = \
2018 a-exetim.adb<a-exetim-posix.adb \
2019 a-exetim.ads<a-exetim-default.ads \
2020 a-intnam.ads<a-intnam-linux.ads \
2021 a-numaux.ads<a-numaux-libc-x86.ads \
2022 a-synbar.adb<a-synbar-posix.adb \
2023 a-synbar.ads<a-synbar-posix.ads \
2024 s-inmaop.adb<s-inmaop-posix.adb \
2025 s-intman.adb<s-intman-posix.adb \
2026 s-linux.ads<s-linux.ads \
2027 s-mudido.adb<s-mudido-affinity.adb \
2028 s-osinte.ads<s-osinte-linux.ads \
2029 s-osinte.adb<s-osinte-posix.adb \
2030 s-osprim.adb<s-osprim-posix.adb \
2031 s-taprop.adb<s-taprop-linux.adb \
2032 s-tasinf.ads<s-tasinf-linux.ads \
2033 s-tasinf.adb<s-tasinf-linux.adb \
2034 s-tpopsp.adb<s-tpopsp-tls.adb \
2035 s-taspri.ads<s-taspri-posix-noaltstack.ads \
2036 g-sercom.adb<g-sercom-linux.adb \
2037 system.ads<system-linux-ia64.ads \
2038 $(ATOMICS_TARGET_PAIRS) \
2039 $(ATOMICS_BUILTINS_TARGET_PAIRS)
2040
2041 TOOLS_TARGET_PAIRS = \
2042 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
2043 indepsw.adb<indepsw-gnu.adb
2044
2045 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o a-exetim.o
2046 EH_MECHANISM=-gcc
2047 MISCLIB=
2048 THREADSLIB=-lpthread -lrt
2049 GNATLIB_SHARED=gnatlib-shared-dual
2050 GMEM_LIB = gmemlib
2051 LIBRARY_VERSION := $(LIB_VERSION)
2052 endif
2053
2054 # IA64 HP-UX
2055 ifeq ($(strip $(filter-out ia64% hp hpux%,$(targ))),)
2056 LIBGNAT_TARGET_PAIRS = \
2057 a-intnam.ads<a-intnam-hpux.ads \
2058 s-inmaop.adb<s-inmaop-posix.adb \
2059 s-intman.adb<s-intman-posix.adb \
2060 s-osinte.adb<s-osinte-posix.adb \
2061 s-osinte.ads<s-osinte-hpux.ads \
2062 s-osprim.adb<s-osprim-posix.adb \
2063 s-taprop.adb<s-taprop-posix.adb \
2064 s-taspri.ads<s-taspri-posix.ads \
2065 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
2066 system.ads<system-hpux-ia64.ads \
2067 $(ATOMICS_TARGET_PAIRS) \
2068 $(ATOMICS_BUILTINS_TARGET_PAIRS)
2069
2070 TOOLS_TARGET_PAIRS = \
2071 mlib-tgt-specific.adb<mlib-tgt-specific-ia64-hpux.adb
2072
2073 MISCLIB=
2074 EH_MECHANISM=-gcc
2075 THREADSLIB=-lpthread
2076 GNATLIB_SHARED=gnatlib-shared-dual
2077 GMEM_LIB = gmemlib
2078 soext = .so
2079 SO_OPTS = -Wl,+h,
2080 LIBRARY_VERSION := $(LIB_VERSION)
2081 endif
2082
2083 # Alpha Linux
2084 ifeq ($(strip $(filter-out alpha% linux%,$(arch) $(osys))),)
2085 LIBGNAT_TARGET_PAIRS = \
2086 a-intnam.ads<a-intnam-linux.ads \
2087 s-inmaop.adb<s-inmaop-posix.adb \
2088 s-intman.adb<s-intman-posix.adb \
2089 s-linux.ads<s-linux-alpha.ads \
2090 s-osinte.ads<s-osinte-linux.ads \
2091 s-osinte.adb<s-osinte-posix.adb \
2092 s-osprim.adb<s-osprim-posix.adb \
2093 s-taprop.adb<s-taprop-linux.adb \
2094 s-tasinf.ads<s-tasinf-linux.ads \
2095 s-tasinf.adb<s-tasinf-linux.adb \
2096 s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
2097 s-taspri.ads<s-taspri-posix-noaltstack.ads \
2098 system.ads<system-linux-alpha.ads \
2099 $(ATOMICS_TARGET_PAIRS) \
2100 $(ATOMICS_BUILTINS_TARGET_PAIRS)
2101
2102 TOOLS_TARGET_PAIRS = \
2103 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
2104 indepsw.adb<indepsw-gnu.adb
2105
2106 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
2107 EH_MECHANISM=-gcc
2108 MISCLIB=
2109 THREADSLIB=-lpthread
2110 GNATLIB_SHARED=gnatlib-shared-dual
2111 LIBRARY_VERSION := $(LIB_VERSION)
2112 endif
2113
2114 # x86-64 Linux
2115 ifeq ($(strip $(filter-out %x86_64 linux%,$(arch) $(osys))),)
2116 LIBGNAT_TARGET_PAIRS = \
2117 a-exetim.adb<a-exetim-posix.adb \
2118 a-exetim.ads<a-exetim-default.ads \
2119 a-intnam.ads<a-intnam-linux.ads \
2120 a-synbar.adb<a-synbar-posix.adb \
2121 a-synbar.ads<a-synbar-posix.ads \
2122 s-inmaop.adb<s-inmaop-posix.adb \
2123 s-intman.adb<s-intman-posix.adb \
2124 s-linux.ads<s-linux.ads \
2125 s-mudido.adb<s-mudido-affinity.adb \
2126 s-osinte.ads<s-osinte-linux.ads \
2127 s-osinte.adb<s-osinte-posix.adb \
2128 s-osprim.adb<s-osprim-posix.adb \
2129 s-taprop.adb<s-taprop-linux.adb \
2130 s-tasinf.ads<s-tasinf-linux.ads \
2131 s-tasinf.adb<s-tasinf-linux.adb \
2132 s-tpopsp.adb<s-tpopsp-tls.adb \
2133 s-taspri.ads<s-taspri-posix.ads \
2134 g-sercom.adb<g-sercom-linux.adb \
2135 $(ATOMICS_TARGET_PAIRS) \
2136 $(X86_64_TARGET_PAIRS) \
2137 system.ads<system-linux-x86_64.ads
2138
2139 TOOLS_TARGET_PAIRS = \
2140 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
2141 indepsw.adb<indepsw-gnu.adb
2142
2143 EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
2144 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o a-exetim.o
2145 EH_MECHANISM=-gcc
2146 THREADSLIB=-lpthread -lrt
2147 GNATLIB_SHARED=gnatlib-shared-dual
2148 GMEM_LIB = gmemlib
2149 LIBRARY_VERSION := $(LIB_VERSION)
2150 endif
2151
2152 ifeq ($(strip $(filter-out %x32 linux%,$(arch) $(osys))),)
2153 LIBGNAT_TARGET_PAIRS = \
2154 a-exetim.adb<a-exetim-posix.adb \
2155 a-exetim.ads<a-exetim-default.ads \
2156 a-intnam.ads<a-intnam-linux.ads \
2157 a-synbar.adb<a-synbar-posix.adb \
2158 a-synbar.ads<a-synbar-posix.ads \
2159 s-inmaop.adb<s-inmaop-posix.adb \
2160 s-intman.adb<s-intman-posix.adb \
2161 s-linux.ads<s-linux.ads \
2162 s-mudido.adb<s-mudido-affinity.adb \
2163 s-osinte.ads<s-osinte-linux.ads \
2164 s-osinte.adb<s-osinte-posix.adb \
2165 s-osprim.adb<s-osprim-posix.adb \
2166 s-taprop.adb<s-taprop-linux.adb \
2167 s-tasinf.ads<s-tasinf-linux.ads \
2168 s-tasinf.adb<s-tasinf-linux.adb \
2169 s-tpopsp.adb<s-tpopsp-tls.adb \
2170 s-taspri.ads<s-taspri-posix.ads \
2171 g-sercom.adb<g-sercom-linux.adb \
2172 $(ATOMICS_TARGET_PAIRS) \
2173 $(X86_64_TARGET_PAIRS) \
2174 system.ads<system-linux-x86.ads
2175
2176 TOOLS_TARGET_PAIRS = \
2177 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
2178 indepsw.adb<indepsw-gnu.adb
2179
2180 EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
2181 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o a-exetim.o
2182 EH_MECHANISM=-gcc
2183 THREADSLIB=-lpthread -lrt
2184 GNATLIB_SHARED=gnatlib-shared-dual
2185 GMEM_LIB = gmemlib
2186 LIBRARY_VERSION := $(LIB_VERSION)
2187 endif
2188
2189 # Darwin (Mac OS X)
2190 ifeq ($(strip $(filter-out darwin%,$(osys))),)
2191 SO_OPTS = -shared-libgcc
2192 LIBGNAT_TARGET_PAIRS = \
2193 a-intnam.ads<a-intnam-darwin.ads \
2194 s-inmaop.adb<s-inmaop-posix.adb \
2195 s-osinte.adb<s-osinte-darwin.adb \
2196 s-osinte.ads<s-osinte-darwin.ads \
2197 s-taprop.adb<s-taprop-posix.adb \
2198 s-taspri.ads<s-taspri-posix.ads \
2199 s-tpopsp.adb<s-tpopsp-posix-foreign.adb
2200
2201 ifeq ($(strip $(filter-out %86,$(arch))),)
2202 LIBGNAT_TARGET_PAIRS += \
2203 s-intman.adb<s-intman-susv3.adb \
2204 s-osprim.adb<s-osprim-darwin.adb \
2205 $(ATOMICS_TARGET_PAIRS)
2206
2207 ifeq ($(strip $(MULTISUBDIR)),/x86_64)
2208 LIBGNAT_TARGET_PAIRS += \
2209 $(X86_64_TARGET_PAIRS) \
2210 system.ads<system-darwin-x86_64.ads
2211 SO_OPTS += -m64
2212 else
2213 LIBGNAT_TARGET_PAIRS += \
2214 $(X86_TARGET_PAIRS) \
2215 system.ads<system-darwin-x86.ads
2216 endif
2217
2218 EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
2219 endif
2220
2221 ifeq ($(strip $(filter-out %x86_64,$(arch))),)
2222 LIBGNAT_TARGET_PAIRS += \
2223 s-intman.adb<s-intman-susv3.adb \
2224 s-osprim.adb<s-osprim-darwin.adb \
2225 $(ATOMICS_TARGET_PAIRS)
2226
2227 ifeq ($(strip $(MULTISUBDIR)),/i386)
2228 LIBGNAT_TARGET_PAIRS += \
2229 $(X86_TARGET_PAIRS) \
2230 system.ads<system-darwin-x86.ads
2231 SO_OPTS += -m32
2232 else
2233 LIBGNAT_TARGET_PAIRS += \
2234 $(X86_64_TARGET_PAIRS) \
2235 system.ads<system-darwin-x86_64.ads
2236 endif
2237
2238 EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
2239 endif
2240
2241 ifeq ($(strip $(filter-out powerpc%,$(arch))),)
2242 LIBGNAT_TARGET_PAIRS += \
2243 s-intman.adb<s-intman-posix.adb \
2244 s-osprim.adb<s-osprim-posix.adb \
2245 a-numaux.ads<a-numaux-darwin.ads \
2246 a-numaux.adb<a-numaux-darwin.adb
2247
2248 ifeq ($(strip $(MULTISUBDIR)),/ppc64)
2249 LIBGNAT_TARGET_PAIRS += \
2250 system.ads<system-darwin-ppc64.ads
2251 SO_OPTS += -m64
2252 else
2253 LIBGNAT_TARGET_PAIRS += \
2254 system.ads<system-darwin-ppc.ads
2255 endif
2256 endif
2257
2258 TOOLS_TARGET_PAIRS = \
2259 mlib-tgt-specific.adb<mlib-tgt-specific-darwin.adb \
2260 indepsw.adb<indepsw-darwin.adb
2261
2262 EH_MECHANISM=-gcc
2263 GNATLIB_SHARED = gnatlib-shared-darwin
2264 GMEM_LIB = gmemlib
2265 LIBRARY_VERSION := $(LIB_VERSION)
2266 soext = .dylib
2267 GCC_LINK_FLAGS=
2268 endif
2269
2270 # ARM Nucleus
2271 ifeq ($(strip $(filter-out arm nucleus%,$(arch) $(osys))),)
2272 LIBGNAT_TARGET_PAIRS = \
2273 system.ads<system-nucleus-arm.ads \
2274 a-numaux.ads<a-numaux-vxworks.ads \
2275 a-intnam.ads<a-intnam-nucleus.ads \
2276 s-inmaop.adb<s-inmaop-posix.adb \
2277 s-intman.adb<s-intman-posix.adb \
2278 s-osinte.ads<s-osinte-nucleus.ads \
2279 s-osinte.adb<s-osinte-nucleus.adb \
2280 s-osprim.adb<s-osprim-nucleus.adb \
2281 s-parame.adb<s-parame-vxworks.adb \
2282 s-taprop.adb<s-taprop-posix.adb \
2283 s-taspri.ads<s-taspri-posix.ads \
2284 s-tpopsp.adb<s-tpopsp-posix.adb \
2285 $(DUMMY_SOCKETS_TARGET_PAIRS)
2286
2287 LIBRARY_VERSION := $(LIB_VERSION)
2288 GNATRTL_SOCKETS_OBJS =
2289 endif
2290
2291 ifneq ($(EH_MECHANISM),)
2292 LIBGNAT_TARGET_PAIRS += a-exexpr.adb<a-exexpr$(EH_MECHANISM).adb
2293 EXTRA_LIBGNAT_OBJS+=raise$(EH_MECHANISM).o
2294 endif
2295
2296 # Use the Ada 2005 version of Ada.Exceptions by default, unless specified
2297 # explicitly already. The base files (a-except.ad?) are used only for building
2298 # the compiler and other basic tools.
2299 # These base versions lack Ada 2005 additions which would cause bootstrap
2300 # problems if included in the compiler and other basic tools.
2301
2302 ifeq ($(filter a-except%,$(LIBGNAT_TARGET_PAIRS)),)
2303 LIBGNAT_TARGET_PAIRS += \
2304 a-except.ads<a-except-2005.ads \
2305 a-except.adb<a-except-2005.adb
2306 endif
2307
2308 # LIBGNAT_SRCS is the list of all C files (including headers) of the runtime
2309 # library. LIBGNAT_OBJS is the list of object files for libgnat.
2310 # thread.c is special as put into GNATRTL_TASKING_OBJS by Makefile.rtl
2311 LIBGNAT_OBJS = adadecode.o adaint.o argv.o arit64.o aux-io.o \
2312 cal.o cio.o cstreams.o ctrl_c.o \
2313 env.o errno.o exit.o expect.o final.o \
2314 init.o initialize.o locales.o mkdir.o \
2315 raise.o seh_init.o socket.o sysdep.o \
2316 targext.o terminals.o tracebak.o \
2317 $(EXTRA_LIBGNAT_OBJS)
2318
2319 # NOTE ??? - when the -I option for compiling Ada code is made to work,
2320 # the library installation will change and there will be a
2321 # GNAT_RTL_SRCS. Right now we count on being able to build GNATRTL_OBJS
2322 # from ADA_INCLUDE_SRCS.
2323
2324 LIBGNAT_SRCS = $(patsubst %.o,%.c,$(LIBGNAT_OBJS)) \
2325 adadecode.h adaint.h env.h gsocket.h raise.h \
2326 tb-gcc.c thread.c $(EXTRA_LIBGNAT_SRCS)
2327
2328 # GNATRTL_NONTASKING_OBJS and GNATRTL_TASKING_OBJS can be found in
2329 # the following include file:
2330
2331 include $(fsrcdir)/ada/Makefile.rtl
2332
2333 # memtrack.o is special as not put into libgnat.
2334 GNATRTL_OBJS = $(GNATRTL_NONTASKING_OBJS) $(GNATRTL_TASKING_OBJS) \
2335 memtrack.o
2336
2337 # Run time source files
2338 ADA_INCLUDE_SRCS =\
2339 ada.ads calendar.ads directio.ads gnat.ads interfac.ads ioexcept.ads \
2340 machcode.ads text_io.ads unchconv.ads unchdeal.ads \
2341 sequenio.ads system.ads memtrack.adb \
2342 a-[a-o]*.adb a-[p-z]*.adb a-[a-o]*.ads a-[p-z]*.ads g-*.ad? i-*.ad? \
2343 s-[a-o]*.adb s-[p-z]*.adb s-[a-o]*.ads s-[p-z]*.ads
2344
2345 # Files that are in ADA_INCLUDE_SRCS but not in all configurations.
2346 # They will be removed from the run time if not used.
2347 ADA_EXCLUDE_SRCS =\
2348 s-bb.ads \
2349 s-bbbosu.ads s-bbcaco.ads s-bbcppr.ads s-bbexti.adb s-bbexti.ads \
2350 s-bbinte.adb s-bbinte.ads s-bbprot.adb s-bbprot.ads s-bbsle3.ads \
2351 s-bbsuer.ads s-bbsule.ads s-bbthqu.adb s-bbthqu.ads s-bbthre.adb \
2352 s-bbthre.ads s-bbtiev.adb s-bbtiev.ads s-bbtime.adb s-bbtime.ads \
2353 s-bcprmu.adb s-bcprmu.ads s-btstch.adb s-btstch.ads \
2354 s-po32gl.adb s-po32gl.ads \
2355 s-stache.adb s-stache.ads \
2356 s-thread.ads \
2357 s-vxwexc.adb s-vxwexc.ads s-vxwext.adb s-vxwext.ads \
2358 s-win32.ads s-winext.ads \
2359 g-regist.adb g-regist.ads g-sse.ads g-ssvety.ads \
2360 i-vxwoio.adb i-vxwoio.ads i-vxwork.ads
2361
2362 # ADA_EXCLUDE_SRCS without the sources used by the target
2363 ADA_EXCLUDE_FILES=$(filter-out \
2364 $(patsubst %$(objext),%.ads,$(GNATRTL_OBJS)) \
2365 $(patsubst %$(objext),%.adb,$(GNATRTL_OBJS)), \
2366 $(ADA_EXCLUDE_SRCS))
2367
2368 LIBGNAT=../$(RTSDIR)/libgnat.a
2369
2370 TOOLS_FLAGS_TO_PASS= \
2371 "CC=$(CC)" \
2372 "CFLAGS=$(CFLAGS)" \
2373 "LDFLAGS=$(LDFLAGS)" \
2374 "ADAFLAGS=$(ADAFLAGS)" \
2375 "INCLUDES=$(INCLUDES_FOR_SUBDIR)"\
2376 "ADA_INCLUDES=$(ADA_INCLUDES) $(ADA_INCLUDES_FOR_SUBDIR)"\
2377 "libsubdir=$(libsubdir)" \
2378 "exeext=$(exeext)" \
2379 "fsrcdir=$(fsrcdir)" \
2380 "srcdir=$(fsrcdir)" \
2381 "TOOLS_LIBS=$(TOOLS_LIBS) $(TGT_LIB)" \
2382 "GNATMAKE=$(GNATMAKE)" \
2383 "GNATLINK=$(GNATLINK)" \
2384 "GNATBIND=$(GNATBIND)"
2385
2386 GCC_LINK=$(CC) $(GCC_LINK_FLAGS) $(ADA_INCLUDES)
2387
2388 # Build directory for the tools. Let's copy the target-dependent
2389 # sources using the same mechanism as for gnatlib. The other sources are
2390 # accessed using the vpath directive below
2391 # Note: dummy target, stamp-tools is mainly handled by gnattools.
2392
2393 ../stamp-tools:
2394 touch ../stamp-tools
2395
2396 # when compiling the tools, the runtime has to be first on the path so that
2397 # it hides the runtime files lying with the rest of the sources
2398 ifeq ($(TOOLSCASE),native)
2399 vpath %.ads ../$(RTSDIR) ../
2400 vpath %.adb ../$(RTSDIR) ../
2401 vpath %.c ../$(RTSDIR) ../
2402 vpath %.h ../$(RTSDIR) ../
2403 endif
2404
2405 # in the cross tools case, everything is compiled with the native
2406 # gnatmake/link. Therefore only -I needs to be modified in ADA_INCLUDES
2407 ifeq ($(TOOLSCASE),cross)
2408 vpath %.ads ../
2409 vpath %.adb ../
2410 vpath %.c ../
2411 vpath %.h ../
2412 endif
2413
2414 # gnatmake/link tools cannot always be built with gnatmake/link for bootstrap
2415 # reasons: gnatmake should be built with a recent compiler, a recent compiler
2416 # may not generate ALI files compatible with an old gnatmake so it is important
2417 # to be able to build gnatmake without a version of gnatmake around. Once
2418 # everything has been compiled once, gnatmake can be recompiled with itself
2419 # (see target gnattools1-re)
2420 gnattools1: ../stamp-tools ../stamp-gnatlib-$(RTSDIR)
2421 $(MAKE) -C tools -f ../Makefile $(TOOLS_FLAGS_TO_PASS) \
2422 TOOLSCASE=native \
2423 ../../gnatmake$(exeext) ../../gnatlink$(exeext)
2424
2425 # gnatmake/link can be built with recent gnatmake/link if they are available.
2426 # This is especially convenient for building cross tools or for rebuilding
2427 # the tools when the original bootstrap has already be done.
2428 gnattools1-re: ../stamp-tools
2429 $(MAKE) -C tools -f ../Makefile $(TOOLS_FLAGS_TO_PASS) \
2430 TOOLSCASE=cross INCLUDES="" gnatmake-re gnatlink-re
2431
2432 # these tools are built with gnatmake & are common to native and cross
2433 gnattools2: ../stamp-tools
2434 $(MAKE) -C tools -f ../Makefile $(TOOLS_FLAGS_TO_PASS) \
2435 TOOLSCASE=native common-tools $(EXTRA_GNATTOOLS)
2436
2437 # those tools are only built for the cross version
2438 gnattools4: ../stamp-tools
2439 ifeq ($(ENABLE_VXADDR2LINE),true)
2440 $(MAKE) -C tools -f ../Makefile $(TOOLS_FLAGS_TO_PASS) \
2441 TOOLSCASE=cross top_buildir=../../.. \
2442 ../../vxaddr2line$(exeext)
2443 endif
2444
2445 common-tools: ../stamp-tools
2446 $(GNATMAKE) -j0 -c -b $(ADA_INCLUDES) \
2447 --GNATBIND="$(GNATBIND)" --GCC="$(CC) $(ALL_ADAFLAGS)" \
2448 gnatchop gnatcmd gnatkr gnatls gnatprep gnatxref gnatfind gnatname \
2449 gnatclean -bargs $(ADA_INCLUDES) $(GNATBIND_FLAGS)
2450 $(GNATLINK) -v gnatcmd -o ../../gnat$(exeext) \
2451 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2452 $(GNATLINK) -v gnatchop -o ../../gnatchop$(exeext) \
2453 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2454 $(GNATLINK) -v gnatkr -o ../../gnatkr$(exeext) \
2455 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2456 $(GNATLINK) -v gnatls -o ../../gnatls$(exeext) \
2457 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2458 $(GNATLINK) -v gnatprep -o ../../gnatprep$(exeext) \
2459 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2460 $(GNATLINK) -v gnatxref -o ../../gnatxref$(exeext) \
2461 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2462 $(GNATLINK) -v gnatfind -o ../../gnatfind$(exeext) \
2463 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2464 $(GNATLINK) -v gnatname -o ../../gnatname$(exeext) \
2465 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2466 $(GNATLINK) -v gnatclean -o ../../gnatclean$(exeext) \
2467 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2468
2469 ../../gnatsym$(exeext): ../stamp-tools
2470 $(GNATMAKE) -c $(ADA_INCLUDES) gnatsym --GCC="$(CC) $(ALL_ADAFLAGS)"
2471 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatsym
2472 $(GNATLINK) -v gnatsym -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2473
2474 ../../gnatdll$(exeext): ../stamp-tools
2475 $(GNATMAKE) -c $(ADA_INCLUDES) gnatdll --GCC="$(CC) $(ALL_ADAFLAGS)"
2476 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatdll
2477 $(GNATLINK) -v gnatdll -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2478
2479 ../../vxaddr2line$(exeext): ../stamp-tools targext.o
2480 $(GNATMAKE) -c $(ADA_INCLUDES) vxaddr2line --GCC="$(CC) $(ALL_ADAFLAGS)"
2481 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) vxaddr2line
2482 $(GNATLINK) -v vxaddr2line -o $@ --GCC="$(GCC_LINK)" targext.o $(CLIB)
2483
2484 gnatmake-re: ../stamp-tools link.o targext.o
2485 $(GNATMAKE) -j0 $(ADA_INCLUDES) -u sdefault --GCC="$(CC) $(MOST_ADA_FLAGS)"
2486 $(GNATMAKE) -j0 -c $(ADA_INCLUDES) gnatmake --GCC="$(CC) $(ALL_ADAFLAGS)"
2487 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatmake
2488 $(GNATLINK) -v gnatmake -o ../../gnatmake$(exeext) \
2489 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2490
2491 # Note the use of the "mv" command in order to allow gnatlink to be linked with
2492 # with the former version of gnatlink itself which cannot override itself.
2493 # gnatlink-re cannot be run at the same time as gnatmake-re, hence the
2494 # dependency
2495 gnatlink-re: ../stamp-tools link.o targext.o gnatmake-re
2496 $(GNATMAKE) -j0 -c $(ADA_INCLUDES) gnatlink --GCC="$(CC) $(ALL_ADAFLAGS)"
2497 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlink
2498 $(GNATLINK) -v gnatlink -o ../../gnatlinknew$(exeext) \
2499 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2500 $(MV) ../../gnatlinknew$(exeext) ../../gnatlink$(exeext)
2501
2502 # Needs to be built with CC=gcc
2503 # Since the RTL should be built with the latest compiler, remove the
2504 # stamp target in the parent directory whenever gnat1 is rebuilt
2505
2506 # Likewise for the tools
2507 ../../gnatmake$(exeext): $(P) b_gnatm.o link.o targext.o $(GNATMAKE_OBJS)
2508 $(GCC_LINK) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatm.o $(GNATMAKE_OBJS) \
2509 $(TOOLS_LIBS)
2510
2511 ../../gnatlink$(exeext): $(P) b_gnatl.o link.o targext.o $(GNATLINK_OBJS)
2512 $(GCC_LINK) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatl.o $(GNATLINK_OBJS) \
2513 $(TOOLS_LIBS)
2514
2515 ../stamp-gnatlib-$(RTSDIR):
2516 @if [ ! -f stamp-gnatlib-$(RTSDIR) ] ; \
2517 then \
2518 $(ECHO) You must first build the GNAT library: make gnatlib; \
2519 false; \
2520 else \
2521 true; \
2522 fi
2523
2524 install-gnatlib: ../stamp-gnatlib-$(RTSDIR)
2525 # Create the directory before deleting it, in case the directory is
2526 # a list of directories (as it may be on VMS). This ensures we are
2527 # deleting the right one.
2528 -$(MKDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
2529 -$(MKDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
2530 $(RMDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
2531 $(RMDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
2532 -$(MKDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
2533 -$(MKDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
2534 for file in $(RTSDIR)/*.ali; do \
2535 $(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
2536 done
2537 -cd $(RTSDIR); for file in *$(arext);do \
2538 $(INSTALL_DATA) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
2539 $(RANLIB_FOR_TARGET) $(DESTDIR)$(ADA_RTL_OBJ_DIR)/$$file; \
2540 done
2541 -$(foreach file, $(EXTRA_ADALIB_FILES), \
2542 $(INSTALL_DATA_DATE) $(RTSDIR)/$(file) $(DESTDIR)$(ADA_RTL_OBJ_DIR) && \
2543 ) true
2544 # Install the shared libraries, if any, using $(INSTALL) instead
2545 # of $(INSTALL_DATA). The latter may force a mode inappropriate
2546 # for shared libraries on some targets, e.g. on HP-UX where the x
2547 # permission is required.
2548 # Also install the .dSYM directories if they exist (these directories
2549 # contain the debug information for the shared libraries on darwin)
2550 for file in gnat gnarl; do \
2551 if [ -f $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) ]; then \
2552 $(INSTALL) $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
2553 $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
2554 fi; \
2555 if [ -f $(RTSDIR)/lib$${file}$(soext) ]; then \
2556 $(LN_S) lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
2557 $(DESTDIR)$(ADA_RTL_OBJ_DIR)/lib$${file}$(soext); \
2558 fi; \
2559 if [ -d $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext).dSYM ]; then \
2560 $(CP) -r $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext).dSYM \
2561 $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
2562 fi; \
2563 done
2564 # This copy must be done preserving the date on the original file.
2565 for file in $(RTSDIR)/*.ad?; do \
2566 $(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_INCLUDE_DIR); \
2567 done
2568 cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.adb
2569 cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.ads
2570
2571 ../stamp-gnatlib2-$(RTSDIR):
2572 $(RM) $(RTSDIR)/s-*.ali
2573 $(RM) $(RTSDIR)/s-*$(objext)
2574 $(RM) $(RTSDIR)/a-*.ali
2575 $(RM) $(RTSDIR)/a-*$(objext)
2576 $(RM) $(RTSDIR)/*.ali
2577 $(RM) $(RTSDIR)/*$(objext)
2578 $(RM) $(RTSDIR)/*$(arext)
2579 $(RM) $(RTSDIR)/*$(soext)
2580 touch ../stamp-gnatlib2-$(RTSDIR)
2581 $(RM) ../stamp-gnatlib-$(RTSDIR)
2582
2583 ../stamp-gnatlib1-$(RTSDIR): Makefile ../stamp-gnatlib2-$(RTSDIR)
2584 $(RMDIR) $(RTSDIR)
2585 $(MKDIR) $(RTSDIR)
2586 $(CHMOD) u+w $(RTSDIR)
2587 # Copy target independent sources
2588 $(foreach f,$(ADA_INCLUDE_SRCS) $(LIBGNAT_SRCS), \
2589 $(LN_S) $(fsrcpfx)ada/$(f) $(RTSDIR) ;) true
2590 # Remove files not used
2591 $(RM) $(patsubst %,$(RTSDIR)/%,$(ADA_EXCLUDE_FILES))
2592 # Remove files to be replaced by target dependent sources
2593 $(RM) $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
2594 $(RTSDIR)/$(word 1,$(subst <, ,$(PAIR))))
2595 for f in $(RTSDIR)/*-*-*.ads $(RTSDIR)/*-*-*.adb; do \
2596 case "$$f" in \
2597 $(RTSDIR)/s-stratt-*) ;; \
2598 *) $(RM) $$f ;; \
2599 esac; \
2600 done
2601 # Copy new target dependent sources
2602 $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
2603 $(LN_S) $(fsrcpfx)ada/$(word 2,$(subst <, ,$(PAIR))) \
2604 $(RTSDIR)/$(word 1,$(subst <, ,$(PAIR)));)
2605 # Copy tsystem.h
2606 $(CP) $(srcdir)/tsystem.h $(RTSDIR)
2607 $(RM) ../stamp-gnatlib-$(RTSDIR)
2608 touch ../stamp-gnatlib1-$(RTSDIR)
2609
2610 ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(subst -, ,$(host)))),)
2611 OSCONS_CPP=../../$(DECC) -E /comment=as_is -DNATIVE \
2612 -DTARGET='""$(target)""' $(fsrcpfx)ada/s-oscons-tmplt.c
2613
2614 OSCONS_EXTRACT=../../$(DECC) -DNATIVE \
2615 -DTARGET='""$(target)""' $(fsrcpfx)ada/s-oscons-tmplt.c ; \
2616 ld -o s-oscons-tmplt.exe s-oscons-tmplt.obj; \
2617 ./s-oscons-tmplt.exe > s-oscons-tmplt.s
2618
2619 else
2620 # GCC_FOR_TARGET has paths relative to the gcc directory, so we need to adjust
2621 # for running it from $(RTSDIR)
2622 OSCONS_CC=`echo "$(GCC_FOR_TARGET)" \
2623 | sed -e 's^\./xgcc^../../xgcc^' -e 's^-B./^-B../../^'`
2624 OSCONS_CPP=$(OSCONS_CC) $(GNATLIBCFLAGS) -E -C \
2625 -DTARGET=\"$(target)\" $(fsrcpfx)ada/s-oscons-tmplt.c > s-oscons-tmplt.i
2626 OSCONS_EXTRACT=$(OSCONS_CC) $(GNATLIBCFLAGS) -S s-oscons-tmplt.i
2627 endif
2628
2629 ./bldtools/oscons/xoscons: xoscons.adb xutil.ads xutil.adb
2630 -$(MKDIR) ./bldtools/oscons
2631 $(RM) $(addprefix ./bldtools/oscons/,$(notdir $^))
2632 $(CP) $^ ./bldtools/oscons
2633 (cd ./bldtools/oscons ; gnatmake -q xoscons)
2634
2635 $(RTSDIR)/s-oscons.ads: ../stamp-gnatlib1-$(RTSDIR) s-oscons-tmplt.c gsocket.h ./bldtools/oscons/xoscons
2636 $(RM) $(RTSDIR)/s-oscons-tmplt.i $(RTSDIR)/s-oscons-tmplt.s
2637 (cd $(RTSDIR) ; \
2638 $(OSCONS_CPP) ; \
2639 $(OSCONS_EXTRACT) ; \
2640 ../bldtools/oscons/xoscons s-oscons)
2641
2642 # Don't use semicolon separated shell commands that involve list expansions.
2643 # The semicolon triggers a call to DCL on VMS and DCL can't handle command
2644 # line lengths in excess of 256 characters.
2645 # Example: cd $(RTSDIR); ar rc libfoo.a $(LONG_LIST_OF_OBJS)
2646 # is guaranteed to overflow the buffer.
2647
2648 gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../stamp-gnatlib2-$(RTSDIR) $(RTSDIR)/s-oscons.ads
2649 # C files
2650 $(MAKE) -C $(RTSDIR) \
2651 CC="`echo \"$(GCC_FOR_TARGET)\" \
2652 | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \
2653 INCLUDES="$(INCLUDES_FOR_SUBDIR) -I./../.." \
2654 CFLAGS="$(GNATLIBCFLAGS_FOR_C)" \
2655 FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \
2656 srcdir=$(fsrcdir) \
2657 -f ../Makefile $(LIBGNAT_OBJS)
2658 # Ada files
2659 $(MAKE) -C $(RTSDIR) \
2660 CC="`echo \"$(GCC_FOR_TARGET)\" \
2661 | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \
2662 ADA_INCLUDES="" \
2663 CFLAGS="$(GNATLIBCFLAGS)" \
2664 ADAFLAGS="$(GNATLIBFLAGS)" \
2665 FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \
2666 srcdir=$(fsrcdir) \
2667 -f ../Makefile $(GNATRTL_OBJS)
2668 $(RM) $(RTSDIR)/libgnat$(arext) $(RTSDIR)/libgnarl$(arext)
2669 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgnat$(arext) \
2670 $(addprefix $(RTSDIR)/,$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS))
2671 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgnat$(arext)
2672 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgnarl$(arext) \
2673 $(addprefix $(RTSDIR)/,$(GNATRTL_TASKING_OBJS))
2674 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgnarl$(arext)
2675 ifeq ($(GMEM_LIB),gmemlib)
2676 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgmem$(arext) \
2677 $(RTSDIR)/memtrack.o
2678 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgmem$(arext)
2679 endif
2680 $(CHMOD) a-wx $(RTSDIR)/*.ali
2681 touch ../stamp-gnatlib-$(RTSDIR)
2682
2683 # Warning: this target assumes that LIBRARY_VERSION has been set correctly.
2684 gnatlib-shared-default:
2685 $(MAKE) $(FLAGS_TO_PASS) \
2686 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2687 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(PICFLAG_FOR_TARGET)" \
2688 GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C) $(PICFLAG_FOR_TARGET)" \
2689 MULTISUBDIR="$(MULTISUBDIR)" \
2690 THREAD_KIND="$(THREAD_KIND)" \
2691 gnatlib
2692 $(RM) $(RTSDIR)/libgna*$(soext)
2693 cd $(RTSDIR); `echo "$(GCC_FOR_TARGET)" \
2694 | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'` -shared $(GNATLIBCFLAGS) \
2695 $(PICFLAG_FOR_TARGET) \
2696 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2697 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
2698 $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2699 $(MISCLIB) -lm
2700 cd $(RTSDIR); `echo "$(GCC_FOR_TARGET)" \
2701 | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'` -shared $(GNATLIBCFLAGS) \
2702 $(PICFLAG_FOR_TARGET) \
2703 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2704 $(GNATRTL_TASKING_OBJS) \
2705 $(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2706 $(THREADSLIB)
2707 cd $(RTSDIR); $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2708 libgnat$(soext)
2709 cd $(RTSDIR); $(LN_S) libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2710 libgnarl$(soext)
2711
2712 gnatlib-shared-dual:
2713 $(MAKE) $(FLAGS_TO_PASS) \
2714 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2715 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2716 GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \
2717 MULTISUBDIR="$(MULTISUBDIR)" \
2718 THREAD_KIND="$(THREAD_KIND)" \
2719 gnatlib-shared-default
2720 $(MV) $(RTSDIR)/libgna*$(soext) .
2721 $(RM) ../stamp-gnatlib2-$(RTSDIR)
2722 $(MAKE) $(FLAGS_TO_PASS) \
2723 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2724 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2725 GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \
2726 MULTISUBDIR="$(MULTISUBDIR)" \
2727 THREAD_KIND="$(THREAD_KIND)" \
2728 gnatlib
2729 $(MV) libgna*$(soext) $(RTSDIR)
2730
2731 gnatlib-shared-dual-win32:
2732 $(MAKE) $(FLAGS_TO_PASS) \
2733 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2734 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2735 GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \
2736 PICFLAG_FOR_TARGET="$(PICFLAG_FOR_TARGET)" \
2737 MULTISUBDIR="$(MULTISUBDIR)" \
2738 THREAD_KIND="$(THREAD_KIND)" \
2739 gnatlib-shared-win32
2740 $(MV) $(RTSDIR)/libgna*$(soext) .
2741 $(RM) ../stamp-gnatlib2-$(RTSDIR)
2742 $(MAKE) $(FLAGS_TO_PASS) \
2743 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2744 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2745 GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \
2746 MULTISUBDIR="$(MULTISUBDIR)" \
2747 THREAD_KIND="$(THREAD_KIND)" \
2748 gnatlib
2749 $(MV) libgna*$(soext) $(RTSDIR)
2750
2751 # ??? we need to add the option to support auto-import of arrays/records to
2752 # the GNATLIBFLAGS when this will be supported by GNAT. At this point we will
2753 # use the gnatlib-shared-dual-win32 target to build the GNAT runtimes on
2754 # Windows.
2755 gnatlib-shared-win32:
2756 $(MAKE) $(FLAGS_TO_PASS) \
2757 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2758 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(PICFLAG_FOR_TARGET)" \
2759 GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C) $(PICFLAG_FOR_TARGET)" \
2760 MULTISUBDIR="$(MULTISUBDIR)" \
2761 THREAD_KIND="$(THREAD_KIND)" \
2762 gnatlib
2763 $(RM) $(RTSDIR)/libgna*$(soext)
2764 cd $(RTSDIR); `echo "$(GCC_FOR_TARGET)" \
2765 | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'` -shared -shared-libgcc \
2766 $(PICFLAG_FOR_TARGET) \
2767 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2768 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
2769 $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) $(MISCLIB)
2770 cd $(RTSDIR); `echo "$(GCC_FOR_TARGET)" \
2771 | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'` -shared -shared-libgcc \
2772 $(PICFLAG_FOR_TARGET) \
2773 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2774 $(GNATRTL_TASKING_OBJS) \
2775 $(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2776 $(THREADSLIB) -Wl,libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)
2777
2778 gnatlib-shared-darwin:
2779 $(MAKE) $(FLAGS_TO_PASS) \
2780 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2781 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(PICFLAG_FOR_TARGET)" \
2782 GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C) $(PICFLAG_FOR_TARGET) -fno-common" \
2783 MULTISUBDIR="$(MULTISUBDIR)" \
2784 THREAD_KIND="$(THREAD_KIND)" \
2785 gnatlib
2786 $(RM) $(RTSDIR)/libgnat$(soext) $(RTSDIR)/libgnarl$(soext)
2787 cd $(RTSDIR); `echo "$(GCC_FOR_TARGET)" \
2788 | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'` -dynamiclib $(PICFLAG_FOR_TARGET) \
2789 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2790 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
2791 $(SO_OPTS) \
2792 -Wl,-install_name,@rpath/libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2793 $(MISCLIB)
2794 cd $(RTSDIR); `echo "$(GCC_FOR_TARGET)" \
2795 | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'` -dynamiclib $(PICFLAG_FOR_TARGET) \
2796 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2797 $(GNATRTL_TASKING_OBJS) \
2798 $(SO_OPTS) \
2799 -Wl,-install_name,@rpath/libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2800 $(THREADSLIB) -Wl,libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)
2801 cd $(RTSDIR); $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2802 libgnat$(soext)
2803 cd $(RTSDIR); $(LN_S) libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2804 libgnarl$(soext)
2805 cd $(RTSDIR); dsymutil libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)
2806 cd $(RTSDIR); dsymutil libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext)
2807
2808 gnatlib-shared-vms:
2809 $(MAKE) $(FLAGS_TO_PASS) \
2810 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2811 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2812 GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \
2813 MULTISUBDIR="$(MULTISUBDIR)" \
2814 THREAD_KIND="$(THREAD_KIND)" \
2815 gnatlib
2816 $(RM) $(RTSDIR)/libgna*$(soext)
2817 cd $(RTSDIR) && \
2818 ../../gnatsym -s SYMVEC_$$$$.opt \
2819 $(LIBGNAT_OBJS) $(GNATRTL_NONTASKING_OBJS) && \
2820 ../../xgcc -g -B../../ -shared -shared-libgcc \
2821 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) libgnat.a \
2822 sys\$$library:trace.exe \
2823 --for-linker=/noinform \
2824 --for-linker=SYMVEC_$$$$.opt \
2825 --for-linker=gsmatch=equal,$(GSMATCH_VERSION)
2826 cd $(RTSDIR) && \
2827 ../../gnatsym -s SYMVEC_$$$$.opt \
2828 $(GNATRTL_TASKING_OBJS) && \
2829 ../../xgcc -g -B../../ -shared -shared-libgcc \
2830 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2831 libgnarl.a libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2832 sys\$$library:trace.exe \
2833 --for-linker=/noinform \
2834 --for-linker=SYMVEC_$$$$.opt \
2835 --for-linker=gsmatch=equal,$(GSMATCH_VERSION)
2836
2837 gnatlib-shared:
2838 $(MAKE) $(FLAGS_TO_PASS) \
2839 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2840 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2841 GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \
2842 MULTISUBDIR="$(MULTISUBDIR)" \
2843 THREAD_KIND="$(THREAD_KIND)" \
2844 PICFLAG_FOR_TARGET="$(PICFLAG_FOR_TARGET)" \
2845 $(GNATLIB_SHARED)
2846
2847 # When building a SJLJ runtime for VxWorks, in addition to forcing
2848 # ZCX_By_default to False, we need to ensure that extra linker options
2849 # are not passed to prevent the inclusion of useless objects and
2850 # potential troubles from the presence of extra symbols and references
2851 # in some configurations. The inhibition is performed by commenting
2852 # the pragma instead of deleting the line, as the latter might result
2853 # in getting multiple blank lines, hence a style check error, as a
2854 # result.
2855 gnatlib-sjlj:
2856 $(MAKE) $(FLAGS_TO_PASS) EH_MECHANISM="" \
2857 THREAD_KIND="$(THREAD_KIND)" ../stamp-gnatlib1-$(RTSDIR)
2858 sed -e 's/ZCX_By_Default.*/ZCX_By_Default : constant Boolean := False;/' $(RTSDIR)/system.ads > $(RTSDIR)/s.ads
2859 sed -e 's/\(pragma Linker.*crtbe.*\)/-- \1/' $(RTSDIR)/s.ads > $(RTSDIR)/s2.ads
2860 $(RM) $(RTSDIR)/s.ads
2861 $(MV) $(RTSDIR)/s2.ads $(RTSDIR)/system.ads
2862 $(MAKE) $(FLAGS_TO_PASS) \
2863 EH_MECHANISM="" \
2864 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2865 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2866 GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \
2867 FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \
2868 MULTISUBDIR="$(MULTISUBDIR)" \
2869 THREAD_KIND="$(THREAD_KIND)" \
2870 PICFLAG_FOR_TARGET="$(PICFLAG_FOR_TARGET)" gnatlib
2871
2872 gnatlib-zcx:
2873 $(MAKE) $(FLAGS_TO_PASS) EH_MECHANISM="-gcc" \
2874 THREAD_KIND="$(THREAD_KIND)" ../stamp-gnatlib1-$(RTSDIR)
2875 sed -e 's/ZCX_By_Default.*/ZCX_By_Default : constant Boolean := True;/' $(RTSDIR)/system.ads > $(RTSDIR)/s.ads
2876 $(MV) $(RTSDIR)/s.ads $(RTSDIR)/system.ads
2877 $(MAKE) $(FLAGS_TO_PASS) \
2878 EH_MECHANISM="-gcc" \
2879 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2880 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2881 GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \
2882 FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \
2883 MULTISUBDIR="$(MULTISUBDIR)" \
2884 THREAD_KIND="$(THREAD_KIND)" \
2885 PICFLAG_FOR_TARGET="$(PICFLAG_FOR_TARGET)" gnatlib
2886
2887 # Compiling object files from source files.
2888
2889 # Note that dependencies on obstack.h are not written
2890 # because that file is not part of GCC.
2891 # Dependencies on gvarargs.h are not written
2892 # because all that file does, when not compiling with GCC,
2893 # is include the system varargs.h.
2894
2895 b_gnatl.adb : $(GNATLINK_OBJS)
2896 $(GNATBIND) $(ADA_INCLUDES) -o b_gnatl.adb gnatlink.ali
2897
2898 b_gnatl.o : b_gnatl.adb
2899 $(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) -gnatws -gnatyN \
2900 $< $(OUTPUT_OPTION)
2901
2902 b_gnatm.adb : $(GNATMAKE_OBJS)
2903 $(GNATBIND) $(ADA_INCLUDES) -o b_gnatm.adb gnatmake.ali
2904
2905 b_gnatm.o : b_gnatm.adb
2906 $(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) -gnatws -gnatyN \
2907 $< $(OUTPUT_OPTION)
2908
2909 ADA_INCLUDE_DIR = $(libsubdir)/adainclude
2910 ADA_RTL_OBJ_DIR = $(libsubdir)/adalib
2911
2912 # Special flags
2913
2914 # force no sibling call optimization on s-traceb.o so the number of stack
2915 # frames to be skipped when computing a call chain is not modified by
2916 # optimization.
2917
2918 s-traceb.o : s-traceb.adb s-traceb.ads
2919 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) \
2920 $(NO_SIBLING_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
2921
2922 # force debugging information on s-tasdeb.o so that it is always
2923 # possible to set conditional breakpoints on tasks.
2924
2925 s-tasdeb.o : s-tasdeb.adb s-tasdeb.ads
2926 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 $(ADA_INCLUDES) \
2927 $< $(OUTPUT_OPTION)
2928
2929 # force debugging information on s-vaflop.o so that it is always
2930 # possible to call the VAX float debug print routines.
2931 # force at least -O so that the inline assembly works.
2932
2933 s-vaflop.o : s-vaflop.adb s-vaflop.ads
2934 $(CC) -c -O $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) $(ADA_INCLUDES) \
2935 $< $(OUTPUT_OPTION)
2936
2937 # force no function reordering on a-except.o because of the exclusion bounds
2938 # mechanism (see the source file for more detailed information).
2939 # force debugging information on a-except.o so that it is always
2940 # possible to set conditional breakpoints on exceptions.
2941 # use -O1 otherwise gdb isn't able to get a full backtrace on mips targets.
2942
2943 a-except.o : a-except.adb a-except.ads
2944 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O1 -fno-inline \
2945 $(NO_REORDER_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
2946
2947 # compile s-excdeb.o without optimization and with debug info to let the
2948 # debugger set breakpoints and inspect subprogram parameters on exception
2949 # related events.
2950
2951 s-excdeb.o : s-excdeb.adb s-excdeb.ads s-except.ads
2952 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 $(ADA_INCLUDES) \
2953 $< $(OUTPUT_OPTION)
2954
2955 # force debugging information on s-assert.o so that it is always
2956 # possible to set breakpoint on assert failures.
2957
2958 s-assert.o : s-assert.adb s-assert.ads
2959 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) $(ADA_INCLUDES) \
2960 $< $(OUTPUT_OPTION)
2961
2962 # force debugging information on a-tags.o so that the debugger can find
2963 # the description of Ada.Tags.Type_Specific_Data.
2964
2965 a-tags.o : a-tags.adb a-tags.ads
2966 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) $(ADA_INCLUDES) \
2967 $< $(OUTPUT_OPTION)
2968
2969 # need to keep the frame pointer in this file to pop the stack properly on
2970 # some targets.
2971 tracebak.o : tracebak.c tb-alvms.c tb-alvxw.c tb-gcc.c
2972 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) \
2973 $(INCLUDES) -fno-omit-frame-pointer $< $(OUTPUT_OPTION)
2974
2975 adadecode.o : adadecode.c adadecode.h
2976 aux-io.o : aux-io.c
2977 argv.o : argv.c
2978 cal.o : cal.c
2979 deftarg.o : deftarg.c
2980 errno.o : errno.c
2981 exit.o : adaint.h exit.c
2982 expect.o : expect.c
2983 final.o : final.c
2984 locales.o : locales.c
2985 mkdir.o : mkdir.c
2986 socket.o : socket.c gsocket.h
2987 sysdep.o : sysdep.c
2988 raise.o : raise.c raise.h
2989 sigtramp-ppcvxw.o : sigtramp-ppcvxw.c sigtramp.h
2990 terminals.o : terminals.c
2991 vx_stack_info.o : vx_stack_info.c
2992
2993 raise-gcc.o : raise-gcc.c raise.h
2994 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
2995 -iquote $(srcdir) -iquote $(srcdir)/../libgcc \
2996 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2997
2998 cio.o : cio.c
2999 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
3000 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
3001
3002 init.o : init.c adaint.h raise.h
3003 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
3004 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
3005
3006 initialize.o : initialize.c raise.h
3007 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
3008 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
3009
3010 link.o : link.c
3011 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
3012 $(ALL_CPPFLAGS) $(INCLUDES_FOR_SUBDIR) \
3013 $< $(OUTPUT_OPTION)
3014
3015 targext.o : targext.c
3016 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
3017 -iquote $(srcdir) \
3018 $(ALL_CPPFLAGS) $(INCLUDES_FOR_SUBDIR) \
3019 $< $(OUTPUT_OPTION)
3020
3021 # In GNU Make, ignore whether `stage*' exists.
3022 .PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap
3023 .PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4
3024
3025 force: