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