Update copyright years
[official-gcc.git] / gcc / ada / gcc-interface / Makefile.in
blob749dbbfec4751d5ed721cf1cede74399b7170717
1 # Makefile for GNU Ada Compiler (GNAT).
2 # Copyright (C) 1994-2017 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_INLINE_ADAFLAGS = -fno-inline
110 NO_OMIT_ADAFLAGS = -fno-omit-frame-pointer
111 NO_SIBLING_ADAFLAGS = -fno-optimize-sibling-calls
112 NO_REORDER_ADAFLAGS = -fno-toplevel-reorder
113 GNATLIBFLAGS = -W -Wall -gnatpg -nostdinc
114 GNATLIBCFLAGS = -g -O2
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 = \
119 -W -Wall $(GNATLIBCFLAGS) -fexceptions -DIN_RTS -DHAVE_GETIPINFO
120 PICFLAG_FOR_TARGET = @PICFLAG_FOR_TARGET@
121 ALL_ADAFLAGS = $(CFLAGS) $(ADA_CFLAGS) $(ADAFLAGS)
122 THREAD_KIND = native
123 THREADSLIB =
124 GMEM_LIB =
125 MISCLIB =
126 OUTPUT_OPTION = -o $@
128 objext = .o
129 exeext =
130 arext = .a
131 soext = .so
132 shext =
133 hyphen = -
135 # program_transform_name and objdir are set by configure.ac.
136 program_transform_name =
137 objdir = .
139 target_alias=@target_alias@
140 target=@target@
141 target_cpu=@target_cpu@
142 target_vendor=@target_vendor@
143 target_os=@target_os@
144 host_cpu=@host_cpu@
145 host_vendor=@host_vendor@
146 host_os=@host_os@
147 target_cpu_default = @target_cpu_default@
148 xmake_file = @xmake_file@
149 tmake_file = @tmake_file@
150 #version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < $(srcdir)/version.c`
151 #mainversion=`sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/' < $(srcdir)/version.c`
153 # Directory where sources are, from where we are.
154 VPATH = $(srcdir)/ada
156 # Full path to top source directory
157 # In particular this is used to access libgcc headers, so that references to
158 # these headers from GNAT runtime objects have path names in debugging info
159 # that are consistent with libgcc objects. Also used for other references to
160 # the top source directory for consistency.
161 ftop_srcdir := $(shell cd $(srcdir)/..;${PWD_COMMAND})
163 fsrcdir := $(shell cd $(srcdir);${PWD_COMMAND})
164 fsrcpfx := $(shell cd $(srcdir);${PWD_COMMAND})/
165 fcurdir := $(shell ${PWD_COMMAND})
166 fcurpfx := $(shell ${PWD_COMMAND})/
168 # Top build directory, relative to here.
169 top_builddir = ../..
171 # Internationalization library.
172 LIBINTL = @LIBINTL@
173 LIBINTL_DEP = @LIBINTL_DEP@
175 # Character encoding conversion library.
176 LIBICONV = @LIBICONV@
177 LIBICONV_DEP = @LIBICONV_DEP@
179 # Any system libraries needed just for GNAT.
180 SYSLIBS = @GNAT_LIBEXC@
182 # List extra gnattools
183 EXTRA_GNATTOOLS =
185 # List of target dependent sources, overridden below as necessary
186 TARGET_ADA_SRCS =
188 # Type of tools build we are doing; default is not compiling tools.
189 TOOLSCASE =
191 # Multilib handling
192 MULTISUBDIR =
193 RTSDIR = rts$(subst /,_,$(MULTISUBDIR))
195 # Link flags used to build gnat tools. By default we prefer to statically
196 # link with libgcc to avoid a dependency on shared libgcc (which is tricky
197 # to deal with as it may conflict with the libgcc provided by the system).
198 GCC_LINK_FLAGS=-static-libstdc++ -static-libgcc
200 # End of variables for you to override.
202 all: all.indirect
204 # This tells GNU Make version 3 not to put all variables in the environment.
205 .NOEXPORT:
207 # target overrides
208 ifneq ($(tmake_file),)
209 include $(tmake_file)
210 endif
212 # host overrides
213 ifneq ($(xmake_file),)
214 include $(xmake_file)
215 endif
217 # Now figure out from those variables how to compile and link.
219 all.indirect: Makefile ../gnat1$(exeext)
221 # IN_GCC is meant to distinguish between code compiled into GCC itself, i.e.
222 # for the host, and the rest. But we also use it for the tools (link.c) and
223 # even break the host/target wall by using it for the library (targext.c).
224 # autoconf inserts -DCROSS_DIRECTORY_STRUCTURE if we are building a cross
225 # compiler which does not use the native libraries and headers.
226 INTERNAL_CFLAGS = @CROSS@ -DIN_GCC
228 # This is the variable actually used when we compile.
229 ALL_CFLAGS = $(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS)
231 # Likewise.
232 ALL_CPPFLAGS = $(CPPFLAGS)
234 # Used with $(COMPILER).
235 ALL_COMPILERFLAGS = $(ALL_CFLAGS)
237 # This is where we get libiberty.a from.
238 LIBIBERTY = ../../libiberty/libiberty.a
240 # We need to link against libbacktrace because diagnostic.c in
241 # libcommon.a uses it.
242 LIBBACKTRACE = ../../libbacktrace/.libs/libbacktrace.a
244 # How to link with both our special library facilities
245 # and the system's installed libraries.
246 LIBS = $(LIBINTL) $(LIBICONV) $(LIBBACKTRACE) $(LIBIBERTY) $(SYSLIBS)
247 LIBDEPS = $(LIBINTL_DEP) $(LIBICONV_DEP) $(LIBBACKTRACE) $(LIBIBERTY)
248 # Default is no TGT_LIB; one might be passed down or something
249 TGT_LIB =
250 TOOLS_LIBS = ../link.o ../targext.o ../../ggc-none.o ../../libcommon-target.a \
251 ../../libcommon.a ../../../libcpp/libcpp.a $(LIBGNAT) $(LIBINTL) $(LIBICONV) \
252 ../$(LIBBACKTRACE) ../$(LIBIBERTY) $(SYSLIBS) $(TGT_LIB)
254 # Add -no-pie to TOOLS_LIBS since some of them are compiled with -fno-PIE.
255 TOOLS_LIBS += @NO_PIE_FLAG@
257 # Specify the directories to be searched for header files.
258 # Both . and srcdir are used, in that order,
259 # so that tm.h and config.h will be found in the compilation
260 # subdirectory rather than in the source directory.
261 INCLUDES = -iquote . -iquote .. -iquote $(srcdir)/ada -iquote $(srcdir) \
262 -I $(ftop_srcdir)/include $(GMPINC)
264 ADA_INCLUDES = -I- -I. -I$(srcdir)/ada
266 # Likewise, but valid for subdirectories of the current dir.
267 # FIXME: for VxWorks, we cannot add $(fsrcdir) because the regs.h file in
268 # that directory conflicts with a system header file.
269 ifneq ($(findstring vxworks,$(target_os)),)
270 INCLUDES_FOR_SUBDIR = -iquote . -iquote .. -iquote ../.. \
271 -iquote $(fsrcdir)/ada \
272 -I$(ftop_srcdir)/include $(GMPINC)
273 else
274 INCLUDES_FOR_SUBDIR = -iquote . -iquote .. -iquote ../.. \
275 -iquote $(fsrcdir)/ada -iquote $(fsrcdir) \
276 -I$(ftop_srcdir)/include $(GMPINC)
277 endif
279 ADA_INCLUDES_FOR_SUBDIR = -I. -I$(fsrcdir)/ada
281 # Avoid a lot of time thinking about remaking Makefile.in and *.def.
282 .SUFFIXES: .in .def
284 # Say how to compile Ada programs.
285 .SUFFIXES: .ada .adb .ads .asm
287 # Always use -I$(srcdir)/config when compiling.
288 .asm.o:
289 $(CC) -c -x assembler $< $(OUTPUT_OPTION)
291 .c.o:
292 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) \
293 $(INCLUDES) $< $(OUTPUT_OPTION)
295 .adb.o:
296 $(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
298 .ads.o:
299 $(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
301 # how to regenerate this file
302 Makefile: ../config.status $(srcdir)/ada/gcc-interface/Makefile.in $(srcdir)/ada/Makefile.in $(srcdir)/version.c
303 cd ..; \
304 LANGUAGES="$(CONFIG_LANGUAGES)" \
305 CONFIG_HEADERS= \
306 CONFIG_FILES="ada/gcc-interface/Makefile ada/Makefile" $(SHELL) config.status
308 # This tells GNU make version 3 not to export all the variables
309 # defined in this file into the environment.
310 .NOEXPORT:
312 # Lists of files for various purposes.
314 GNATLINK_OBJS = gnatlink.o \
315 a-except.o ali.o alloc.o butil.o casing.o csets.o debug.o fmap.o fname.o \
316 gnatvsn.o hostparm.o indepsw.o interfac.o i-c.o i-cstrin.o namet.o opt.o \
317 osint.o output.o rident.o s-exctab.o s-secsta.o s-stalib.o s-stoele.o \
318 sdefault.o snames.o stylesw.o switch.o system.o table.o targparm.o tree_io.o \
319 types.o validsw.o widechar.o
321 GNATMAKE_OBJS = a-except.o ali.o ali-util.o aspects.o s-casuti.o alloc.o \
322 atree.o binderr.o butil.o casing.o csets.o debug.o elists.o einfo.o errout.o \
323 erroutc.o errutil.o err_vars.o fmap.o fname.o fname-uf.o fname-sf.o \
324 gnatmake.o gnatvsn.o hostparm.o interfac.o i-c.o i-cstrin.o krunch.o lib.o \
325 make.o makeusg.o make_util.o namet.o nlists.o opt.o osint.o osint-m.o \
326 output.o restrict.o rident.o s-exctab.o \
327 s-secsta.o s-stalib.o s-stoele.o scans.o scng.o sdefault.o sfn_scan.o \
328 s-purexc.o s-htable.o scil_ll.o sem_aux.o sinfo.o sinput.o sinput-c.o \
329 snames.o stand.o stringt.o styleg.o stylesw.o system.o validsw.o \
330 switch.o switch-m.o table.o targparm.o tempdir.o tree_io.o types.o uintp.o \
331 uname.o urealp.o usage.o widechar.o \
332 $(EXTRA_GNATMAKE_OBJS)
334 # Make arch match the current multilib so that the RTS selection code
335 # picks up the right files. For a given target this must be coherent
336 # with MULTILIB_DIRNAMES defined in gcc/config/target/t-*.
338 ifeq ($(strip $(filter-out %x86_64, $(target_cpu))),)
339 ifeq ($(strip $(MULTISUBDIR)),/32)
340 target_cpu:=i686
341 else
342 ifeq ($(strip $(MULTISUBDIR)),/x32)
343 target_cpu:=x32
344 endif
345 endif
346 endif
348 # ???: handle more multilib targets
350 # LIBGNAT_TARGET_PAIRS is a list of pairs of filenames.
351 # The members of each pair must be separated by a '<' and no whitespace.
352 # Each pair must be separated by some amount of whitespace from the following
353 # pair.
355 # Non-tasking case:
357 LIBGNAT_TARGET_PAIRS = \
358 a-intnam.ads<libgnarl/a-intnam__dummy.ads \
359 s-inmaop.adb<libgnarl/s-inmaop__dummy.adb \
360 s-intman.adb<libgnarl/s-intman__dummy.adb \
361 s-osinte.ads<libgnarl/s-osinte__dummy.ads \
362 s-osprim.adb<libgnat/s-osprim__posix.adb \
363 s-taprop.adb<libgnarl/s-taprop__dummy.adb \
364 s-taspri.ads<libgnarl/s-taspri__dummy.ads
366 # When using the GCC exception handling mechanism, we need to use an
367 # alternate body for a-exexpr.adb (a-exexpr-gcc.adb)
369 EH_MECHANISM=
371 # Default shared object option. Note that we rely on the fact that the "soname"
372 # option will always be present and last in this flag, so that we can have
373 # $(SO_OPTS)libgnat-x.xx
375 SO_OPTS = -Wl,-soname,
377 # Default gnatlib-shared target.
378 # By default, equivalent to gnatlib.
379 # Set to gnatlib-shared-default, gnatlib-shared-dual, or a platform specific
380 # target when supported.
381 GNATLIB_SHARED = gnatlib
383 # By default, build socket support units. On platforms that do not support
384 # sockets, reset this variable to empty and add DUMMY_SOCKETS_TARGET_PAIRS
385 # to LIBGNAT_TARGET_PAIRS.
387 GNATRTL_SOCKETS_OBJS = g-soccon$(objext) g-socket$(objext) g-socthi$(objext) \
388 g-soliop$(objext) g-sothco$(objext)
390 DUMMY_SOCKETS_TARGET_PAIRS = \
391 g-socket.adb<libgnat/g-socket__dummy.adb \
392 g-socket.ads<libgnat/g-socket__dummy.ads \
393 g-socthi.adb<libgnat/g-socthi__dummy.adb \
394 g-socthi.ads<libgnat/g-socthi__dummy.ads \
395 g-sothco.adb<libgnat/g-sothco__dummy.adb \
396 g-sothco.ads<libgnat/g-sothco__dummy.ads
398 # On platforms where atomic increment/decrement operations are supported,
399 # special version of Ada.Strings.Unbounded package can be used.
401 ATOMICS_TARGET_PAIRS = \
402 a-coinho.adb<libgnat/a-coinho__shared.adb \
403 a-coinho.ads<libgnat/a-coinho__shared.ads \
404 a-stunau.adb<libgnat/a-stunau__shared.adb \
405 a-suteio.adb<libgnat/a-suteio__shared.adb \
406 a-strunb.ads<libgnat/a-strunb__shared.ads \
407 a-strunb.adb<libgnat/a-strunb__shared.adb \
408 a-stwiun.adb<libgnat/a-stwiun__shared.adb \
409 a-stwiun.ads<libgnat/a-stwiun__shared.ads \
410 a-swunau.adb<libgnat/a-swunau__shared.adb \
411 a-swuwti.adb<libgnat/a-swuwti__shared.adb \
412 a-stzunb.adb<libgnat/a-stzunb__shared.adb \
413 a-stzunb.ads<libgnat/a-stzunb__shared.ads \
414 a-szunau.adb<libgnat/a-szunau__shared.adb \
415 a-szuzti.adb<libgnat/a-szuzti__shared.adb
417 ATOMICS_BUILTINS_TARGET_PAIRS = \
418 s-atocou.adb<libgnat/s-atocou__builtin.adb
420 # Special version of units for x86 and x86-64 platforms.
422 X86_TARGET_PAIRS = \
423 a-numaux.ads<libgnat/a-numaux__x86.ads \
424 a-numaux.adb<libgnat/a-numaux__x86.adb \
425 s-atocou.adb<libgnat/s-atocou__x86.adb
427 X86_64_TARGET_PAIRS = \
428 a-numaux.ads<libgnat/a-numaux__x86.ads \
429 a-numaux.adb<libgnat/a-numaux__x86.adb \
430 s-atocou.adb<libgnat/s-atocou__builtin.adb
432 # Implementation of symbolic traceback based on dwarf
433 TRASYM_DWARF_UNIX_PAIRS = \
434 s-trasym.adb<libgnat/s-trasym__dwarf.adb \
435 s-mmosin.ads<libgnat/s-mmosin__unix.ads \
436 s-mmosin.adb<libgnat/s-mmosin__unix.adb \
437 s-mmauni.ads<libgnat/s-mmauni__long.ads
439 TRASYM_DWARF_MINGW_PAIRS = \
440 s-trasym.adb<libgnat/s-trasym__dwarf.adb \
441 s-mmosin.ads<libgnat/s-mmosin__mingw.ads \
442 s-mmosin.adb<libgnat/s-mmosin__mingw.adb
444 TRASYM_DWARF_COMMON_OBJS = s-objrea$(objext) s-dwalin$(objext) s-mmap$(objext) \
445 s-mmosin$(objext)
447 TRASYM_DWARF_UNIX_OBJS = $(TRASYM_DWARF_COMMON_OBJS) s-mmauni$(objext)
449 TRASYM_DWARF_MINGW_OBJS = $(TRASYM_DWARF_COMMON_OBJS)
451 # Shared library version
452 LIB_VERSION = $(strip $(shell grep ' Library_Version :' $(fsrcpfx)ada/gnatvsn.ads | sed -e 's/.*"\(.*\)".*/\1/'))
454 # Additionnal object files from C source to be added to libgnat.
455 EXTRA_LIBGNAT_OBJS=
457 # Additionnal C source files to be added to libgnat without corresponding
458 # object file (#included files). This should include at least the GNAT
459 # specific header files required to rebuild the runtime library from sources.
460 EXTRA_LIBGNAT_SRCS=
462 # Additionnal object files from Ada sources to be added in libgnat
463 EXTRA_GNATRTL_NONTASKING_OBJS=
465 # Additionnal object files from Ada sources to be added in libgnarl
466 EXTRA_GNATRTL_TASKING_OBJS=
468 # Subsets of extra libgnat sources that always go together
469 VX_SIGTRAMP_EXTRA_SRCS=sigtramp.h sigtramp-vxworks-target.inc
471 # Additional object files that should go in the same directory as libgnat,
472 # aside the library itself. Typically useful for crtbegin/crtend kind of files.
473 EXTRA_ADALIB_OBJS=
475 VX_CRTBE_EXTRA_ADALIB_OBJS=vx_crtbegin.o vx_crtbegin_auto.o vx_crtend.o
477 # GCC spec files to be installed in $(libsubdir), so --specs=<spec-filename>
478 # finds them at runtime.
479 GCC_SPEC_FILES=
481 # $(filter-out PATTERN...,TEXT) removes all PATTERN words from TEXT.
482 # $(strip STRING) removes leading and trailing spaces from STRING.
483 # If what's left is null then it's a match.
485 # PowerPC and e500v2 VxWorks
486 ifeq ($(strip $(filter-out powerpc% wrs vxworks vxworksspe vxworks7 vxworks7spe,$(target_cpu) $(target_vendor) $(target_os))),)
488 ifeq ($(strip $(filter-out e500%, $(target_alias))),)
489 ARCH_STR=e500
490 # gcc config translates the target e500v2-wrs-vxworks to
491 # powerpc-wrs-vxworksspe. Let's keep the original alias here when
492 # generating s-oscons.ads.
493 target=$(target_alias)
494 else
495 ifeq ($(strip $(filter-out powerpc64, $(target_cpu))),)
496 ARCH_STR=ppc64
497 else
498 ARCH_STR=ppc
499 endif
500 endif
502 ifeq ($(strip $(filter-out vxworks7%, $(target_os))),)
503 SVX=system-vxworks7
504 else
505 SVX=system-vxworks
506 endif
508 LIBGNAT_TARGET_PAIRS = \
509 a-intnam.ads<libgnarl/a-intnam__vxworks.ads \
510 a-numaux.ads<libgnat/a-numaux__vxworks.ads \
511 s-inmaop.adb<libgnarl/s-inmaop__vxworks.adb \
512 s-intman.ads<libgnarl/s-intman__vxworks.ads \
513 s-intman.adb<libgnarl/s-intman__vxworks.adb \
514 s-osinte.ads<libgnarl/s-osinte__vxworks.ads \
515 s-osinte.adb<libgnarl/s-osinte__vxworks.adb \
516 s-osprim.adb<libgnat/s-osprim__vxworks.adb \
517 s-parame.ads<libgnat/s-parame__vxworks.ads \
518 s-parame.adb<libgnat/s-parame__vxworks.adb \
519 s-taprop.adb<libgnarl/s-taprop__vxworks.adb \
520 s-tasinf.ads<libgnarl/s-tasinf__vxworks.ads \
521 s-taspri.ads<libgnarl/s-taspri__vxworks.ads \
522 s-vxwork.ads<libgnarl/s-vxwork__ppc.ads \
523 g-socthi.ads<libgnat/g-socthi__vxworks.ads \
524 g-socthi.adb<libgnat/g-socthi__vxworks.adb \
525 g-stsifd.adb<libgnat/g-stsifd__sockets.adb \
526 $(ATOMICS_TARGET_PAIRS) \
527 $(ATOMICS_BUILTINS_TARGET_PAIRS)
529 # VxWorks 5 and 6 both use the same target triplet making them
530 # indistinguishable in the context of this make file. Package
531 # System.Stack_Checking.Operations is not needed on VxWorks 6 as it leads to
532 # an undefined symbol when building a dynamic shared library. To alleviate
533 # this problem and distinguish this case, we use the THREAD_KIND and include
534 # the package only in default mode.
536 ifeq ($(strip $(filter-out default,$(THREAD_KIND))),)
537 LIBGNAT_TARGET_PAIRS += \
538 s-stchop.ads<libgnat/s-stchop__limit.ads \
539 s-stchop.adb<libgnat/s-stchop__vxworks.adb
540 EXTRA_GNATRTL_NONTASKING_OBJS+=s-stchop.o
541 endif
543 TOOLS_TARGET_PAIRS=indepsw.adb<indepsw-gnu.adb
545 ifeq ($(strip $(filter-out rtp,$(THREAD_KIND))),)
546 LIBGNAT_TARGET_PAIRS += \
547 s-vxwext.ads<libgnarl/s-vxwext__rtp.ads \
548 s-vxwext.adb<libgnarl/s-vxwext__rtp.adb \
549 s-tpopsp.adb<libgnarl/s-tpopsp__vxworks-rtp.adb \
550 system.ads<libgnat/system-vxworks-$(ARCH_STR)-rtp.ads
552 EH_MECHANISM=-gcc
553 else
554 ifeq ($(strip $(filter-out rtp-smp,$(THREAD_KIND))),)
555 LIBGNAT_TARGET_PAIRS += \
556 s-mudido.adb<libgnarl/s-mudido__affinity.adb \
557 s-vxwext.ads<libgnarl/s-vxwext__rtp.ads \
558 s-vxwext.adb<libgnarl/s-vxwext__rtp-smp.adb \
559 s-tpopsp.adb<libgnarl/s-tpopsp__vxworks-tls.adb \
560 system.ads<libgnat/$(SVX)-$(ARCH_STR)-rtp-smp.ads
562 EH_MECHANISM=-gcc
563 EXTRA_LIBGNAT_OBJS+=affinity.o
564 else
565 ifeq ($(strip $(filter-out kernel-smp,$(THREAD_KIND))),)
566 LIBGNAT_TARGET_PAIRS += \
567 s-interr.adb<libgnarl/s-interr__vxworks.adb \
568 s-mudido.adb<libgnarl/s-mudido__affinity.adb \
569 s-tpopsp.adb<libgnarl/s-tpopsp__vxworks-tls.adb \
570 s-vxwext.ads<libgnarl/s-vxwext__kernel.ads \
571 s-vxwext.adb<libgnarl/s-vxwext__kernel-smp.adb \
572 system.ads<libgnat/system-vxworks-$(ARCH_STR)-kernel.ads
574 EH_MECHANISM=-gcc
575 EXTRA_LIBGNAT_OBJS+=affinity.o
576 else
577 LIBGNAT_TARGET_PAIRS += \
578 s-interr.adb<libgnarl/s-interr__vxworks.adb \
579 s-tpopsp.adb<libgnarl/s-tpopsp__vxworks.adb
581 ifeq ($(strip $(filter-out kernel,$(THREAD_KIND))),)
582 EH_MECHANISM=-gcc
583 LIBGNAT_TARGET_PAIRS += \
584 s-vxwext.ads<libgnarl/s-vxwext__kernel.ads \
585 s-vxwext.adb<libgnarl/s-vxwext__kernel.adb \
586 system.ads<libgnat/system-vxworks-$(ARCH_STR)-kernel.ads
587 else
588 LIBGNAT_TARGET_PAIRS += \
589 system.ads<libgnat/system-vxworks-ppc.ads
590 endif
591 endif
592 EXTRA_GNATRTL_NONTASKING_OBJS+=i-vxinco.o i-vxwork.o i-vxwoio.o
593 endif
594 endif
596 EXTRA_GNATRTL_TASKING_OBJS += s-vxwork.o s-vxwext.o
598 EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
600 EXTRA_ADALIB_OBJS+=$(VX_CRTBE_EXTRA_ADALIB_OBJS)
601 EXTRA_LIBGNAT_SRCS+=vx_crtbegin.inc
602 GCC_SPEC_FILES+=vxworks-gnat-crtbe-link.spec
604 ifeq ($(strip $(filter-out vxworks7%, $(target_os))),)
605 ifeq ($(strip $(filter-out powerpc64, $(target_cpu))),)
606 GCC_SPEC_FILES+=vxworks7-ppc64-rtp-base-link.spec
607 else
608 GCC_SPEC_FILES+=vxworks7-rtp-base-link.spec
609 endif
610 else
611 GCC_SPEC_FILES+=vxworks-$(ARCH_STR)-link.spec
612 GCC_SPEC_FILES+=vxworks-cert-$(ARCH_STR)-link.spec
613 GCC_SPEC_FILES+=vxworks-smp-$(ARCH_STR)-link.spec
614 endif
615 endif
617 # x86/x86_64 VxWorks
618 ifeq ($(strip $(filter-out %86 x86_64 wrs vxworks vxworks7,$(target_cpu) $(target_vendor) $(target_os))),)
620 EH_MECHANISM=-gcc
622 ifeq ($(strip $(filter-out vxworks7%, $(target_os))),)
623 SVX=system-vxworks7
624 else
625 SVX=system-vxworks
626 endif
628 ifeq ($(strip $(filter-out x86_64, $(target_cpu))),)
629 X86CPU=x86_64
630 LIBGNAT_TARGET_PAIRS=$(X86_64_TARGET_PAIRS)
631 else
632 X86CPU=x86
633 LIBGNAT_TARGET_PAIRS=$(X86_TARGET_PAIRS)
634 endif
636 LIBGNAT_TARGET_PAIRS+= \
637 a-intnam.ads<libgnarl/a-intnam__vxworks.ads \
638 i-vxwork.ads<libgnat/i-vxwork__x86.ads \
639 s-osinte.adb<libgnarl/s-osinte__vxworks.adb \
640 s-osinte.ads<libgnarl/s-osinte__vxworks.ads \
641 s-inmaop.adb<libgnarl/s-inmaop__vxworks.adb \
642 s-intman.ads<libgnarl/s-intman__vxworks.ads \
643 s-intman.adb<libgnarl/s-intman__vxworks.adb \
644 s-osprim.adb<libgnat/s-osprim__vxworks.adb \
645 s-parame.ads<libgnat/s-parame__vxworks.ads \
646 s-parame.adb<libgnat/s-parame__vxworks.adb \
647 s-stchop.ads<libgnat/s-stchop__limit.ads \
648 s-stchop.adb<libgnat/s-stchop__vxworks.adb \
649 s-taprop.adb<libgnarl/s-taprop__vxworks.adb \
650 s-tasinf.ads<libgnarl/s-tasinf__vxworks.ads \
651 s-taspri.ads<libgnarl/s-taspri__vxworks.ads \
652 s-vxwork.ads<libgnarl/s-vxwork__x86.ads \
653 g-socthi.ads<libgnat/g-socthi__vxworks.ads \
654 g-socthi.adb<libgnat/g-socthi__vxworks.adb \
655 g-stsifd.adb<libgnat/g-stsifd__sockets.adb \
656 $(ATOMICS_TARGET_PAIRS)
658 TOOLS_TARGET_PAIRS=indepsw.adb<indepsw-gnu.adb
660 # The CPU setting for VxSim varies with the
661 # host (Windows or Linux)
662 # target (VxWorks6 or VxWorks7)
663 # runtime (rtp or kernel)
664 # -------------------------------------------------------------
665 # vx6 vx7
666 # Windows (host_os = mingw32)
667 # kernel SIMNT SIMNT
668 # rtp SIMPENTIUM SIMNT
669 # Linux (host_os = linux-gnu)
670 # kernel SIMLINUX SIMLINUX
671 # rtp SIMPENTIUM SIMLINUX
672 # -------------------------------------------------------------
673 # It is overridden by VXSIM_CPU only in files init-vxsim.c and
674 # sigtramp-vxworks-vxsim.c which contain functions determined at
675 # runtime to be called if a program is running on VxSim vs real hardware
676 # (due to differences in signal context for unwinding).
678 ifneq ($(strip $(filter-out vxworks7, $(target_os))),)
679 ifeq ($(strip $(filter-out vxworks rtp rtp-smp,$(target_os) $(THREAD_KIND))),)
680 VXSIM_CPU = SIMPENTIUM
681 else
682 ifeq ($(strip $(filter-out kernel kernel-smp rtp rtp-smp,$(THREAD_KIND))),)
683 ifeq ($(strip $(filter-out linux%,$(host_os))),)
684 # Linux
685 VXSIM_CPU = SIMLINUX
686 else
687 # Windows
688 VXSIM_CPU = SIMNT
689 endif
690 endif
691 endif
693 GNATLIBCFLAGS_FOR_C := $(GNATLIBCFLAGS_FOR_C) -D__VXSIM_CPU__=$(VXSIM_CPU)
694 endif
696 ifeq ($(strip $(filter-out rtp,$(THREAD_KIND))),)
697 # Runtime N/A for VxWorks7 (non-existent system file)
698 LIBGNAT_TARGET_PAIRS += \
699 s-vxwext.ads<libgnarl/s-vxwext__rtp.ads \
700 s-vxwext.adb<libgnarl/s-vxwext__rtp.adb \
701 s-tpopsp.adb<libgnarl/s-tpopsp__vxworks-rtp.adb \
702 system.ads<libgnat/system-vxworks-x86-rtp.ads
703 else
704 ifeq ($(strip $(filter-out rtp-smp, $(THREAD_KIND))),)
705 LIBGNAT_TARGET_PAIRS += \
706 s-mudido.adb<libgnarl/s-mudido__affinity.adb \
707 s-vxwext.ads<libgnarl/s-vxwext__rtp.ads \
708 s-vxwext.adb<libgnarl/s-vxwext__rtp-smp.adb \
709 s-tpopsp.adb<libgnarl/s-tpopsp__vxworks-tls.adb \
710 system.ads<libgnat/$(SVX)-$(X86CPU)-rtp-smp.ads
712 EXTRA_LIBGNAT_OBJS+=affinity.o
713 else
714 ifeq ($(strip $(filter-out kernel-smp, $(THREAD_KIND))),)
715 LIBGNAT_TARGET_PAIRS += \
716 s-interr.adb<libgnarl/s-interr__vxworks.adb \
717 s-mudido.adb<libgnarl/s-mudido__affinity.adb \
718 s-tpopsp.adb<libgnarl/s-tpopsp__vxworks-tls.adb \
719 s-vxwext.ads<libgnarl/s-vxwext__kernel.ads \
720 s-vxwext.adb<libgnarl/s-vxwext__kernel-smp.adb \
721 system.ads<libgnat/$(SVX)-$(X86CPU)-kernel.ads
723 EXTRA_LIBGNAT_OBJS+=affinity.o
724 else
725 LIBGNAT_TARGET_PAIRS += \
726 s-interr.adb<libgnarl/s-interr__vxworks.adb \
727 s-tpopsp.adb<libgnarl/s-tpopsp__vxworks.adb
729 ifeq ($(strip $(filter-out kernel,$(THREAD_KIND))),)
730 # Runtime N/A for VxWorks7 (non-existent system file)
731 LIBGNAT_TARGET_PAIRS += \
732 s-vxwext.ads<libgnarl/s-vxwext__kernel.ads \
733 s-vxwext.adb<libgnarl/s-vxwext__kernel.adb \
734 system.ads<libgnat/$(SVX)-x86-kernel.ads
735 else
736 LIBGNAT_TARGET_PAIRS += \
737 system.ads<libgnat/system-vxworks-x86.ads
738 endif
739 endif
741 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
742 endif
743 endif
745 EXTRA_GNATRTL_NONTASKING_OBJS += s-stchop.o
746 EXTRA_GNATRTL_TASKING_OBJS += i-vxinco.o s-vxwork.o s-vxwext.o
748 EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
750 EXTRA_LIBGNAT_OBJS+=sigtramp-vxworks.o
751 EXTRA_LIBGNAT_SRCS+=$(VX_SIGTRAMP_EXTRA_SRCS)
753 EXTRA_ADALIB_OBJS+=$(VX_CRTBE_EXTRA_ADALIB_OBJS)
754 EXTRA_LIBGNAT_SRCS+=vx_crtbegin.inc
755 GCC_SPEC_FILES+=vxworks-gnat-crtbe-link.spec
757 ifeq ($(strip $(filter-out vxworks7%, $(target_os))),)
758 GCC_SPEC_FILES+=vxworks7-$(X86CPU)-rtp-base-link.spec
759 else
760 GCC_SPEC_FILES+=vxworks-x86-link.spec
761 GCC_SPEC_FILES+=vxworks-cert-x86-link.spec
762 GCC_SPEC_FILES+=vxworks-smp-x86-link.spec
763 endif
764 endif
766 # ARM VxWorks
767 ifeq ($(strip $(filter-out arm% coff wrs vx%,$(target_cpu) $(target_vendor) $(target_os))),)
769 ifeq ($(strip $(filter-out vxworks7%, $(target_os))),)
770 SVX=system-vxworks7
771 EH_MECHANISM=-arm
772 SIGTRAMP_OBJ=sigtramp-armvxworks.o
773 else
774 SVX=system-vxworks
775 EH_MECHANISM=-gcc
776 SIGTRAMP_OBJ=sigtramp-vxworks.o
777 endif
779 LIBGNAT_TARGET_PAIRS = \
780 a-intnam.ads<libgnarl/a-intnam__vxworks.ads \
781 a-numaux.ads<libgnat/a-numaux__vxworks.ads \
782 s-inmaop.adb<libgnarl/s-inmaop__vxworks.adb \
783 s-interr.adb<libgnarl/s-interr__vxworks.adb \
784 s-intman.ads<libgnarl/s-intman__vxworks.ads \
785 s-intman.adb<libgnarl/s-intman__vxworks.adb \
786 s-osinte.adb<libgnarl/s-osinte__vxworks.adb \
787 s-osinte.ads<libgnarl/s-osinte__vxworks.ads \
788 s-osprim.adb<libgnat/s-osprim__vxworks.adb \
789 s-parame.ads<libgnat/s-parame__vxworks.ads \
790 s-parame.adb<libgnat/s-parame__vxworks.adb \
791 s-stchop.ads<libgnat/s-stchop__limit.ads \
792 s-stchop.adb<libgnat/s-stchop__vxworks.adb \
793 s-taprop.adb<libgnarl/s-taprop__vxworks.adb \
794 s-tasinf.ads<libgnarl/s-tasinf__vxworks.ads \
795 s-taspri.ads<libgnarl/s-taspri__vxworks.ads \
796 s-vxwork.ads<libgnarl/s-vxwork__arm.ads \
797 g-socthi.ads<libgnat/g-socthi__vxworks.ads \
798 g-socthi.adb<libgnat/g-socthi__vxworks.adb \
799 g-stsifd.adb<libgnat/g-stsifd__sockets.adb
801 TOOLS_TARGET_PAIRS=indepsw.adb<indepsw-gnu.adb
803 ifeq ($(strip $(filter-out rtp-smp,$(THREAD_KIND))),)
804 LIBGNAT_TARGET_PAIRS += \
805 s-mudido.adb<libgnarl/s-mudido__affinity.adb \
806 s-vxwext.ads<libgnarl/s-vxwext__rtp.ads \
807 s-vxwext.adb<libgnarl/s-vxwext__rtp-smp.adb \
808 s-tpopsp.adb<libgnarl/s-tpopsp__vxworks-tls.adb \
809 system.ads<libgnat/$(SVX)-arm-rtp-smp.ads
811 EXTRA_LIBGNAT_OBJS+=affinity.o
813 EXTRA_LIBGNAT_OBJS+=$(SIGTRAMP_OBJ)
814 EXTRA_LIBGNAT_SRCS+=$(VX_SIGTRAMP_EXTRA_SRCS)
815 else
816 ifeq ($(strip $(filter-out kernel-smp,$(THREAD_KIND))),)
817 LIBGNAT_TARGET_PAIRS += \
818 s-mudido.adb<libgnarl/s-mudido__affinity.adb \
819 s-tpopsp.adb<libgnarl/s-tpopsp__vxworks-tls.adb \
820 s-vxwext.ads<libgnarl/s-vxwext__kernel.ads \
821 s-vxwext.adb<libgnarl/s-vxwext__kernel-smp.adb \
822 system.ads<libgnat/$(SVX)-arm.ads
824 EXTRA_LIBGNAT_OBJS+=affinity.o
826 EXTRA_LIBGNAT_OBJS+=$(SIGTRAMP_OBJ)
827 EXTRA_LIBGNAT_SRCS+=$(VX_SIGTRAMP_EXTRA_SRCS)
828 else
829 LIBGNAT_TARGET_PAIRS += \
830 s-tpopsp.adb<libgnarl/s-tpopsp__vxworks.adb \
831 system.ads<libgnat/$(SVX)-arm.ads
833 ifeq ($(strip $(filter-out kernel,$(THREAD_KIND))),)
834 LIBGNAT_TARGET_PAIRS += \
835 s-vxwext.ads<libgnarl/s-vxwext__kernel.ads \
836 s-vxwext.adb<libgnarl/s-vxwext__kernel.adb
838 EXTRA_LIBGNAT_OBJS+=$(SIGTRAMP_OBJ)
839 EXTRA_LIBGNAT_SRCS+=$(VX_SIGTRAMP_EXTRA_SRCS)
840 endif
841 endif
842 endif
844 EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o \
845 s-stchop.o
846 EXTRA_GNATRTL_TASKING_OBJS=i-vxinco.o s-vxwork.o s-vxwext.o
848 EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
850 ifeq ($(strip $(filter-out vxworks7%, $(target_os))),)
851 GCC_SPEC_FILES+=vxworks7-rtp-base-link.spec
852 else
853 EXTRA_ADALIB_OBJS+=$(VX_CRTBE_EXTRA_ADALIB_OBJS)
854 EXTRA_LIBGNAT_SRCS+=vx_crtbegin.inc
855 GCC_SPEC_FILES+=vxworks-gnat-crtbe-link.spec
857 GCC_SPEC_FILES+=vxworks-arm-link.spec
858 GCC_SPEC_FILES+=vxworks-smp-arm-link.spec
859 endif
860 endif
862 # ARM android
863 ifeq ($(strip $(filter-out arm% linux-androideabi,$(target_cpu) $(target_os))),)
864 LIBGNAT_TARGET_PAIRS = \
865 a-intnam.ads<libgnarl/a-intnam__linux.ads \
866 s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
867 s-intman.adb<libgnarl/s-intman__android.adb \
868 s-linux.ads<libgnarl/s-linux__android.ads \
869 s-osinte.adb<libgnarl/s-osinte__android.adb \
870 s-osinte.ads<libgnarl/s-osinte__android.ads \
871 s-osprim.adb<libgnat/s-osprim__posix.adb \
872 s-taprop.adb<libgnarl/s-taprop__posix.adb \
873 s-taspri.ads<libgnarl/s-taspri__posix.ads \
874 s-tpopsp.adb<libgnarl/s-tpopsp__posix-foreign.adb \
875 $(ATOMICS_TARGET_PAIRS) \
876 $(ATOMICS_BUILTINS_TARGET_PAIRS) \
877 system.ads<libgnat/system-linux-arm.ads
879 TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
881 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
882 EXTRA_LIBGNAT_OBJS+=sigtramp-armdroid.o
883 EXTRA_LIBGNAT_SRCS+=sigtramp.h
884 EH_MECHANISM=-arm
885 THREADSLIB =
886 GNATLIB_SHARED = gnatlib-shared-dual
887 LIBRARY_VERSION := $(LIB_VERSION)
888 endif
890 # AARCH64 QNX
891 ifeq ($(strip $(filter-out aarch64 %qnx,$(target_cpu) $(target_os))),)
892 LIBGNAT_TARGET_PAIRS = \
893 a-intnam.ads<libgnarl/a-intnam__qnx.ads \
894 s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
895 s-intman.adb<libgnarl/s-intman__qnx.adb \
896 s-osinte.adb<libgnarl/s-osinte__qnx.adb \
897 s-osinte.ads<libgnarl/s-osinte__qnx.ads \
898 s-osprim.adb<libgnat/s-osprim__posix.adb \
899 s-qnx.ads<libgnarl/s-qnx.ads \
900 s-taprop.adb<libgnarl/s-taprop__qnx.adb \
901 s-taspri.ads<libgnarl/s-taspri__posix.ads \
902 s-tpopsp.adb<libgnarl/s-tpopsp__posix-foreign.adb \
903 $(ATOMICS_TARGET_PAIRS) \
904 $(ATOMICS_BUILTINS_TARGET_PAIRS) \
905 system.ads<libgnat/system-qnx-aarch64.ads
907 TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
909 EXTRA_GNATRTL_TASKING_OBJS=s-qnx.o
910 EXTRA_LIBGNAT_OBJS+=sigtramp-qnx.o
911 EXTRA_LIBGNAT_SRCS+=sigtramp.h
912 EH_MECHANISM=-gcc
914 SO_OPTS= -shared-libgcc -Wl,-soname,
915 MISCLIB= - lsocket
916 THREADSLIB =
917 GNATLIB_SHARED = gnatlib-shared-dual
918 LIBRARY_VERSION := $(LIB_VERSION)
919 endif
921 # Sparc Solaris
922 ifeq ($(strip $(filter-out sparc% sun solaris%,$(target_cpu) $(target_vendor) $(target_os))),)
923 LIBGNAT_TARGET_PAIRS = \
924 a-intnam.ads<libgnarl/a-intnam__solaris.ads \
925 s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
926 s-intman.adb<libgnarl/s-intman__solaris.adb \
927 s-mudido.adb<libgnarl/s-mudido__affinity.adb \
928 s-osinte.adb<libgnarl/s-osinte__solaris.adb \
929 s-osinte.ads<libgnarl/s-osinte__solaris.ads \
930 s-osprim.adb<libgnat/s-osprim__solaris.adb \
931 s-taprop.adb<libgnarl/s-taprop__solaris.adb \
932 s-tasinf.adb<libgnarl/s-tasinf__solaris.adb \
933 s-tasinf.ads<libgnarl/s-tasinf__solaris.ads \
934 s-taspri.ads<libgnarl/s-taspri__solaris.ads \
935 s-tpopsp.adb<libgnarl/s-tpopsp__solaris.adb \
936 g-soliop.ads<libgnat/g-soliop__solaris.ads \
937 $(ATOMICS_TARGET_PAIRS) \
938 $(ATOMICS_BUILTINS_TARGET_PAIRS) \
939 system.ads<libgnat/system-solaris-sparc.ads
941 EH_MECHANISM=-gcc
942 THREADSLIB = -lposix4 -lthread
943 MISCLIB = -lposix4 -lnsl -lsocket
944 SO_OPTS = -Wl,-h,
945 GNATLIB_SHARED = gnatlib-shared-dual
946 GMEM_LIB = gmemlib
947 LIBRARY_VERSION := $(LIB_VERSION)
948 endif
950 # x86 and x86-64 solaris
951 ifeq ($(strip $(filter-out %86 %x86_64 solaris2%,$(target_cpu) $(target_os))),)
952 LIBGNAT_TARGET_PAIRS_COMMON = \
953 a-intnam.ads<libgnarl/a-intnam__solaris.ads \
954 s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
955 s-intman.adb<libgnarl/s-intman__solaris.adb \
956 s-mudido.adb<libgnarl/s-mudido__affinity.adb \
957 s-osinte.adb<libgnarl/s-osinte__solaris.adb \
958 s-osinte.ads<libgnarl/s-osinte__solaris.ads \
959 s-osprim.adb<libgnat/s-osprim__solaris.adb \
960 s-taprop.adb<libgnarl/s-taprop__solaris.adb \
961 s-tasinf.adb<libgnarl/s-tasinf__solaris.adb \
962 s-tasinf.ads<libgnarl/s-tasinf__solaris.ads \
963 s-taspri.ads<libgnarl/s-taspri__solaris.ads \
964 s-tpopsp.adb<libgnarl/s-tpopsp__solaris.adb \
965 g-soliop.ads<libgnat/g-soliop__solaris.ads \
966 $(ATOMICS_TARGET_PAIRS) \
967 system.ads<libgnat/system-solaris-x86.ads
969 ifeq ($(strip $(filter-out %86 solaris2%,$(target_cpu) $(target_os))),)
970 ifeq ($(strip $(MULTISUBDIR)),/amd64)
971 LIBGNAT_TARGET_PAIRS = \
972 $(LIBGNAT_TARGET_PAIRS_COMMON) $(X86_64_TARGET_PAIRS)
973 else
974 LIBGNAT_TARGET_PAIRS = \
975 $(LIBGNAT_TARGET_PAIRS_COMMON) $(X86_TARGET_PAIRS)
976 endif
977 else
978 ifeq ($(strip $(MULTISUBDIR)),/32)
979 LIBGNAT_TARGET_PAIRS = \
980 $(LIBGNAT_TARGET_PAIRS_COMMON) $(X86_TARGET_PAIRS)
981 else
982 LIBGNAT_TARGET_PAIRS = \
983 $(LIBGNAT_TARGET_PAIRS_COMMON) $(X86_64_TARGET_PAIRS)
984 endif
985 endif
987 EXTRA_GNATRTL_NONTASKING_OBJS += g-sse.o g-ssvety.o
989 EH_MECHANISM=-gcc
990 THREADSLIB = -lposix4 -lthread
991 MISCLIB = -lposix4 -lnsl -lsocket
992 SO_OPTS = -Wl,-h,
993 GNATLIB_SHARED = gnatlib-shared-dual
994 GMEM_LIB = gmemlib
995 LIBRARY_VERSION := $(LIB_VERSION)
996 endif
998 # x86 Linux
999 ifeq ($(strip $(filter-out %86 linux%,$(target_cpu) $(target_os))),)
1000 LIBGNAT_TARGET_PAIRS = \
1001 a-intnam.ads<libgnarl/a-intnam__linux.ads \
1002 a-synbar.adb<libgnarl/a-synbar__posix.adb \
1003 a-synbar.ads<libgnarl/a-synbar__posix.ads \
1004 s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
1005 s-intman.adb<libgnarl/s-intman__posix.adb \
1006 s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
1007 $(TRASYM_DWARF_UNIX_PAIRS) \
1008 g-sercom.adb<libgnat/g-sercom__linux.adb \
1009 s-tsmona.adb<libgnat/s-tsmona__linux.adb \
1010 a-exetim.adb<libgnarl/a-exetim__posix.adb \
1011 a-exetim.ads<libgnarl/a-exetim__default.ads \
1012 s-linux.ads<libgnarl/s-linux.ads \
1013 s-osinte.adb<libgnarl/s-osinte__posix.adb \
1014 $(ATOMICS_TARGET_PAIRS) \
1015 system.ads<libgnat/system-linux-x86.ads
1017 ifeq ($(strip $(MULTISUBDIR)),/64)
1018 LIBGNAT_TARGET_PAIRS += $(X86_64_TARGET_PAIRS)
1019 else
1020 LIBGNAT_TARGET_PAIRS += $(X86_TARGET_PAIRS)
1021 endif
1023 LIBGNAT_TARGET_PAIRS += \
1024 s-mudido.adb<libgnarl/s-mudido__affinity.adb \
1025 s-osinte.ads<libgnarl/s-osinte__linux.ads \
1026 s-osprim.adb<libgnat/s-osprim__posix.adb \
1027 s-taprop.adb<libgnarl/s-taprop__linux.adb \
1028 s-tasinf.ads<libgnarl/s-tasinf__linux.ads \
1029 s-tasinf.adb<libgnarl/s-tasinf__linux.adb \
1030 s-taspri.ads<libgnarl/s-taspri__posix.ads
1032 EH_MECHANISM=-gcc
1033 THREADSLIB = -lpthread -lrt
1034 EXTRA_GNATRTL_NONTASKING_OBJS += g-sse.o g-ssvety.o
1035 EXTRA_GNATRTL_NONTASKING_OBJS += $(TRASYM_DWARF_UNIX_OBJS)
1036 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o a-exetim.o
1038 TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
1040 GNATLIB_SHARED = gnatlib-shared-dual
1041 MISCLIB = -ldl
1042 GMEM_LIB = gmemlib
1043 LIBRARY_VERSION := $(LIB_VERSION)
1044 endif
1046 # x86 kfreebsd
1047 ifeq ($(strip $(filter-out %86 kfreebsd%,$(target_cpu) $(target_os))),)
1048 LIBGNAT_TARGET_PAIRS = \
1049 a-intnam.ads<libgnarl/a-intnam__freebsd.ads \
1050 s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
1051 s-intman.adb<libgnarl/s-intman__posix.adb \
1052 s-osinte.adb<libgnarl/s-osinte__posix.adb \
1053 s-osinte.ads<libgnarl/s-osinte__kfreebsd-gnu.ads \
1054 s-osprim.adb<libgnat/s-osprim__posix.adb \
1055 s-taprop.adb<libgnarl/s-taprop__posix.adb \
1056 s-taspri.ads<libgnarl/s-taspri__posix.ads \
1057 s-tpopsp.adb<libgnarl/s-tpopsp__posix-foreign.adb \
1058 $(ATOMICS_TARGET_PAIRS) \
1059 $(X86_TARGET_PAIRS) \
1060 system.ads<libgnat/system-freebsd.ads
1062 TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
1064 EXTRA_GNATRTL_NONTASKING_OBJS += g-sse.o g-ssvety.o
1066 EH_MECHANISM=-gcc
1067 THREADSLIB = -lpthread
1068 GNATLIB_SHARED = gnatlib-shared-dual
1069 GMEM_LIB = gmemlib
1070 LIBRARY_VERSION := $(LIB_VERSION)
1071 MISCLIB = -lutil
1072 endif
1074 # i[3456]86-pc-gnu i.e. GNU Hurd
1075 ifeq ($(strip $(filter-out %86 pc gnu,$(target_cpu) $(target_vendor) $(target_os))),)
1076 LIBGNAT_TARGET_PAIRS = \
1077 a-intnam.ads<libgnarl/a-intnam__freebsd.ads \
1078 s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
1079 s-intman.adb<libgnarl/s-intman__posix.adb \
1080 s-osinte.adb<libgnarl/s-osinte__gnu.adb \
1081 s-osinte.ads<libgnarl/s-osinte__gnu.ads \
1082 s-osprim.adb<libgnat/s-osprim__posix.adb \
1083 s-taprop.adb<libgnarl/s-taprop__posix.adb \
1084 s-taspri.ads<libgnarl/s-taspri__posix.ads \
1085 s-tpopsp.adb<libgnarl/s-tpopsp__posix-foreign.adb \
1086 $(ATOMICS_TARGET_PAIRS) \
1087 $(X86_TARGET_PAIRS) \
1088 system.ads<libgnat/system-freebsd.ads
1090 TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
1092 EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
1094 EH_MECHANISM=-gcc
1095 THREADSLIB = -lpthread
1096 GNATLIB_SHARED = gnatlib-shared-dual
1097 GMEM_LIB = gmemlib
1098 LIBRARY_VERSION := $(LIB_VERSION)
1099 endif
1101 ifeq ($(strip $(filter-out x86_64 kfreebsd%,$(target_cpu) $(target_os))),)
1102 LIBGNAT_TARGET_PAIRS = \
1103 a-intnam.ads<libgnarl/a-intnam__freebsd.ads \
1104 a-numaux.adb<libgnat/a-numaux__x86.adb \
1105 a-numaux.ads<libgnat/a-numaux__x86.ads \
1106 s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
1107 s-intman.adb<libgnarl/s-intman__posix.adb \
1108 s-osinte.adb<libgnarl/s-osinte__posix.adb \
1109 s-osinte.ads<libgnarl/s-osinte__kfreebsd-gnu.ads \
1110 s-osprim.adb<libgnat/s-osprim__posix.adb \
1111 s-taprop.adb<libgnarl/s-taprop__posix.adb \
1112 s-taspri.ads<libgnarl/s-taspri__posix.ads \
1113 s-tpopsp.adb<libgnarl/s-tpopsp__posix-foreign.adb \
1114 system.ads<libgnat/system-freebsd.ads
1116 TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
1118 EH_MECHANISM=-gcc
1119 THREADSLIB = -lpthread
1120 GNATLIB_SHARED = gnatlib-shared-dual
1121 GMEM_LIB = gmemlib
1122 LIBRARY_VERSION := $(LIB_VERSION)
1123 endif
1125 # aarch64 FreeBSD
1126 ifeq ($(strip $(filter-out %aarch64 freebsd%,$(target_cpu) $(target_os))),)
1127 LIBGNAT_TARGET_PAIRS = \
1128 a-intnam.ads<libgnarl/a-intnam__freebsd.ads \
1129 s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
1130 s-intman.adb<libgnarl/s-intman__posix.adb \
1131 s-mudido.adb<libgnarl/s-mudido__affinity.adb \
1132 s-osinte.adb<libgnarl/s-osinte__freebsd.adb \
1133 s-osinte.ads<libgnarl/s-osinte__freebsd.ads \
1134 s-osprim.adb<libgnat/s-osprim__posix.adb \
1135 s-taprop.adb<libgnarl/s-taprop__posix.adb \
1136 s-taspri.ads<libgnarl/s-taspri__posix.ads \
1137 s-tpopsp.adb<libgnarl/s-tpopsp__posix.adb \
1138 $(ATOMICS_TARGET_PAIRS) \
1139 $(ATOMICS_BUILTINS_TARGET_PAIRS) \
1140 system.ads<libgnat/system-freebsd.ads
1142 GNATLIB_SHARED = gnatlib-shared-dual
1144 EH_MECHANISM=-gcc
1145 THREADSLIB= -lpthread
1146 GMEM_LIB = gmemlib
1147 LIBRARY_VERSION := $(LIB_VERSION)
1148 MISCLIB = -lutil
1149 endif
1151 # x86 FreeBSD
1152 ifeq ($(strip $(filter-out %86 freebsd%,$(target_cpu) $(target_os))),)
1153 LIBGNAT_TARGET_PAIRS = \
1154 a-intnam.ads<libgnarl/a-intnam__freebsd.ads \
1155 s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
1156 s-intman.adb<libgnarl/s-intman__posix.adb \
1157 s-mudido.adb<libgnarl/s-mudido__affinity.adb \
1158 s-osinte.adb<libgnarl/s-osinte__freebsd.adb \
1159 s-osinte.ads<libgnarl/s-osinte__freebsd.ads \
1160 s-osprim.adb<libgnat/s-osprim__posix.adb \
1161 s-taprop.adb<libgnarl/s-taprop__posix.adb \
1162 s-taspri.ads<libgnarl/s-taspri__posix.ads \
1163 s-tpopsp.adb<libgnarl/s-tpopsp__posix.adb \
1164 $(ATOMICS_TARGET_PAIRS) \
1165 $(X86_TARGET_PAIRS) \
1166 system.ads<libgnat/system-freebsd.ads
1168 GNATLIB_SHARED = gnatlib-shared-dual
1170 EXTRA_GNATRTL_NONTASKING_OBJS += g-sse.o g-ssvety.o
1172 EH_MECHANISM=-gcc
1173 THREADSLIB= -lpthread
1174 GMEM_LIB = gmemlib
1175 LIBRARY_VERSION := $(LIB_VERSION)
1176 MISCLIB = -lutil
1177 endif
1179 # x86-64 FreeBSD
1180 ifeq ($(strip $(filter-out %86_64 freebsd%,$(target_cpu) $(target_os))),)
1181 LIBGNAT_TARGET_PAIRS = \
1182 a-intnam.ads<libgnarl/a-intnam__freebsd.ads \
1183 s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
1184 s-intman.adb<libgnarl/s-intman__posix.adb \
1185 s-mudido.adb<libgnarl/s-mudido__affinity.adb \
1186 s-osinte.adb<libgnarl/s-osinte__freebsd.adb \
1187 s-osinte.ads<libgnarl/s-osinte__freebsd.ads \
1188 s-osprim.adb<libgnat/s-osprim__posix.adb \
1189 s-taprop.adb<libgnarl/s-taprop__posix.adb \
1190 s-taspri.ads<libgnarl/s-taspri__posix.ads \
1191 s-tpopsp.adb<libgnarl/s-tpopsp__posix.adb \
1192 $(ATOMICS_TARGET_PAIRS) \
1193 $(X86_64_TARGET_PAIRS) \
1194 system.ads<libgnat/system-freebsd.ads
1196 GNATLIB_SHARED = gnatlib-shared-dual
1198 EXTRA_GNATRTL_NONTASKING_OBJS += g-sse.o g-ssvety.o
1200 EH_MECHANISM=-gcc
1201 THREADSLIB= -lpthread
1202 GMEM_LIB = gmemlib
1203 LIBRARY_VERSION := $(LIB_VERSION)
1204 MISCLIB = -lutil
1205 endif
1207 # x86-64 DragonFly
1208 ifeq ($(strip $(filter-out %86_64 dragonfly%,$(target_cpu) $(target_os))),)
1209 LIBGNAT_TARGET_PAIRS = \
1210 a-intnam.ads<libgnarl/a-intnam__dragonfly.ads \
1211 s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
1212 s-intman.adb<libgnarl/s-intman__posix.adb \
1213 s-mudido.adb<libgnarl/s-mudido__affinity.adb \
1214 s-osinte.adb<libgnarl/s-osinte__dragonfly.adb \
1215 s-osinte.ads<libgnarl/s-osinte__dragonfly.ads \
1216 s-osprim.adb<libgnat/s-osprim__posix.adb \
1217 s-taprop.adb<libgnarl/s-taprop__posix.adb \
1218 s-taspri.ads<libgnarl/s-taspri__posix.ads \
1219 s-tpopsp.adb<libgnarl/s-tpopsp__posix.adb \
1220 $(ATOMICS_TARGET_PAIRS) \
1221 $(X86_64_TARGET_PAIRS) \
1222 system.ads<libgnat/system-dragonfly-x86_64.ads
1224 GNATLIB_SHARED = gnatlib-shared-dual
1226 EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
1228 EH_MECHANISM=-gcc
1229 THREADSLIB= -lpthread
1230 GMEM_LIB = gmemlib
1231 LIBRARY_VERSION := $(LIB_VERSION)
1232 MISCLIB = -lutil
1233 endif
1235 # S390 Linux
1236 ifeq ($(strip $(filter-out s390% linux%,$(target_cpu) $(target_os))),)
1237 LIBGNAT_TARGET_PAIRS = \
1238 a-intnam.ads<libgnarl/a-intnam__linux.ads \
1239 s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
1240 s-intman.adb<libgnarl/s-intman__posix.adb \
1241 s-linux.ads<libgnarl/s-linux.ads \
1242 s-osinte.adb<libgnarl/s-osinte__posix.adb \
1243 s-osinte.ads<libgnarl/s-osinte__linux.ads \
1244 s-osprim.adb<libgnat/s-osprim__posix.adb \
1245 s-taprop.adb<libgnarl/s-taprop__linux.adb \
1246 s-tasinf.ads<libgnarl/s-tasinf__linux.ads \
1247 s-tasinf.adb<libgnarl/s-tasinf__linux.adb \
1248 s-taspri.ads<libgnarl/s-taspri__posix-noaltstack.ads \
1249 s-tpopsp.adb<libgnarl/s-tpopsp__posix-foreign.adb \
1250 system.ads<libgnat/system-linux-s390.ads
1252 TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
1254 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1255 EH_MECHANISM=-gcc
1256 THREADSLIB = -lpthread
1257 GNATLIB_SHARED = gnatlib-shared-dual
1258 LIBRARY_VERSION := $(LIB_VERSION)
1259 endif
1261 # HP/PA HP-UX 10
1262 ifeq ($(strip $(filter-out hppa% hp hpux10%,$(target_cpu) $(target_vendor) $(target_os))),)
1263 LIBGNAT_TARGET_PAIRS = \
1264 a-excpol.adb<libgnat/a-excpol__abort.adb \
1265 a-intnam.ads<libgnarl/a-intnam__hpux.ads \
1266 s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
1267 s-interr.adb<libgnarl/s-interr__sigaction.adb \
1268 s-intman.adb<libgnarl/s-intman__posix.adb \
1269 s-osinte.adb<libgnarl/s-osinte__hpux-dce.adb \
1270 s-osinte.ads<libgnarl/s-osinte__hpux-dce.ads \
1271 s-parame.ads<libgnat/s-parame__hpux.ads \
1272 s-osprim.adb<libgnat/s-osprim__posix.adb \
1273 s-taprop.adb<libgnarl/s-taprop__hpux-dce.adb \
1274 s-taspri.ads<libgnarl/s-taspri__hpux-dce.ads \
1275 s-tpopsp.adb<libgnarl/s-tpopsp__posix.adb \
1276 system.ads<libgnat/system-hpux.ads
1278 EH_MECHANISM=-gcc
1279 endif
1281 # HP/PA HP-UX 11
1282 ifeq ($(strip $(filter-out hppa% hp hpux11%,$(target_cpu) $(target_vendor) $(target_os))),)
1283 LIBGNAT_TARGET_PAIRS = \
1284 a-intnam.ads<libgnarl/a-intnam__hpux.ads \
1285 s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
1286 s-intman.adb<libgnarl/s-intman__posix.adb \
1287 s-osinte.adb<libgnarl/s-osinte__posix.adb \
1288 s-osinte.ads<libgnarl/s-osinte__hpux.ads \
1289 s-parame.ads<libgnat/s-parame__hpux.ads \
1290 s-osprim.adb<libgnat/s-osprim__posix.adb \
1291 s-traceb.adb<libgnat/s-traceb__hpux.adb \
1292 s-taprop.adb<libgnarl/s-taprop__posix.adb \
1293 s-taspri.ads<libgnarl/s-taspri__posix.ads \
1294 s-tpopsp.adb<libgnarl/s-tpopsp__posix-foreign.adb \
1295 system.ads<libgnat/system-hpux.ads
1297 EH_MECHANISM=-gcc
1298 TGT_LIB = /usr/lib/libcl.a
1299 THREADSLIB = -lpthread
1300 GMEM_LIB = gmemlib
1301 soext = .sl
1302 SO_OPTS = -Wl,+h,
1303 GNATLIB_SHARED = gnatlib-shared-dual
1304 LIBRARY_VERSION := $(LIB_VERSION)
1305 endif
1307 # IBM AIX
1308 ifeq ($(strip $(filter-out ibm aix%,$(target_vendor) $(target_os))),)
1309 LIBGNAT_TARGET_PAIRS = \
1310 a-intnam.ads<libgnarl/a-intnam__aix.ads \
1311 s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
1312 s-intman.adb<libgnarl/s-intman__posix.adb \
1313 s-osinte.adb<libgnarl/s-osinte__aix.adb \
1314 s-osinte.ads<libgnarl/s-osinte__aix.ads \
1315 s-osprim.adb<libgnat/s-osprim__posix.adb \
1316 s-taprop.adb<libgnarl/s-taprop__posix.adb \
1317 s-taspri.ads<libgnarl/s-taspri__posix.ads \
1318 s-tpopsp.adb<libgnarl/s-tpopsp__posix.adb \
1319 $(ATOMICS_TARGET_PAIRS) \
1320 $(ATOMICS_BUILTINS_TARGET_PAIRS) \
1321 system.ads<libgnat/system-aix.ads
1323 ifeq ($(findstring ppc64, \
1324 $(shell $(GCC_FOR_TARGET) $(GNATLIBCFLAGS) \
1325 -print-multi-os-directory)), \
1326 ppc64)
1327 TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-aix.adb
1328 else
1329 TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
1330 endif
1332 THREADSLIB = -lpthreads
1333 EH_MECHANISM=-gcc
1335 GMEM_LIB = gmemlib
1336 endif
1338 # RTEMS
1339 ifeq ($(strip $(filter-out rtems%,$(target_os))),)
1340 LIBGNAT_TARGET_PAIRS = \
1341 system.ads<libgnat/system-rtems.ads \
1342 a-intnam.ads<libgnarl/a-intnam__rtems.ads \
1343 s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
1344 s-intman.adb<libgnarl/s-intman__posix.adb \
1345 s-osinte.adb<libgnarl/s-osinte__rtems.adb \
1346 s-osinte.ads<libgnarl/s-osinte__rtems.ads \
1347 s-osprim.adb<libgnat/s-osprim__posix.adb \
1348 s-parame.adb<libgnat/s-parame__rtems.adb \
1349 s-taprop.adb<libgnarl/s-taprop__posix.adb \
1350 s-taspri.ads<libgnarl/s-taspri__posix.ads \
1351 s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
1352 s-stchop.adb<libgnat/s-stchop__rtems.adb \
1353 s-interr.adb<libgnarl/s-interr__hwint.adb
1354 endif
1356 # PikeOS
1357 ifeq ($(strip $(filter-out powerpc% %86 sysgo pikeos,$(target_cpu) $(target_vendor) $(target_os)))),)
1358 TOOLS_TARGET_PAIRS=indepsw.adb<indepsw-gnu.adb
1359 endif
1361 # *-elf, *-eabi, or *-eabispe
1362 ifeq ($(strip $(filter-out elf eabi eabispe,$(target_os))),)
1363 TOOLS_TARGET_PAIRS=indepsw.adb<indepsw-gnu.adb
1364 endif
1366 ifeq ($(strip $(filter-out %djgpp,$(target_os))),)
1367 GNATRTL_SOCKETS_OBJS =
1369 LIBGNAT_TARGET_PAIRS = \
1370 a-intnam.ads<libgnarl/a-intnam__dummy.ads \
1371 s-inmaop.adb<libgnarl/s-inmaop__dummy.adb \
1372 s-intman.adb<libgnarl/s-intman__dummy.adb \
1373 s-osinte.ads<libgnarl/s-osinte__dummy.ads \
1374 s-osprim.adb<libgnat/s-osprim__unix.adb \
1375 s-taprop.adb<libgnarl/s-taprop__dummy.adb \
1376 s-taspri.ads<libgnarl/s-taspri__dummy.ads \
1377 system.ads<libgnat/system-djgpp.ads \
1378 $(DUMMY_SOCKETS_TARGET_PAIRS)
1380 EH_MECHANISM=-gcc
1381 endif
1383 # Cygwin/Mingw32
1384 ifeq ($(strip $(filter-out cygwin% mingw32% pe,$(target_os))),)
1385 # Cygwin provides a full Posix environment, and so we use the default
1386 # versions of s-memory and g-socthi rather than the Windows-specific
1387 # MinGW versions. Ideally we would use all the default versions for
1388 # Cygwin and none of the MinGW versions, but for historical reasons
1389 # the Cygwin port has always been a CygMing frankenhybrid and it is
1390 # a long-term project to disentangle them.
1391 ifeq ($(strip $(filter-out cygwin%,$(target_os))),)
1392 LIBGNAT_TARGET_PAIRS = \
1393 s-memory.adb<libgnat/s-memory.adb \
1394 g-socthi.ads<libgnat/g-socthi.ads \
1395 g-socthi.adb<libgnat/g-socthi.adb
1396 else
1397 LIBGNAT_TARGET_PAIRS = \
1398 s-memory.adb<libgnat/s-memory__mingw.adb \
1399 g-socthi.ads<libgnat/g-socthi__mingw.ads \
1400 g-socthi.adb<libgnat/g-socthi__mingw.adb
1401 endif
1402 LIBGNAT_TARGET_PAIRS += \
1403 a-dirval.adb<libgnat/a-dirval__mingw.adb \
1404 a-excpol.adb<libgnat/a-excpol__abort.adb \
1405 s-gloloc.adb<libgnat/s-gloloc__mingw.adb \
1406 s-inmaop.adb<libgnarl/s-inmaop__dummy.adb \
1407 s-taspri.ads<libgnarl/s-taspri__mingw.ads \
1408 s-tasinf.adb<libgnarl/s-tasinf__mingw.adb \
1409 s-tasinf.ads<libgnarl/s-tasinf__mingw.ads \
1410 g-stsifd.adb<libgnat/g-stsifd__sockets.adb \
1411 g-soliop.ads<libgnat/g-soliop__mingw.ads \
1412 $(ATOMICS_TARGET_PAIRS) \
1413 system.ads<libgnat/system-mingw.ads
1415 LIBGNAT_TARGET_PAIRS += \
1416 a-exetim.adb<libgnarl/a-exetim__mingw.adb \
1417 a-exetim.ads<libgnarl/a-exetim__mingw.ads \
1418 a-intnam.ads<libgnarl/a-intnam__mingw.ads \
1419 g-sercom.adb<libgnat/g-sercom__mingw.adb \
1420 s-tsmona.adb<libgnat/s-tsmona__mingw.adb \
1421 s-interr.adb<libgnarl/s-interr__sigaction.adb \
1422 s-intman.adb<libgnarl/s-intman__mingw.adb \
1423 s-mudido.adb<libgnarl/s-mudido__affinity.adb \
1424 s-osinte.ads<libgnarl/s-osinte__mingw.ads \
1425 s-osprim.adb<libgnat/s-osprim__mingw.adb \
1426 s-taprop.adb<libgnarl/s-taprop__mingw.adb
1428 ifeq ($(strip $(filter-out x86_64%,$(target_cpu))),)
1429 ifeq ($(strip $(MULTISUBDIR)),/32)
1430 LIBGNAT_TARGET_PAIRS += $(X86_TARGET_PAIRS)
1431 SO_OPTS= -m32 -Wl,-soname,
1432 else
1433 LIBGNAT_TARGET_PAIRS += $(X86_64_TARGET_PAIRS)
1434 SO_OPTS = -m64 -Wl,-soname,
1435 endif
1436 else
1437 ifeq ($(strip $(MULTISUBDIR)),/64)
1438 LIBGNAT_TARGET_PAIRS += $(X86_64_TARGET_PAIRS)
1439 SO_OPTS = -m64 -Wl,-soname,
1440 else
1441 LIBGNAT_TARGET_PAIRS += $(X86_TARGET_PAIRS)
1442 SO_OPTS = -m32 -Wl,-soname,
1443 endif
1444 endif
1446 EXTRA_GNATRTL_NONTASKING_OBJS += \
1447 s-win32.o s-winext.o g-regist.o g-sse.o g-ssvety.o
1448 EXTRA_GNATRTL_TASKING_OBJS = a-exetim.o
1449 EXTRA_LIBGNAT_SRCS+=mingw32.h
1450 MISCLIB = -lws2_32
1452 # ??? This will be replaced by gnatlib-shared-dual-win32 when GNAT
1453 # auto-import support for array/record will be done.
1454 GNATLIB_SHARED = gnatlib-shared-win32
1456 EH_MECHANISM=-gcc
1458 TOOLS_TARGET_PAIRS=indepsw.adb<indepsw-gnu.adb
1460 GMEM_LIB = gmemlib
1461 EXTRA_GNATTOOLS = ../../gnatdll$(exeext)
1462 EXTRA_GNATMAKE_OBJS = mdll.o mdll-utl.o mdll-fil.o
1463 soext = .dll
1464 LIBRARY_VERSION := $(LIB_VERSION)
1465 endif
1467 # Mips Linux
1468 ifeq ($(strip $(filter-out mips% linux%,$(target_cpu) $(target_os))),)
1469 LIBGNAT_TARGET_PAIRS = \
1470 a-intnam.ads<libgnarl/a-intnam__linux.ads \
1471 s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
1472 s-intman.adb<libgnarl/s-intman__posix.adb \
1473 s-linux.ads<libgnarl/s-linux__mips.ads \
1474 s-osinte.adb<libgnarl/s-osinte__posix.adb \
1475 s-osinte.ads<libgnarl/s-osinte__linux.ads \
1476 s-osprim.adb<libgnat/s-osprim__posix.adb \
1477 s-taprop.adb<libgnarl/s-taprop__linux.adb \
1478 s-tasinf.ads<libgnarl/s-tasinf__linux.ads \
1479 s-tasinf.adb<libgnarl/s-tasinf__linux.adb \
1480 s-taspri.ads<libgnarl/s-taspri__posix-noaltstack.ads \
1481 s-tpopsp.adb<libgnarl/s-tpopsp__posix-foreign.adb \
1482 g-sercom.adb<libgnat/g-sercom__linux.adb \
1483 system.ads<libgnat/system-linux-mips.ads
1485 TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
1487 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1488 EH_MECHANISM=-gcc
1489 THREADSLIB = -lpthread
1490 GNATLIB_SHARED = gnatlib-shared-dual
1491 GMEM_LIB = gmemlib
1492 LIBRARY_VERSION := $(LIB_VERSION)
1493 endif
1495 # PowerPC and e500v2 Linux
1496 ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
1497 LIBGNAT_TARGET_PAIRS_COMMON = \
1498 a-exetim.adb<libgnarl/a-exetim__posix.adb \
1499 a-exetim.ads<libgnarl/a-exetim__default.ads \
1500 a-intnam.ads<libgnarl/a-intnam__linux.ads \
1501 a-synbar.adb<libgnarl/a-synbar__posix.adb \
1502 a-synbar.ads<libgnarl/a-synbar__posix.ads \
1503 s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
1504 s-intman.adb<libgnarl/s-intman__posix.adb \
1505 s-linux.ads<libgnarl/s-linux.ads \
1506 s-osinte.adb<libgnarl/s-osinte__posix.adb \
1507 s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
1508 g-sercom.adb<libgnat/g-sercom__linux.adb \
1509 $(ATOMICS_TARGET_PAIRS) \
1510 $(ATOMICS_BUILTINS_TARGET_PAIRS) \
1511 system.ads<libgnat/system-linux-ppc.ads
1513 LIBGNAT_TARGET_PAIRS = \
1514 $(LIBGNAT_TARGET_PAIRS_COMMON) \
1515 s-mudido.adb<libgnarl/s-mudido__affinity.adb \
1516 s-osinte.ads<libgnarl/s-osinte__linux.ads \
1517 s-osprim.adb<libgnat/s-osprim__posix.adb \
1518 s-taprop.adb<libgnarl/s-taprop__linux.adb \
1519 s-tasinf.ads<libgnarl/s-tasinf__linux.ads \
1520 s-tasinf.adb<libgnarl/s-tasinf__linux.adb \
1521 s-taspri.ads<libgnarl/s-taspri__posix-noaltstack.ads
1523 TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
1525 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o a-exetim.o
1527 EH_MECHANISM=-gcc
1528 THREADSLIB = -lpthread -lrt
1529 GNATLIB_SHARED = gnatlib-shared-dual
1530 GMEM_LIB = gmemlib
1531 LIBRARY_VERSION := $(LIB_VERSION)
1532 endif
1534 # ARM linux, GNU eabi
1535 ifeq ($(strip $(filter-out arm% linux-gnueabi%,$(target_cpu) $(target_os))),)
1536 LIBGNAT_TARGET_PAIRS = \
1537 a-intnam.ads<libgnarl/a-intnam__linux.ads \
1538 s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
1539 s-intman.adb<libgnarl/s-intman__posix.adb \
1540 s-linux.ads<libgnarl/s-linux.ads \
1541 s-osinte.adb<libgnarl/s-osinte__posix.adb \
1542 s-osinte.ads<libgnarl/s-osinte__linux.ads \
1543 s-osprim.adb<libgnat/s-osprim__posix.adb \
1544 s-taprop.adb<libgnarl/s-taprop__linux.adb \
1545 s-tasinf.ads<libgnarl/s-tasinf__linux.ads \
1546 s-tasinf.adb<libgnarl/s-tasinf__linux.adb \
1547 s-taspri.ads<libgnarl/s-taspri__posix-noaltstack.ads \
1548 s-tpopsp.adb<libgnarl/s-tpopsp__posix-foreign.adb \
1549 $(ATOMICS_TARGET_PAIRS) \
1550 $(ATOMICS_BUILTINS_TARGET_PAIRS) \
1551 system.ads<libgnat/system-linux-arm.ads
1553 ifeq ($(strip $(filter-out arm%b,$(target_cpu))),)
1554 EH_MECHANISM=
1555 else
1556 EH_MECHANISM=-arm
1557 endif
1559 TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
1561 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1562 THREADSLIB = -lpthread
1563 GNATLIB_SHARED = gnatlib-shared-dual
1564 GMEM_LIB = gmemlib
1565 LIBRARY_VERSION := $(LIB_VERSION)
1566 endif
1568 # AArch64 Linux
1569 ifeq ($(strip $(filter-out aarch64% linux%,$(target_cpu) $(target_os))),)
1570 LIBGNAT_TARGET_PAIRS = \
1571 a-exetim.adb<libgnarl/a-exetim__posix.adb \
1572 a-exetim.ads<libgnarl/a-exetim__default.ads \
1573 a-intnam.ads<libgnarl/a-intnam__linux.ads \
1574 a-synbar.adb<libgnarl/a-synbar__posix.adb \
1575 a-synbar.ads<libgnarl/a-synbar__posix.ads \
1576 s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
1577 s-intman.adb<libgnarl/s-intman__posix.adb \
1578 s-linux.ads<libgnarl/s-linux.ads \
1579 s-mudido.adb<libgnarl/s-mudido__affinity.adb \
1580 s-osinte.ads<libgnarl/s-osinte__linux.ads \
1581 s-osinte.adb<libgnarl/s-osinte__posix.adb \
1582 s-osprim.adb<libgnat/s-osprim__posix.adb \
1583 s-taprop.adb<libgnarl/s-taprop__linux.adb \
1584 s-tasinf.ads<libgnarl/s-tasinf__linux.ads \
1585 s-tasinf.adb<libgnarl/s-tasinf__linux.adb \
1586 s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
1587 s-taspri.ads<libgnarl/s-taspri__posix.ads \
1588 g-sercom.adb<libgnat/g-sercom__linux.adb \
1589 $(ATOMICS_TARGET_PAIRS) \
1590 $(ATOMICS_BUILTINS_TARGET_PAIRS) \
1591 system.ads<libgnat/system-linux-arm.ads
1593 TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
1595 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o a-exetim.o
1596 EH_MECHANISM=-gcc
1597 THREADSLIB=-lpthread -lrt
1598 GNATLIB_SHARED=gnatlib-shared-dual
1599 GMEM_LIB = gmemlib
1600 LIBRARY_VERSION := $(LIB_VERSION)
1601 endif
1603 # Sparc Linux
1604 ifeq ($(strip $(filter-out sparc% linux%,$(target_cpu) $(target_os))),)
1605 LIBGNAT_TARGET_PAIRS = \
1606 a-intnam.ads<libgnarl/a-intnam__linux.ads \
1607 s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
1608 s-intman.adb<libgnarl/s-intman__posix.adb \
1609 s-linux.ads<libgnarl/s-linux__sparc.ads \
1610 s-osinte.adb<libgnarl/s-osinte__posix.adb \
1611 s-osinte.ads<libgnarl/s-osinte__linux.ads \
1612 s-osprim.adb<libgnat/s-osprim__posix.adb \
1613 s-taprop.adb<libgnarl/s-taprop__linux.adb \
1614 s-tasinf.ads<libgnarl/s-tasinf__linux.ads \
1615 s-tasinf.adb<libgnarl/s-tasinf__linux.adb \
1616 s-taspri.ads<libgnarl/s-taspri__posix-noaltstack.ads \
1617 s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
1618 system.ads<libgnat/system-linux-sparc.ads
1620 TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
1622 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1623 EH_MECHANISM=-gcc
1624 THREADSLIB = -lpthread
1625 GNATLIB_SHARED = gnatlib-shared-dual
1626 GMEM_LIB = gmemlib
1627 LIBRARY_VERSION := $(LIB_VERSION)
1628 endif
1630 # HP/PA Linux
1631 ifeq ($(strip $(filter-out hppa% linux%,$(target_cpu) $(target_os))),)
1632 LIBGNAT_TARGET_PAIRS = \
1633 a-intnam.ads<libgnarl/a-intnam__linux.ads \
1634 s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
1635 s-intman.adb<libgnarl/s-intman__posix.adb \
1636 s-linux.ads<libgnarl/s-linux__hppa.ads \
1637 s-osinte.adb<libgnarl/s-osinte__posix.adb \
1638 s-osinte.ads<libgnarl/s-osinte__linux.ads \
1639 s-osprim.adb<libgnat/s-osprim__posix.adb \
1640 s-taprop.adb<libgnarl/s-taprop__linux.adb \
1641 s-tasinf.ads<libgnarl/s-tasinf__linux.ads \
1642 s-tasinf.adb<libgnarl/s-tasinf__linux.adb \
1643 s-taspri.ads<libgnarl/s-taspri__posix-noaltstack.ads \
1644 s-tpopsp.adb<libgnarl/s-tpopsp__posix-foreign.adb \
1645 system.ads<libgnat/system-linux-hppa.ads
1647 TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
1649 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1650 EH_MECHANISM=-gcc
1651 THREADSLIB = -lpthread
1652 GNATLIB_SHARED = gnatlib-shared-dual
1653 GMEM_LIB = gmemlib
1654 LIBRARY_VERSION := $(LIB_VERSION)
1655 endif
1657 # M68K Linux
1658 ifeq ($(strip $(filter-out m68k% linux%,$(target_cpu) $(target_os))),)
1659 LIBGNAT_TARGET_PAIRS = \
1660 a-intnam.ads<libgnarl/a-intnam__linux.ads \
1661 s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
1662 s-intman.adb<libgnarl/s-intman__posix.adb \
1663 s-linux.ads<libgnarl/s-linux.ads \
1664 s-osinte.adb<libgnarl/s-osinte__posix.adb \
1665 s-osinte.ads<libgnarl/s-osinte__linux.ads \
1666 s-osprim.adb<libgnat/s-osprim__posix.adb \
1667 s-taprop.adb<libgnarl/s-taprop__linux.adb \
1668 s-tasinf.ads<libgnarl/s-tasinf__linux.ads \
1669 s-tasinf.adb<libgnarl/s-tasinf__linux.adb \
1670 s-taspri.ads<libgnarl/s-taspri__posix.ads \
1671 s-tpopsp.adb<libgnarl/s-tpopsp__posix-foreign.adb \
1672 system.ads<libgnat/system-linux-m68k.ads
1674 TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
1676 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1677 EH_MECHANISM=-gcc
1678 THREADSLIB = -lpthread
1679 GNATLIB_SHARED = gnatlib-shared-dual
1680 GMEM_LIB = gmemlib
1681 LIBRARY_VERSION := $(LIB_VERSION)
1682 endif
1684 # SH4 Linux
1685 ifeq ($(strip $(filter-out sh4% linux%,$(target_cpu) $(target_os))),)
1686 LIBGNAT_TARGET_PAIRS = \
1687 a-intnam.ads<libgnarl/a-intnam__linux.ads \
1688 s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
1689 s-intman.adb<libgnarl/s-intman__posix.adb \
1690 s-linux.ads<libgnarl/s-linux.ads \
1691 s-osinte.adb<libgnarl/s-osinte__posix.adb \
1692 s-osinte.ads<libgnarl/s-osinte__linux.ads \
1693 s-osprim.adb<libgnat/s-osprim__posix.adb \
1694 s-taprop.adb<libgnarl/s-taprop__linux.adb \
1695 s-tasinf.ads<libgnarl/s-tasinf__linux.ads \
1696 s-tasinf.adb<libgnarl/s-tasinf__linux.adb \
1697 s-taspri.ads<libgnarl/s-taspri__posix-noaltstack.ads \
1698 s-tpopsp.adb<libgnarl/s-tpopsp__posix-foreign.adb \
1699 system.ads<libgnat/system-linux-sh4.ads
1701 TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-linux.adb
1703 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1704 EH_MECHANISM=-gcc
1705 MISCLIB=
1706 THREADSLIB = -lpthread
1707 GNATLIB_SHARED = gnatlib-shared-dual
1708 GMEM_LIB = gmemlib
1709 LIBRARY_VERSION := $(LIB_VERSION)
1710 endif
1712 # IA64 Linux
1713 ifeq ($(strip $(filter-out %ia64 linux%,$(target_cpu) $(target_os))),)
1714 LIBGNAT_TARGET_PAIRS = \
1715 a-exetim.adb<libgnarl/a-exetim__posix.adb \
1716 a-exetim.ads<libgnarl/a-exetim__default.ads \
1717 a-intnam.ads<libgnarl/a-intnam__linux.ads \
1718 a-numaux.ads<libgnat/a-numaux__libc-x86.ads \
1719 a-synbar.adb<libgnarl/a-synbar__posix.adb \
1720 a-synbar.ads<libgnarl/a-synbar__posix.ads \
1721 s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
1722 s-intman.adb<libgnarl/s-intman__posix.adb \
1723 s-linux.ads<libgnarl/s-linux.ads \
1724 s-mudido.adb<libgnarl/s-mudido__affinity.adb \
1725 s-osinte.ads<libgnarl/s-osinte__linux.ads \
1726 s-osinte.adb<libgnarl/s-osinte__posix.adb \
1727 s-osprim.adb<libgnat/s-osprim__posix.adb \
1728 s-taprop.adb<libgnarl/s-taprop__linux.adb \
1729 s-tasinf.ads<libgnarl/s-tasinf__linux.ads \
1730 s-tasinf.adb<libgnarl/s-tasinf__linux.adb \
1731 s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
1732 s-taspri.ads<libgnarl/s-taspri__posix-noaltstack.ads \
1733 g-sercom.adb<libgnat/g-sercom__linux.adb \
1734 $(ATOMICS_TARGET_PAIRS) \
1735 $(ATOMICS_BUILTINS_TARGET_PAIRS) \
1736 system.ads<libgnat/system-linux-ia64.ads
1738 TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
1740 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o a-exetim.o
1741 EH_MECHANISM=-gcc
1742 MISCLIB=
1743 THREADSLIB=-lpthread -lrt
1744 GNATLIB_SHARED=gnatlib-shared-dual
1745 GMEM_LIB = gmemlib
1746 LIBRARY_VERSION := $(LIB_VERSION)
1747 endif
1749 # IA64 HP-UX
1750 ifeq ($(strip $(filter-out ia64% hp hpux%,$(target_cpu) $(target_vendor) $(target_os))),)
1751 LIBGNAT_TARGET_PAIRS = \
1752 a-intnam.ads<libgnarl/a-intnam__hpux.ads \
1753 s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
1754 s-intman.adb<libgnarl/s-intman__posix.adb \
1755 s-osinte.adb<libgnarl/s-osinte__posix.adb \
1756 s-osinte.ads<libgnarl/s-osinte__hpux.ads \
1757 s-osprim.adb<libgnat/s-osprim__posix.adb \
1758 s-taprop.adb<libgnarl/s-taprop__posix.adb \
1759 s-taspri.ads<libgnarl/s-taspri__posix.ads \
1760 s-tpopsp.adb<libgnarl/s-tpopsp__posix-foreign.adb \
1761 $(ATOMICS_TARGET_PAIRS) \
1762 $(ATOMICS_BUILTINS_TARGET_PAIRS) \
1763 system.ads<libgnat/system-hpux-ia64.ads
1765 MISCLIB=
1766 EH_MECHANISM=-gcc
1767 THREADSLIB=-lpthread
1768 GNATLIB_SHARED=gnatlib-shared-dual
1769 GMEM_LIB = gmemlib
1770 soext = .so
1771 SO_OPTS = -Wl,+h,
1772 LIBRARY_VERSION := $(LIB_VERSION)
1773 endif
1775 # Alpha Linux
1776 ifeq ($(strip $(filter-out alpha% linux%,$(target_cpu) $(target_os))),)
1777 LIBGNAT_TARGET_PAIRS = \
1778 a-intnam.ads<libgnarl/a-intnam__linux.ads \
1779 s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
1780 s-intman.adb<libgnarl/s-intman__posix.adb \
1781 s-linux.ads<libgnarl/s-linux__alpha.ads \
1782 s-osinte.ads<libgnarl/s-osinte__linux.ads \
1783 s-osinte.adb<libgnarl/s-osinte__posix.adb \
1784 s-osprim.adb<libgnat/s-osprim__posix.adb \
1785 s-taprop.adb<libgnarl/s-taprop__linux.adb \
1786 s-tasinf.ads<libgnarl/s-tasinf__linux.ads \
1787 s-tasinf.adb<libgnarl/s-tasinf__linux.adb \
1788 s-tpopsp.adb<libgnarl/s-tpopsp__posix-foreign.adb \
1789 s-taspri.ads<libgnarl/s-taspri__posix-noaltstack.ads \
1790 $(ATOMICS_TARGET_PAIRS) \
1791 $(ATOMICS_BUILTINS_TARGET_PAIRS) \
1792 system.ads<libgnat/system-linux-alpha.ads
1794 TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
1796 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
1797 EH_MECHANISM=-gcc
1798 MISCLIB=
1799 THREADSLIB=-lpthread
1800 GNATLIB_SHARED=gnatlib-shared-dual
1801 LIBRARY_VERSION := $(LIB_VERSION)
1802 endif
1804 # x86-64 Linux
1805 ifeq ($(strip $(filter-out %x86_64 linux%,$(target_cpu) $(target_os))),)
1806 LIBGNAT_TARGET_PAIRS = \
1807 a-exetim.adb<libgnarl/a-exetim__posix.adb \
1808 a-exetim.ads<libgnarl/a-exetim__default.ads \
1809 a-intnam.ads<libgnarl/a-intnam__linux.ads \
1810 a-synbar.adb<libgnarl/a-synbar__posix.adb \
1811 a-synbar.ads<libgnarl/a-synbar__posix.ads \
1812 s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
1813 s-intman.adb<libgnarl/s-intman__posix.adb \
1814 s-linux.ads<libgnarl/s-linux.ads \
1815 s-mudido.adb<libgnarl/s-mudido__affinity.adb \
1816 s-osinte.ads<libgnarl/s-osinte__linux.ads \
1817 s-osinte.adb<libgnarl/s-osinte__posix.adb \
1818 s-osprim.adb<libgnat/s-osprim__posix.adb \
1819 s-taprop.adb<libgnarl/s-taprop__linux.adb \
1820 s-tasinf.ads<libgnarl/s-tasinf__linux.ads \
1821 s-tasinf.adb<libgnarl/s-tasinf__linux.adb \
1822 s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
1823 s-taspri.ads<libgnarl/s-taspri__posix.ads \
1824 g-sercom.adb<libgnat/g-sercom__linux.adb \
1825 $(TRASYM_DWARF_UNIX_PAIRS) \
1826 s-tsmona.adb<libgnat/s-tsmona__linux.adb \
1827 $(ATOMICS_TARGET_PAIRS) \
1828 $(X86_64_TARGET_PAIRS) \
1829 system.ads<libgnat/system-linux-x86.ads
1831 TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
1833 EXTRA_GNATRTL_NONTASKING_OBJS += g-sse.o g-ssvety.o
1834 EXTRA_GNATRTL_NONTASKING_OBJS += $(TRASYM_DWARF_UNIX_OBJS)
1835 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o a-exetim.o
1837 EH_MECHANISM=-gcc
1838 THREADSLIB=-lpthread -lrt
1839 MISCLIB = -ldl
1840 GNATLIB_SHARED=gnatlib-shared-dual
1841 GMEM_LIB = gmemlib
1842 LIBRARY_VERSION := $(LIB_VERSION)
1843 endif
1845 ifeq ($(strip $(filter-out %x32 linux%,$(target_cpu) $(target_os))),)
1846 LIBGNAT_TARGET_PAIRS = \
1847 a-exetim.adb<libgnarl/a-exetim__posix.adb \
1848 a-exetim.ads<libgnarl/a-exetim__default.ads \
1849 a-intnam.ads<libgnarl/a-intnam__linux.ads \
1850 a-synbar.adb<libgnarl/a-synbar__posix.adb \
1851 a-synbar.ads<libgnarl/a-synbar__posix.ads \
1852 s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
1853 s-intman.adb<libgnarl/s-intman__posix.adb \
1854 s-linux.ads<libgnarl/s-linux__x32.ads \
1855 s-mudido.adb<libgnarl/s-mudido__affinity.adb \
1856 s-osinte.ads<libgnarl/s-osinte__linux.ads \
1857 s-osinte.adb<libgnarl/s-osinte__x32.adb \
1858 s-osprim.adb<libgnat/s-osprim__x32.adb \
1859 s-taprop.adb<libgnarl/s-taprop__linux.adb \
1860 s-tasinf.ads<libgnarl/s-tasinf__linux.ads \
1861 s-tasinf.adb<libgnarl/s-tasinf__linux.adb \
1862 s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
1863 s-taspri.ads<libgnarl/s-taspri__posix.ads \
1864 g-sercom.adb<libgnat/g-sercom__linux.adb \
1865 $(ATOMICS_TARGET_PAIRS) \
1866 $(X86_64_TARGET_PAIRS) \
1867 system.ads<libgnat/system-linux-x86.ads
1869 TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
1871 EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
1872 EXTRA_GNATRTL_TASKING_OBJS=s-linux.o a-exetim.o
1873 EH_MECHANISM=-gcc
1874 THREADSLIB=-lpthread -lrt
1875 GNATLIB_SHARED=gnatlib-shared-dual
1876 GMEM_LIB = gmemlib
1877 LIBRARY_VERSION := $(LIB_VERSION)
1878 endif
1880 # Darwin (Mac OS X)
1881 ifeq ($(strip $(filter-out darwin%,$(target_os))),)
1882 SO_OPTS = -shared-libgcc
1883 LIBGNAT_TARGET_PAIRS = \
1884 a-intnam.ads<libgnarl/a-intnam__darwin.ads \
1885 s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
1886 s-osinte.adb<libgnarl/s-osinte__darwin.adb \
1887 s-osinte.ads<libgnarl/s-osinte__darwin.ads \
1888 s-taprop.adb<libgnarl/s-taprop__posix.adb \
1889 s-taspri.ads<libgnarl/s-taspri__posix.ads \
1890 g-sercom.adb<libgnat/g-sercom__linux.adb \
1891 s-tpopsp.adb<libgnarl/s-tpopsp__posix-foreign.adb
1893 ifeq ($(strip $(filter-out %86,$(target_cpu))),)
1894 LIBGNAT_TARGET_PAIRS += \
1895 s-intman.adb<libgnarl/s-intman__susv3.adb \
1896 s-osprim.adb<libgnat/s-osprim__darwin.adb \
1897 $(ATOMICS_TARGET_PAIRS) \
1898 system.ads<libgnat/system-darwin-x86.ads
1900 ifeq ($(strip $(MULTISUBDIR)),/x86_64)
1901 SO_OPTS += -m64
1902 LIBGNAT_TARGET_PAIRS += $(X86_64_TARGET_PAIRS)
1903 else
1904 LIBGNAT_TARGET_PAIRS += $(X86_TARGET_PAIRS)
1905 endif
1907 EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
1908 endif
1910 ifeq ($(strip $(filter-out %x86_64,$(target_cpu))),)
1911 LIBGNAT_TARGET_PAIRS += \
1912 s-intman.adb<libgnarl/s-intman__susv3.adb \
1913 s-osprim.adb<libgnat/s-osprim__darwin.adb \
1914 a-exetim.ads<libgnarl/a-exetim__default.ads \
1915 a-exetim.adb<libgnarl/a-exetim__darwin.adb \
1916 $(ATOMICS_TARGET_PAIRS) \
1917 system.ads<libgnat/system-darwin-x86.ads
1919 ifeq ($(strip $(MULTISUBDIR)),/i386)
1920 SO_OPTS += -m32
1921 LIBGNAT_TARGET_PAIRS += $(X86_TARGET_PAIRS)
1922 else
1923 LIBGNAT_TARGET_PAIRS += $(X86_64_TARGET_PAIRS)
1924 endif
1926 EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
1927 EXTRA_GNATRTL_TASKING_OBJS=a-exetim.o
1928 endif
1930 ifeq ($(strip $(filter-out powerpc%,$(target_cpu))),)
1931 LIBGNAT_TARGET_PAIRS += \
1932 s-intman.adb<libgnarl/s-intman__posix.adb \
1933 s-osprim.adb<libgnat/s-osprim__posix.adb \
1934 a-numaux.ads<libgnat/a-numaux__darwin.ads \
1935 a-numaux.adb<libgnat/a-numaux__darwin.adb \
1936 $(ATOMICS_TARGET_PAIRS) \
1937 $(ATOMICS_BUILTINS_TARGET_PAIRS) \
1938 system.ads<libgnat/system-darwin-ppc.ads
1940 ifeq ($(strip $(MULTISUBDIR)),/ppc64)
1941 SO_OPTS += -m64
1942 endif
1943 endif
1945 ifeq ($(strip $(filter-out arm,$(target_cpu))),)
1946 LIBGNAT_TARGET_PAIRS += \
1947 s-intman.adb<libgnarl/s-intman__susv3.adb \
1948 s-osprim.adb<libgnat/s-osprim__darwin.adb \
1949 $(ATOMICS_TARGET_PAIRS) \
1950 $(ATOMICS_BUILTINS_TARGET_PAIRS)
1952 LIBGNAT_TARGET_PAIRS += \
1953 system.ads<libgnat/system-darwin-arm.ads
1954 endif
1956 ifeq ($(strip $(filter-out arm64 aarch64,$(target_cpu))),)
1957 LIBGNAT_TARGET_PAIRS += \
1958 s-intman.adb<libgnarl/s-intman__susv3.adb \
1959 s-osprim.adb<libgnat/s-osprim__darwin.adb \
1960 $(ATOMICS_TARGET_PAIRS) \
1961 $(ATOMICS_BUILTINS_TARGET_PAIRS)
1963 EXTRA_LIBGNAT_OBJS+=sigtramp-ios.o
1964 EXTRA_LIBGNAT_SRCS+=sigtramp.h
1965 LIBGNAT_TARGET_PAIRS += \
1966 system.ads<libgnat/system-darwin-arm.ads
1967 endif
1969 TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-darwin.adb
1971 EH_MECHANISM=-gcc
1972 GNATLIB_SHARED = gnatlib-shared-darwin
1973 GMEM_LIB = gmemlib
1974 LIBRARY_VERSION := $(LIB_VERSION)
1975 soext = .dylib
1976 GCC_LINK_FLAGS=-static-libstdc++
1977 endif
1979 ifeq ($(EH_MECHANISM),-gcc)
1980 LIBGNAT_TARGET_PAIRS += \
1981 s-excmac.ads<libgnat/s-excmac__gcc.ads \
1982 s-excmac.adb<libgnat/s-excmac__gcc.adb
1983 EXTRA_LIBGNAT_OBJS+=raise-gcc.o
1984 EXTRA_GNATRTL_NONTASKING_OBJS+=g-cppexc.o s-excmac.o
1985 endif
1987 ifeq ($(EH_MECHANISM),-arm)
1988 LIBGNAT_TARGET_PAIRS += \
1989 s-excmac.ads<libgnat/s-excmac__arm.ads \
1990 s-excmac.adb<libgnat/s-excmac__arm.adb
1991 EXTRA_LIBGNAT_OBJS+=raise-gcc.o
1992 EXTRA_GNATRTL_NONTASKING_OBJS+=g-cppexc.o s-excmac.o
1993 endif
1995 # Configuration of host tools
1997 # Under linux, host tools need to be linked with -ldl
1999 ifeq ($(strip $(filter-out linux%,$(host_os))),)
2000 TOOLS1_LIBS=-ldl
2001 endif
2003 # LIBGNAT_SRCS is the list of all C files (including headers) of the runtime
2004 # library. LIBGNAT_OBJS is the list of object files for libgnat.
2005 # thread.c is special as put into GNATRTL_TASKING_OBJS by Makefile.rtl
2006 LIBGNAT_OBJS = adadecode.o adaint.o argv.o aux-io.o \
2007 cal.o cio.o cstreams.o ctrl_c.o \
2008 env.o errno.o exit.o expect.o final.o rtfinal.o rtinit.o \
2009 init.o initialize.o locales.o mkdir.o \
2010 raise.o seh_init.o socket.o sysdep.o \
2011 targext.o terminals.o tracebak.o \
2012 $(EXTRA_LIBGNAT_OBJS)
2014 # NOTE ??? - when the -I option for compiling Ada code is made to work,
2015 # the library installation will change and there will be a
2016 # GNAT_RTL_SRCS. Right now we count on being able to build GNATRTL_OBJS
2017 # from ADA_INCLUDE_SRCS.
2019 LIBGNAT_SRCS = $(patsubst %.o,%.c,$(LIBGNAT_OBJS)) \
2020 adadecode.h adaint.h env.h gsocket.h raise.h standard.ads.h \
2021 tb-gcc.c libgnarl/thread.c $(EXTRA_LIBGNAT_SRCS)
2023 # GNATRTL_NONTASKING_OBJS and GNATRTL_TASKING_OBJS can be found in
2024 # the following include file:
2026 include $(fsrcdir)/ada/Makefile.rtl
2028 # memtrack.o is special as not put into libgnat.
2029 GNATRTL_OBJS = $(GNATRTL_NONTASKING_OBJS) $(GNATRTL_TASKING_OBJS) \
2030 memtrack.o
2032 # Run time source files
2033 # Note that libgnat contains a significant number of files. In orde to avoid
2034 # command line length limitations the source regexp has been split for that
2035 # directory.
2036 ADA_INCLUDE_SRCS =\
2037 libgnat/ada.ads libgnat/calendar.ads libgnat/directio.ads libgnat/gnat.ads libgnat/interfac.ads libgnat/ioexcept.ads \
2038 libgnat/machcode.ads libgnat/text_io.ads libgnat/unchconv.ads libgnat/unchdeal.ads \
2039 libgnat/sequenio.ads libgnat/system.ads libgnat/memtrack.adb \
2040 libgnat/a-[a-o]*.adb libgnat/a-[a-o]*.ads \
2041 libgnat/a-[p-z]*.adb libgnat/a-[p-z]*.ads \
2042 libgnat/g-[a-o]*.adb libgnat/g-[a-o]*.ads \
2043 libgnat/g-[p-z]*.adb libgnat/g-[p-z]*.ads \
2044 libgnat/s-[a-o]*.adb libgnat/s-[a-o]*.ads \
2045 libgnat/s-[p-z]*.adb libgnat/s-[p-z]*.ads \
2046 libgnat/i-[a-o]*.adb libgnat/i-[a-o]*.ads \
2047 libgnat/i-[p-z]*.adb libgnat/i-[p-z]*.ads \
2048 libgnarl/[agis]-[a-z]*.ad[sb]
2050 # Files that are in ADA_INCLUDE_SRCS but not in all configurations.
2051 # They will be removed from the run time if not used.
2052 ADA_EXCLUDE_SRCS =\
2053 g-allein.ads g-alleve.adb g-alleve.ads g-altcon.adb g-altcon.ads \
2054 g-altive.ads g-alveop.adb g-alveop.ads g-alvety.ads g-alvevi.ads \
2055 g-intpri.ads g-regist.adb g-regist.ads g-sse.ads g-ssvety.ads \
2056 i-vxinco.adb i-vxinco.ads i-vxwoio.adb i-vxwoio.ads i-vxwork.ads \
2057 s-bb.ads s-bbbosu.ads s-bbcaco.ads s-bbcppr.ads s-bbexti.adb \
2058 s-bbexti.ads s-bbinte.adb s-bbinte.ads s-bbprot.adb s-bbprot.ads \
2059 s-bbsle3.ads s-bbsuer.ads s-bbsule.ads s-bbthqu.adb s-bbthqu.ads \
2060 s-bbthre.adb s-bbthre.ads s-bbtiev.adb s-bbtiev.ads s-bbtime.adb \
2061 s-bbtime.ads s-bcprmu.adb s-bcprmu.ads s-btstch.adb s-btstch.ads \
2062 s-gcc.adb s-gcc.ads s-gccdiv.adb s-gccdiv.ads \
2063 s-gccshi.adb s-gccshi.ads \
2064 s-init.ads s-init.adb s-linux.ads s-macres.ads \
2065 s-memcom.adb s-memcom.ads s-memmov.adb s-memmov.ads s-memset.adb \
2066 s-memset.ads s-mufalo.adb s-mufalo.ads s-musplo.adb s-musplo.ads \
2067 s-sam4.ads s-sopco3.adb s-sopco3.ads s-sopco4.adb s-sopco4.ads \
2068 s-sopco5.adb s-sopco5.ads s-stchop.ads s-stchop.adb s-stm32.ads \
2069 s-strcom.adb s-strcom.ads s-thread.ads \
2070 s-vxwext.adb s-vxwext.ads \
2071 s-win32.ads s-winext.ads
2073 # ADA_EXCLUDE_SRCS without the sources used by the target
2074 ADA_EXCLUDE_FILES=$(filter-out \
2075 $(patsubst %$(objext),%.ads,$(GNATRTL_OBJS)) \
2076 $(patsubst %$(objext),%.adb,$(GNATRTL_OBJS)), \
2077 $(ADA_EXCLUDE_SRCS))
2079 LIBGNAT=../$(RTSDIR)/libgnat.a
2081 TOOLS_FLAGS_TO_PASS= \
2082 "CC=$(CC)" \
2083 "CFLAGS=$(CFLAGS)" \
2084 "LDFLAGS=$(LDFLAGS)" \
2085 "ADAFLAGS=$(ADAFLAGS)" \
2086 "INCLUDES=$(INCLUDES_FOR_SUBDIR)"\
2087 "ADA_INCLUDES=$(ADA_INCLUDES) $(ADA_INCLUDES_FOR_SUBDIR)"\
2088 "libsubdir=$(libsubdir)" \
2089 "exeext=$(exeext)" \
2090 "fsrcdir=$(fsrcdir)" \
2091 "srcdir=$(fsrcdir)" \
2092 "TOOLS_LIBS=$(TOOLS_LIBS) $(TGT_LIB)" \
2093 "GNATMAKE=$(GNATMAKE)" \
2094 "GNATLINK=$(GNATLINK)" \
2095 "GNATBIND=$(GNATBIND)"
2097 GCC_LINK=$(CXX) $(GCC_LINK_FLAGS) $(ADA_INCLUDES) $(LDFLAGS)
2099 # Build directory for the tools. Let's copy the target-dependent
2100 # sources using the same mechanism as for gnatlib. The other sources are
2101 # accessed using the vpath directive below
2103 ../stamp-tools:
2104 -$(RM) tools/*
2105 -$(RMDIR) tools
2106 -$(MKDIR) tools
2107 -(cd tools; $(LN_S) ../sdefault.adb ../snames.ads ../snames.adb .)
2108 -$(foreach PAIR,$(TOOLS_TARGET_PAIRS), \
2109 $(RM) tools/$(word 1,$(subst <, ,$(PAIR)));\
2110 $(LN_S) $(fsrcpfx)ada/$(word 2,$(subst <, ,$(PAIR))) \
2111 tools/$(word 1,$(subst <, ,$(PAIR)));)
2112 touch ../stamp-tools
2114 # when compiling the tools, the runtime has to be first on the path so that
2115 # it hides the runtime files lying with the rest of the sources
2116 ifeq ($(TOOLSCASE),native)
2117 vpath %.ads ../$(RTSDIR) ../
2118 vpath %.adb ../$(RTSDIR) ../
2119 vpath %.c ../$(RTSDIR) ../
2120 vpath %.h ../$(RTSDIR) ../
2121 endif
2123 # in the cross tools case, everything is compiled with the native
2124 # gnatmake/link. Therefore only -I needs to be modified in ADA_INCLUDES
2125 ifeq ($(TOOLSCASE),cross)
2126 vpath %.ads ../
2127 vpath %.adb ../
2128 vpath %.c ../
2129 vpath %.h ../
2130 endif
2132 # gnatmake/link tools cannot always be built with gnatmake/link for bootstrap
2133 # reasons: gnatmake should be built with a recent compiler, a recent compiler
2134 # may not generate ALI files compatible with an old gnatmake so it is important
2135 # to be able to build gnatmake without a version of gnatmake around. Once
2136 # everything has been compiled once, gnatmake can be recompiled with itself
2137 # (see target gnattools1-re)
2138 gnattools1: ../stamp-tools ../stamp-gnatlib-$(RTSDIR)
2139 $(MAKE) -C tools -f ../Makefile $(TOOLS_FLAGS_TO_PASS) \
2140 TOOLSCASE=native \
2141 ../../gnatmake$(exeext) ../../gnatlink$(exeext)
2143 # gnatmake/link can be built with recent gnatmake/link if they are available.
2144 # This is especially convenient for building cross tools or for rebuilding
2145 # the tools when the original bootstrap has already be done.
2146 gnattools1-re: ../stamp-tools
2147 $(MAKE) -C tools -f ../Makefile $(TOOLS_FLAGS_TO_PASS) \
2148 TOOLSCASE=cross INCLUDES="" gnatmake-re gnatlink-re
2150 # these tools are built with gnatmake & are common to native and cross
2151 gnattools2: ../stamp-tools
2152 $(MAKE) -C tools -f ../Makefile $(TOOLS_FLAGS_TO_PASS) \
2153 TOOLSCASE=native common-tools $(EXTRA_GNATTOOLS)
2155 # those tools are only built for the cross version
2156 gnattools4: ../stamp-tools
2157 ifeq ($(ENABLE_VXADDR2LINE),true)
2158 $(MAKE) -C tools -f ../Makefile $(TOOLS_FLAGS_TO_PASS) \
2159 TOOLSCASE=cross top_buildir=../../.. \
2160 ../../vxaddr2line$(exeext)
2161 endif
2163 common-tools: ../stamp-tools
2164 $(GNATMAKE) -j0 -c -b $(ADA_INCLUDES) \
2165 --GNATBIND="$(GNATBIND)" --GCC="$(CC) $(ALL_ADAFLAGS)" \
2166 gnatchop gnatcmd gnatkr gnatls gnatprep gnatxref gnatfind gnatname \
2167 gnatclean -bargs $(ADA_INCLUDES) $(GNATBIND_FLAGS)
2168 $(GNATLINK) -v gnatcmd -o ../../gnat$(exeext) \
2169 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2170 $(GNATLINK) -v gnatchop -o ../../gnatchop$(exeext) \
2171 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2172 $(GNATLINK) -v gnatkr -o ../../gnatkr$(exeext) \
2173 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2174 $(GNATLINK) -v gnatls -o ../../gnatls$(exeext) \
2175 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2176 $(GNATLINK) -v gnatprep -o ../../gnatprep$(exeext) \
2177 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2178 $(GNATLINK) -v gnatxref -o ../../gnatxref$(exeext) \
2179 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2180 $(GNATLINK) -v gnatfind -o ../../gnatfind$(exeext) \
2181 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2182 $(GNATLINK) -v gnatname -o ../../gnatname$(exeext) \
2183 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2184 $(GNATLINK) -v gnatclean -o ../../gnatclean$(exeext) \
2185 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2187 ../../gnatdll$(exeext): ../stamp-tools
2188 $(GNATMAKE) -c $(ADA_INCLUDES) gnatdll --GCC="$(CC) $(ALL_ADAFLAGS)"
2189 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatdll
2190 $(GNATLINK) -v gnatdll -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2192 ../../vxaddr2line$(exeext): ../stamp-tools
2193 $(GNATMAKE) -c $(ADA_INCLUDES) vxaddr2line --GCC="$(CC) $(ALL_ADAFLAGS)"
2194 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) vxaddr2line
2195 $(GNATLINK) -v vxaddr2line -o $@ --GCC="$(GCC_LINK)" ../targext.o $(CLIB)
2197 gnatmake-re: ../stamp-tools
2198 $(GNATMAKE) -j0 $(ADA_INCLUDES) -u sdefault --GCC="$(CC) $(MOST_ADA_FLAGS)"
2199 $(GNATMAKE) -j0 -c $(ADA_INCLUDES) gnatmake --GCC="$(CC) $(ALL_ADAFLAGS)"
2200 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatmake
2201 $(GNATLINK) -v gnatmake -o ../../gnatmake$(exeext) \
2202 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2204 # Note the use of the "mv" command in order to allow gnatlink to be linked with
2205 # with the former version of gnatlink itself which cannot override itself.
2206 # gnatlink-re cannot be run at the same time as gnatmake-re, hence the
2207 # dependency
2208 gnatlink-re: ../stamp-tools gnatmake-re
2209 $(GNATMAKE) -j0 -c $(ADA_INCLUDES) gnatlink --GCC="$(CC) $(ALL_ADAFLAGS)"
2210 $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlink
2211 $(GNATLINK) -v gnatlink -o ../../gnatlinknew$(exeext) \
2212 --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
2213 $(MV) ../../gnatlinknew$(exeext) ../../gnatlink$(exeext)
2215 # Needs to be built with CC=gcc
2216 # Since the RTL should be built with the latest compiler, remove the
2217 # stamp target in the parent directory whenever gnat1 is rebuilt
2219 # Likewise for the tools
2220 ../../gnatmake$(exeext): b_gnatm.o $(GNATMAKE_OBJS)
2221 +$(GCC_LINK) $(ALL_CFLAGS) -o $@ b_gnatm.o $(GNATMAKE_OBJS) $(TOOLS_LIBS) $(TOOLS1_LIBS)
2223 ../../gnatlink$(exeext): b_gnatl.o $(GNATLINK_OBJS)
2224 +$(GCC_LINK) $(ALL_CFLAGS) -o $@ b_gnatl.o $(GNATLINK_OBJS) $(TOOLS_LIBS) $(TOOLS1_LIBS)
2226 ../stamp-gnatlib-$(RTSDIR):
2227 @if [ ! -f stamp-gnatlib-$(RTSDIR) ] ; \
2228 then \
2229 $(ECHO) You must first build the GNAT library: make gnatlib; \
2230 false; \
2231 else \
2232 true; \
2235 install-gcc-specs:
2236 # Install all the requested GCC spec files.
2238 for f in $(GCC_SPEC_FILES); do \
2239 $(INSTALL_DATA_DATE) $(srcdir)/ada/$$f $(libsubdir)/; \
2240 done
2242 install-gnatlib: ../stamp-gnatlib-$(RTSDIR) install-gcc-specs
2243 $(RMDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
2244 $(RMDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
2245 -$(MKDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
2246 -$(MKDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
2247 for file in $(RTSDIR)/*.ali; do \
2248 $(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
2249 done
2250 -cd $(RTSDIR); for file in *$(arext);do \
2251 $(INSTALL_DATA) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
2252 $(RANLIB_FOR_TARGET) $(DESTDIR)$(ADA_RTL_OBJ_DIR)/$$file; \
2253 done
2254 -$(foreach file, $(EXTRA_ADALIB_OBJS), \
2255 $(INSTALL_DATA_DATE) $(RTSDIR)/$(file) $(DESTDIR)$(ADA_RTL_OBJ_DIR) && \
2256 ) true
2257 # Install the shared libraries, if any, using $(INSTALL) instead
2258 # of $(INSTALL_DATA). The latter may force a mode inappropriate
2259 # for shared libraries on some targets, e.g. on HP-UX where the x
2260 # permission is required.
2261 # Also install the .dSYM directories if they exist (these directories
2262 # contain the debug information for the shared libraries on darwin)
2263 for file in gnat gnarl; do \
2264 if [ -f $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) ]; then \
2265 $(INSTALL) $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
2266 $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
2267 fi; \
2268 if [ -f $(RTSDIR)/lib$${file}$(soext) ]; then \
2269 $(LN_S) lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
2270 $(DESTDIR)$(ADA_RTL_OBJ_DIR)/lib$${file}$(soext); \
2271 fi; \
2272 if [ -d $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext).dSYM ]; then \
2273 $(CP) -r $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext).dSYM \
2274 $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
2275 fi; \
2276 done
2277 # This copy must be done preserving the date on the original file.
2278 for file in $(RTSDIR)/*.ad[sb]*; do \
2279 $(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_INCLUDE_DIR); \
2280 done
2281 cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.adb
2282 cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.ads
2284 ../stamp-gnatlib2-$(RTSDIR):
2285 $(RM) $(RTSDIR)/s-*.ali
2286 $(RM) $(RTSDIR)/s-*$(objext)
2287 $(RM) $(RTSDIR)/a-*.ali
2288 $(RM) $(RTSDIR)/a-*$(objext)
2289 $(RM) $(RTSDIR)/*.ali
2290 $(RM) $(RTSDIR)/*$(objext)
2291 $(RM) $(RTSDIR)/*$(arext)
2292 $(RM) $(RTSDIR)/*$(soext)
2293 touch ../stamp-gnatlib2-$(RTSDIR)
2294 $(RM) ../stamp-gnatlib-$(RTSDIR)
2296 ../stamp-gnatlib1-$(RTSDIR): Makefile ../stamp-gnatlib2-$(RTSDIR)
2297 $(RMDIR) $(RTSDIR)
2298 $(MKDIR) $(RTSDIR)
2299 $(CHMOD) u+w $(RTSDIR)
2300 # Copy target independent sources
2301 $(foreach f,$(ADA_INCLUDE_SRCS) $(LIBGNAT_SRCS), \
2302 $(LN_S) $(fsrcpfx)ada/$(f) $(RTSDIR) ;) true
2303 # Remove files not used
2304 $(RM) $(patsubst %,$(RTSDIR)/%,$(ADA_EXCLUDE_FILES))
2305 # Remove files to be replaced by target dependent sources
2306 $(RM) $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
2307 $(RTSDIR)/$(word 1,$(subst <, ,$(PAIR))))
2308 for f in $(RTSDIR)/*-*__*.ads $(RTSDIR)/*-*__*.adb; do \
2309 case "$$f" in \
2310 $(RTSDIR)/s-stratt__*) ;; \
2311 *) $(RM) $$f ;; \
2312 esac; \
2313 done
2314 # Copy new target dependent sources
2315 $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
2316 $(LN_S) $(fsrcpfx)ada/$(word 2,$(subst <, ,$(PAIR))) \
2317 $(RTSDIR)/$(word 1,$(subst <, ,$(PAIR)));)
2318 # Copy tsystem.h
2319 $(CP) $(srcdir)/tsystem.h $(RTSDIR)
2320 $(RM) ../stamp-gnatlib-$(RTSDIR)
2321 touch ../stamp-gnatlib1-$(RTSDIR)
2323 # GCC_FOR_TARGET has paths relative to the gcc directory, so we need to adjust
2324 # for running it from ada/rts
2326 OSCONS_CC=$(subst ./xgcc,../../xgcc,$(subst -B./, -B../../,$(GCC_FOR_TARGET)))
2328 # The main ada source directory must be on the include path for #include "..."
2329 # because s-oscons-tmplt.c requires adaint.h, gsocket.h, and any file included
2330 # by these headers. However note that we must use -iquote, not -I, so that
2331 # ada/types.h does not conflict with a same-named system header (VxWorks
2332 # has a <types.h> header).
2334 OSCONS_CPP=$(OSCONS_CC) $(GNATLIBCFLAGS) $(GNATLIBCFLAGS_FOR_C) -E -C \
2335 -DTARGET=\"$(target)\" -iquote $(fsrcpfx)ada $(fsrcpfx)ada/s-oscons-tmplt.c > s-oscons-tmplt.i
2336 OSCONS_EXTRACT=$(OSCONS_CC) -S s-oscons-tmplt.i
2338 # Note: if you need to build with a non-GNU compiler, you could adapt the
2339 # following definitions (written for VMS DEC-C)
2340 #OSCONS_CPP=../../../$(DECC) -E /comment=as_is -DNATIVE \
2341 # -DTARGET='""$(target)""' -I$(OSCONS_SRCDIR) s-oscons-tmplt.c
2343 #OSCONS_EXTRACT=../../../$(DECC) -DNATIVE \
2344 # -DTARGET='""$(target)""' -I$(OSCONS_SRCDIR) s-oscons-tmplt.c ; \
2345 # ld -o s-oscons-tmplt.exe s-oscons-tmplt.obj; \
2346 # ./s-oscons-tmplt.exe > s-oscons-tmplt.s
2348 ./bldtools/oscons/xoscons: xoscons.adb xutil.ads xutil.adb
2349 -$(MKDIR) ./bldtools/oscons
2350 $(RM) $(addprefix ./bldtools/oscons/,$(notdir $^))
2351 $(CP) $^ ./bldtools/oscons
2352 (cd ./bldtools/oscons ; gnatmake -q xoscons)
2354 $(RTSDIR)/s-oscons.ads: ../stamp-gnatlib1-$(RTSDIR) s-oscons-tmplt.c gsocket.h ./bldtools/oscons/xoscons
2355 $(RM) $(RTSDIR)/s-oscons-tmplt.i $(RTSDIR)/s-oscons-tmplt.s
2356 (cd $(RTSDIR) ; \
2357 $(OSCONS_CPP) ; \
2358 $(OSCONS_EXTRACT) ; \
2359 ../bldtools/oscons/xoscons s-oscons)
2361 gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../stamp-gnatlib2-$(RTSDIR) $(RTSDIR)/s-oscons.ads
2362 test -f $(RTSDIR)/s-oscons.ads || exit 1
2363 # C files
2364 $(MAKE) -C $(RTSDIR) \
2365 CC="`echo \"$(GCC_FOR_TARGET)\" \
2366 | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \
2367 INCLUDES="$(INCLUDES_FOR_SUBDIR) -I./../.." \
2368 CFLAGS="$(GNATLIBCFLAGS_FOR_C)" \
2369 FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \
2370 srcdir=$(fsrcdir) \
2371 -f ../Makefile $(LIBGNAT_OBJS) $(EXTRA_ADALIB_OBJS)
2372 # Ada files
2373 $(MAKE) -C $(RTSDIR) \
2374 CC="`echo \"$(GCC_FOR_TARGET)\" \
2375 | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \
2376 ADA_INCLUDES="" \
2377 CFLAGS="$(GNATLIBCFLAGS)" \
2378 ADAFLAGS="$(GNATLIBFLAGS)" \
2379 FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \
2380 srcdir=$(fsrcdir) \
2381 -f ../Makefile $(GNATRTL_OBJS)
2382 $(RM) $(RTSDIR)/libgnat$(arext) $(RTSDIR)/libgnarl$(arext)
2383 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgnat$(arext) \
2384 $(addprefix $(RTSDIR)/,$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS))
2385 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgnat$(arext)
2386 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgnarl$(arext) \
2387 $(addprefix $(RTSDIR)/,$(GNATRTL_TASKING_OBJS))
2388 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgnarl$(arext)
2389 ifeq ($(GMEM_LIB),gmemlib)
2390 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgmem$(arext) \
2391 $(RTSDIR)/memtrack.o
2392 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgmem$(arext)
2393 endif
2394 $(CHMOD) a-wx $(RTSDIR)/*.ali
2395 touch ../stamp-gnatlib-$(RTSDIR)
2397 # Warning: this target assumes that LIBRARY_VERSION has been set correctly.
2398 gnatlib-shared-default:
2399 $(MAKE) $(FLAGS_TO_PASS) \
2400 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2401 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(PICFLAG_FOR_TARGET)" \
2402 GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C) $(PICFLAG_FOR_TARGET)" \
2403 MULTISUBDIR="$(MULTISUBDIR)" \
2404 THREAD_KIND="$(THREAD_KIND)" \
2405 gnatlib
2406 $(RM) $(RTSDIR)/libgna*$(soext)
2407 cd $(RTSDIR); `echo "$(GCC_FOR_TARGET)" \
2408 | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'` -shared $(GNATLIBCFLAGS) \
2409 $(PICFLAG_FOR_TARGET) \
2410 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2411 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
2412 $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2413 $(MISCLIB) -lm
2414 cd $(RTSDIR); `echo "$(GCC_FOR_TARGET)" \
2415 | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'` -shared $(GNATLIBCFLAGS) \
2416 $(PICFLAG_FOR_TARGET) \
2417 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2418 $(GNATRTL_TASKING_OBJS) \
2419 $(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2420 $(THREADSLIB)
2421 cd $(RTSDIR); $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2422 libgnat$(soext)
2423 cd $(RTSDIR); $(LN_S) libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2424 libgnarl$(soext)
2426 # Create static libgnat and libgnarl compiled with -fPIC
2427 $(RM) $(RTSDIR)/libgnat_pic$(arext) $(RTSDIR)/libgnarl_pic$(arext)
2428 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgnat_pic$(arext) \
2429 $(addprefix $(RTSDIR)/,$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS))
2430 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgnat_pic$(arext)
2431 $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgnarl_pic$(arext) \
2432 $(addprefix $(RTSDIR)/,$(GNATRTL_TASKING_OBJS))
2433 $(RANLIB_FOR_TARGET) $(RTSDIR)/libgnarl_pic$(arext)
2436 gnatlib-shared-dual:
2437 $(MAKE) $(FLAGS_TO_PASS) \
2438 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2439 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2440 GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \
2441 MULTISUBDIR="$(MULTISUBDIR)" \
2442 THREAD_KIND="$(THREAD_KIND)" \
2443 gnatlib-shared-default
2444 $(MV) $(RTSDIR)/libgna*$(soext) .
2445 $(MV) $(RTSDIR)/libgnat_pic$(arext) .
2446 $(MV) $(RTSDIR)/libgnarl_pic$(arext) .
2447 $(RM) ../stamp-gnatlib2-$(RTSDIR)
2448 $(MAKE) $(FLAGS_TO_PASS) \
2449 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2450 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2451 GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \
2452 MULTISUBDIR="$(MULTISUBDIR)" \
2453 THREAD_KIND="$(THREAD_KIND)" \
2454 gnatlib
2455 $(MV) libgna*$(soext) $(RTSDIR)
2456 $(MV) libgnat_pic$(arext) $(RTSDIR)
2457 $(MV) libgnarl_pic$(arext) $(RTSDIR)
2459 gnatlib-shared-dual-win32:
2460 $(MAKE) $(FLAGS_TO_PASS) \
2461 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2462 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2463 GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \
2464 PICFLAG_FOR_TARGET="$(PICFLAG_FOR_TARGET)" \
2465 MULTISUBDIR="$(MULTISUBDIR)" \
2466 THREAD_KIND="$(THREAD_KIND)" \
2467 gnatlib-shared-win32
2468 $(MV) $(RTSDIR)/libgna*$(soext) .
2469 $(RM) ../stamp-gnatlib2-$(RTSDIR)
2470 $(MAKE) $(FLAGS_TO_PASS) \
2471 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2472 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2473 GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \
2474 MULTISUBDIR="$(MULTISUBDIR)" \
2475 THREAD_KIND="$(THREAD_KIND)" \
2476 gnatlib
2477 $(MV) libgna*$(soext) $(RTSDIR)
2479 # ??? we need to add the option to support auto-import of arrays/records to
2480 # the GNATLIBFLAGS when this will be supported by GNAT. At this point we will
2481 # use the gnatlib-shared-dual-win32 target to build the GNAT runtimes on
2482 # Windows.
2483 gnatlib-shared-win32:
2484 $(MAKE) $(FLAGS_TO_PASS) \
2485 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2486 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(PICFLAG_FOR_TARGET)" \
2487 GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C) $(PICFLAG_FOR_TARGET)" \
2488 MULTISUBDIR="$(MULTISUBDIR)" \
2489 THREAD_KIND="$(THREAD_KIND)" \
2490 gnatlib
2491 $(RM) $(RTSDIR)/libgna*$(soext)
2492 $(CP) $(RTSDIR)/libgnat$(arext) $(RTSDIR)/libgnat_pic$(arext)
2493 $(CP) $(RTSDIR)/libgnarl$(arext) $(RTSDIR)/libgnarl_pic$(arext)
2494 cd $(RTSDIR); `echo "$(GCC_FOR_TARGET)" \
2495 | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'` -shared -shared-libgcc \
2496 $(PICFLAG_FOR_TARGET) \
2497 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2498 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
2499 $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) $(MISCLIB)
2500 cd $(RTSDIR); `echo "$(GCC_FOR_TARGET)" \
2501 | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'` -shared -shared-libgcc \
2502 $(PICFLAG_FOR_TARGET) \
2503 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2504 $(GNATRTL_TASKING_OBJS) \
2505 $(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2506 $(THREADSLIB) -Wl,libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)
2508 gnatlib-shared-darwin:
2509 $(MAKE) $(FLAGS_TO_PASS) \
2510 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2511 GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(PICFLAG_FOR_TARGET)" \
2512 GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C) $(PICFLAG_FOR_TARGET) -fno-common" \
2513 MULTISUBDIR="$(MULTISUBDIR)" \
2514 THREAD_KIND="$(THREAD_KIND)" \
2515 gnatlib
2516 $(RM) $(RTSDIR)/libgnat$(soext) $(RTSDIR)/libgnarl$(soext)
2517 $(CP) $(RTSDIR)/libgnat$(arext) $(RTSDIR)/libgnat_pic$(arext)
2518 $(CP) $(RTSDIR)/libgnarl$(arext) $(RTSDIR)/libgnarl_pic$(arext)
2519 cd $(RTSDIR); `echo "$(GCC_FOR_TARGET)" \
2520 | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'` -dynamiclib $(PICFLAG_FOR_TARGET) \
2521 -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2522 $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
2523 $(SO_OPTS) \
2524 -Wl,-install_name,@rpath/libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2525 $(MISCLIB)
2526 cd $(RTSDIR); `echo "$(GCC_FOR_TARGET)" \
2527 | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'` -dynamiclib $(PICFLAG_FOR_TARGET) \
2528 -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2529 $(GNATRTL_TASKING_OBJS) \
2530 $(SO_OPTS) \
2531 -Wl,-install_name,@rpath/libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2532 $(THREADSLIB) -Wl,libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)
2533 cd $(RTSDIR); $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
2534 libgnat$(soext)
2535 cd $(RTSDIR); $(LN_S) libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
2536 libgnarl$(soext)
2537 cd $(RTSDIR); dsymutil libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)
2538 cd $(RTSDIR); dsymutil libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext)
2540 gnatlib-shared:
2541 $(MAKE) $(FLAGS_TO_PASS) \
2542 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2543 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2544 GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \
2545 MULTISUBDIR="$(MULTISUBDIR)" \
2546 THREAD_KIND="$(THREAD_KIND)" \
2547 PICFLAG_FOR_TARGET="$(PICFLAG_FOR_TARGET)" \
2548 $(GNATLIB_SHARED)
2550 # When building a SJLJ runtime for VxWorks, we need to ensure that the extra
2551 # linker options needed for ZCX are not passed to prevent the inclusion of
2552 # useless objects and potential troubles from the presence of extra symbols
2553 # and references in some configurations. The inhibition is performed by
2554 # commenting the pragma instead of deleting the line, as the latter might
2555 # result in getting multiple blank lines, hence possible style check errors.
2556 gnatlib-sjlj:
2557 $(MAKE) $(FLAGS_TO_PASS) EH_MECHANISM="" \
2558 THREAD_KIND="$(THREAD_KIND)" ../stamp-gnatlib1-$(RTSDIR)
2559 sed \
2560 -e 's/Frontend_Exceptions.*/Frontend_Exceptions : constant Boolean := True;/' \
2561 -e 's/ZCX_By_Default.*/ZCX_By_Default : constant Boolean := False;/' \
2562 -e 's/\(pragma Linker.*crtbe.*\)/-- \1/' \
2563 $(RTSDIR)/system.ads > $(RTSDIR)/s.ads
2564 $(MV) $(RTSDIR)/s.ads $(RTSDIR)/system.ads
2565 $(MAKE) $(FLAGS_TO_PASS) \
2566 EH_MECHANISM="" \
2567 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2568 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2569 GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \
2570 FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \
2571 MULTISUBDIR="$(MULTISUBDIR)" \
2572 THREAD_KIND="$(THREAD_KIND)" \
2573 PICFLAG_FOR_TARGET="$(PICFLAG_FOR_TARGET)" gnatlib
2575 gnatlib-zcx:
2576 $(MAKE) $(FLAGS_TO_PASS) EH_MECHANISM="-gcc" \
2577 THREAD_KIND="$(THREAD_KIND)" ../stamp-gnatlib1-$(RTSDIR)
2578 sed \
2579 -e 's/Frontend_Exceptions.*/Frontend_Exceptions : constant Boolean := False;/' \
2580 -e 's/ZCX_By_Default.*/ZCX_By_Default : constant Boolean := True;/' \
2581 $(RTSDIR)/system.ads > $(RTSDIR)/s.ads
2582 $(MV) $(RTSDIR)/s.ads $(RTSDIR)/system.ads
2583 $(MAKE) $(FLAGS_TO_PASS) \
2584 EH_MECHANISM="-gcc" \
2585 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
2586 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
2587 GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \
2588 FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \
2589 MULTISUBDIR="$(MULTISUBDIR)" \
2590 THREAD_KIND="$(THREAD_KIND)" \
2591 PICFLAG_FOR_TARGET="$(PICFLAG_FOR_TARGET)" gnatlib
2593 # Compiling object files from source files.
2595 # Note that dependencies on obstack.h are not written
2596 # because that file is not part of GCC.
2597 # Dependencies on gvarargs.h are not written
2598 # because all that file does, when not compiling with GCC,
2599 # is include the system varargs.h.
2601 b_gnatl.adb : $(GNATLINK_OBJS)
2602 $(GNATBIND) $(ADA_INCLUDES) -o b_gnatl.adb gnatlink.ali
2604 b_gnatl.o : b_gnatl.adb
2605 $(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) -gnatws -gnatyN \
2606 $< $(OUTPUT_OPTION)
2608 b_gnatm.adb : $(GNATMAKE_OBJS)
2609 $(GNATBIND) $(ADA_INCLUDES) -o b_gnatm.adb gnatmake.ali
2611 b_gnatm.o : b_gnatm.adb
2612 $(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) -gnatws -gnatyN \
2613 $< $(OUTPUT_OPTION)
2615 ADA_INCLUDE_DIR = $(libsubdir)/adainclude
2616 ADA_RTL_OBJ_DIR = $(libsubdir)/adalib
2618 # Special flags
2620 # force no sibling call optimization on s-traceb.o so the number of stack
2621 # frames to be skipped when computing a call chain is not modified by
2622 # optimization. We don't want inlining, either.
2624 s-traceb.o : s-traceb.adb s-traceb.ads
2625 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) $(NO_INLINE_ADAFLAGS) \
2626 $(NO_SIBLING_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
2628 # compile s-tasdeb.o without optimization and with debug info so that it is
2629 # always possible to set conditional breakpoints on tasks.
2631 s-tasdeb.o : s-tasdeb.adb s-tasdeb.ads
2632 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 $(ADA_INCLUDES) \
2633 $< $(OUTPUT_OPTION)
2635 # force no function reordering on a-except.o because of the exclusion bounds
2636 # mechanism (see the source file for more detailed information).
2637 # force debugging information on a-except.o so that it is always
2638 # possible to set conditional breakpoints on exceptions.
2639 # use -O1 otherwise gdb isn't able to get a full backtrace on mips targets.
2641 a-except.o : a-except.adb a-except.ads
2642 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) $(NO_INLINE_ADAFLAGS) \
2643 $(NO_REORDER_ADAFLAGS) -O1 $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
2645 # compile s-excdeb.o without optimization and with debug info to let the
2646 # debugger set breakpoints and inspect subprogram parameters on exception
2647 # related events.
2649 s-excdeb.o : s-excdeb.adb s-excdeb.ads s-except.ads
2650 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 $(ADA_INCLUDES) \
2651 $< $(OUTPUT_OPTION)
2653 # force debugging information on s-assert.o so that it is always
2654 # possible to set breakpoint on assert failures.
2656 s-assert.o : s-assert.adb s-assert.ads
2657 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) $(ADA_INCLUDES) \
2658 $< $(OUTPUT_OPTION)
2660 # force debugging information on a-tags.o so that the debugger can find
2661 # the description of Ada.Tags.Type_Specific_Data.
2663 a-tags.o : a-tags.adb a-tags.ads
2664 $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) $(ADA_INCLUDES) \
2665 $< $(OUTPUT_OPTION)
2667 # force no sibling call optimization on s-memory.o to avoid turning the
2668 # tail recursion in Alloc into a loop that confuses branch prediction.
2670 s-memory.o : s-memory.adb s-memory.ads
2671 $(CC) -c $(ALL_ADAFLAGS) $(NO_SIBLING_ADAFLAGS) $(ADA_INCLUDES) \
2672 $< $(OUTPUT_OPTION)
2674 # need to keep the frame pointer in tracebak.o to pop the stack properly on
2675 # some targets.
2677 tracebak.o : tracebak.c tb-gcc.c
2678 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) \
2679 $(INCLUDES) $(NO_OMIT_ADAFLAGS) $< $(OUTPUT_OPTION)
2681 adadecode.o : adadecode.c adadecode.h
2682 aux-io.o : aux-io.c
2683 argv.o : argv.c
2684 cal.o : cal.c
2685 deftarg.o : deftarg.c
2686 errno.o : errno.c
2687 exit.o : adaint.h exit.c
2688 expect.o : expect.c
2689 final.o : final.c
2690 rtfinal.o : rtfinal.c
2691 rtinit.o : rtinit.c
2692 locales.o : locales.c
2693 mkdir.o : mkdir.c
2694 socket.o : socket.c gsocket.h
2695 sysdep.o : sysdep.c
2696 raise.o : raise.c raise.h
2697 sigtramp-armdroid.o : sigtramp-armdroid.c sigtramp.h
2698 sigtramp-armvxworks.o : sigtramp-armvxworks.c sigtramp.h
2699 sigtramp-ios.o : sigtramp-ios.c sigtramp.h
2700 sigtramp-vxworks.o : sigtramp-vxworks.c $(VX_SIGTRAMP_EXTRA_SRCS)
2701 sigtramp-vxworks-vxsim.o : sigtramp-vxworks-vxsim.c $(VX_SIGTRAMP_EXTRA_SRCS)
2702 terminals.o : terminals.c
2703 vx_stack_info.o : vx_stack_info.c
2705 raise-gcc.o : raise-gcc.c raise.h
2706 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
2707 -iquote $(srcdir) -iquote $(ftop_srcdir)/libgcc \
2708 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2710 cio.o : cio.c
2711 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
2712 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2714 init.o : init.c adaint.h raise.h
2715 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
2716 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2718 vx_crtbegin.o : vx_crtbegin.c vx_crtbegin.inc
2719 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
2720 -iquote $(srcdir) -iquote $(ftop_srcdir)/libgcc \
2721 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2723 vx_crtbegin_auto.o : vx_crtbegin_auto.c vx_crtbegin.inc
2724 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
2725 -iquote $(srcdir) -iquote $(ftop_srcdir)/libgcc \
2726 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2728 vx_crtend.o : vx_crtend.c
2729 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
2730 -iquote $(srcdir) -iquote $(ftop_srcdir)/libgcc \
2731 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2733 init-vxsim.o : init-vxsim.c
2734 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
2735 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2737 initialize.o : initialize.c raise.h
2738 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
2739 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
2741 link.o : link.c
2742 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
2743 $(ALL_CPPFLAGS) $(INCLUDES_FOR_SUBDIR) \
2744 $< $(OUTPUT_OPTION)
2746 targext.o : targext.c
2747 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
2748 -iquote $(srcdir) \
2749 $(ALL_CPPFLAGS) $(INCLUDES_FOR_SUBDIR) \
2750 $< $(OUTPUT_OPTION)
2752 # In GNU Make, ignore whether `stage*' exists.
2753 .PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap
2754 .PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4
2756 force: