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