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