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