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