sdefault.o snames.o stylesw.o switch.o system.o table.o targparm.o tree_io.o \
types.o validsw.o widechar.o
-GNATMAKE_OBJS = a-except.o ali.o ali-util.o s-casuti.o \
+GNATMAKE_OBJS = a-except.o ali.o ali-util.o aspects.o s-casuti.o \
alloc.o atree.o binderr.o butil.o casing.o csets.o debug.o elists.o einfo.o\
erroutc.o errutil.o err_vars.o fmap.o fname.o fname-uf.o fname-sf.o \
gnatmake.o gnatvsn.o hostparm.o interfac.o i-c.o i-cstrin.o krunch.o lib.o \
THREADSLIB = -lmarte
else
LIBGNAT_TARGET_PAIRS += \
+ a-exetim.adb<a-exetim-posix.adb \
+ a-exetim.ads<a-exetim-default.ads \
s-linux.ads<s-linux.ads \
s-osinte.adb<s-osinte-posix.adb
EH_MECHANISM=-gcc
endif
- THREADSLIB = -lpthread
+ THREADSLIB = -lpthread -lrt
EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
- EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
+ EXTRA_GNATRTL_TASKING_OBJS=s-linux.o a-exetim.o
endif
TOOLS_TARGET_PAIRS = \
GMEM_LIB = gmemlib
EH_MECHANISM=-gcc
GNATLIB_SHARED=gnatlib-shared-vms
- ifeq ($(strip $(filter-out alpha64 dec vms% openvms% alphavms%,$(targ))),)
- EXTRA_LIBGNAT_SRCS=vmshandler.asm
- EXTRA_LIBGNAT_OBJS=vmshandler.o
- endif
EXTRA_LIBGNAT_SRCS+=adamsg.msg
EXTRA_LIBGNAT_OBJS+=adamsg.o
EXTRA_GNATRTL_TASKING_OBJS=s-tpopde.o
ifeq ($(strip $(filter-out powerpc% linux%,$(arch) $(osys))),)
LIBGNAT_TARGET_PAIRS_COMMON = \
+ a-exetim.adb<a-exetim-posix.adb \
+ a-exetim.ads<a-exetim-default.ads \
a-intnam.ads<a-intnam-linux.ads \
s-inmaop.adb<s-inmaop-posix.adb \
s-intman.adb<s-intman-posix.adb \
s-linux.ads<s-linux.ads \
s-osinte.adb<s-osinte-posix.adb \
- s-osinte.ads<s-osinte-linux.ads \
- s-osprim.adb<s-osprim-posix.adb \
- s-taprop.adb<s-taprop-linux.adb \
- s-tasinf.ads<s-tasinf-linux.ads \
- s-tasinf.adb<s-tasinf-linux.adb \
- s-taspri.ads<s-taspri-posix-noaltstack.ads \
s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
g-sercom.adb<g-sercom-linux.adb \
$(ATOMICS_TARGET_PAIRS)
- LIBGNAT_TARGET_PAIRS_32 = \
- system.ads<system-linux-ppc.ads
-
- LIBGNAT_TARGET_PAIRS_64 = \
- system.ads<system-linux-ppc64.ads
-
- ifeq ($(strip $(shell $(GCC_FOR_TARGET) $(GNATLIBCFLAGS) -print-multi-os-directory)),../lib64)
- LIBGNAT_TARGET_PAIRS = \
- $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
- else
+ ifeq ($(strip $(filter-out xenomai,$(THREAD_KIND))),)
LIBGNAT_TARGET_PAIRS = \
- $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
- endif
+ $(LIBGNAT_TARGET_PAIRS_COMMON)
- ifeq ($(strip $(filter-out xenomai,$(THREAD_KIND))),)
LIBGNAT_TARGET_PAIRS += \
s-osinte.ads<s-osinte-linux-xenomai.ads \
s-osprim.adb<s-osprim-linux-xenomai.adb \
s-taspri.ads<s-taspri-linux-xenomai.ads \
system.ads<system-linux-ppc-xenomai.ads
else
+ LIBGNAT_TARGET_PAIRS_32 = \
+ system.ads<system-linux-ppc.ads
+
+ LIBGNAT_TARGET_PAIRS_64 = \
+ system.ads<system-linux-ppc64.ads
+
+ ifeq ($(strip $(shell $(GCC_FOR_TARGET) $(GNATLIBCFLAGS) -print-multi-os-directory)),../lib64)
+ LIBGNAT_TARGET_PAIRS = \
+ $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
+ else
+ LIBGNAT_TARGET_PAIRS = \
+ $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
+ endif
+
LIBGNAT_TARGET_PAIRS += \
s-osinte.ads<s-osinte-linux.ads \
s-osprim.adb<s-osprim-posix.adb \
s-taprop.adb<s-taprop-linux.adb \
s-tasinf.ads<s-tasinf-linux.ads \
s-tasinf.adb<s-tasinf-linux.adb \
- s-taspri.ads<s-taspri-posix-noaltstack.ads \
- system.ads<system-linux-ppc.ads
+ s-taspri.ads<s-taspri-posix-noaltstack.ads
endif
TOOLS_TARGET_PAIRS = \
mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
indepsw.adb<indepsw-gnu.adb
- EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
+ EXTRA_GNATRTL_TASKING_OBJS=s-linux.o a-exetim.o
EH_MECHANISM=-gcc
- THREADSLIB = -lpthread
+ THREADSLIB = -lpthread -lrt
GNATLIB_SHARED = gnatlib-shared-dual
GMEM_LIB = gmemlib
LIBRARY_VERSION := $(LIB_VERSION)
ifeq ($(strip $(filter-out %ia64 linux%,$(arch) $(osys))),)
LIBGNAT_TARGET_PAIRS = \
+ a-exetim.adb<a-exetim-posix.adb \
+ a-exetim.ads<a-exetim-default.ads \
a-intnam.ads<a-intnam-linux.ads \
a-numaux.ads<a-numaux-libc-x86.ads \
s-inmaop.adb<s-inmaop-posix.adb \
mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
indepsw.adb<indepsw-gnu.adb
- EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
+ EXTRA_GNATRTL_TASKING_OBJS=s-linux.o a-exetim.o
EH_MECHANISM=-gcc
MISCLIB=
- THREADSLIB=-lpthread
+ THREADSLIB=-lpthread -lrt
GNATLIB_SHARED=gnatlib-shared-dual
GMEM_LIB = gmemlib
LIBRARY_VERSION := $(LIB_VERSION)
ifeq ($(strip $(filter-out %x86_64 linux%,$(arch) $(osys))),)
LIBGNAT_TARGET_PAIRS = \
+ a-exetim.adb<a-exetim-posix.adb \
+ a-exetim.ads<a-exetim-default.ads \
a-intnam.ads<a-intnam-linux.ads \
a-numaux.adb<a-numaux-x86.adb \
a-numaux.ads<a-numaux-x86.ads \
indepsw.adb<indepsw-gnu.adb
EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
- EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
+ EXTRA_GNATRTL_TASKING_OBJS=s-linux.o a-exetim.o
EH_MECHANISM=-gcc
- THREADSLIB=-lpthread
+ THREADSLIB=-lpthread -lrt
GNATLIB_SHARED=gnatlib-shared-dual
GMEM_LIB = gmemlib
LIBRARY_VERSION := $(LIB_VERSION)
endif
ifeq ($(strip $(filter-out darwin%,$(osys))),)
+ SO_OPTS = -Wl,-flat_namespace -shared-libgcc
ifeq ($(strip $(filter-out %86,$(arch))),)
LIBGNAT_TARGET_PAIRS = \
a-intnam.ads<a-intnam-darwin.ads \
ifeq ($(strip $(MULTISUBDIR)),/x86_64)
LIBGNAT_TARGET_PAIRS += \
system.ads<system-darwin-x86_64.ads
+ SO_OPTS += -m64
else
LIBGNAT_TARGET_PAIRS += \
system.ads<system-darwin-x86.ads
s-taprop.adb<s-taprop-posix.adb \
s-taspri.ads<s-taspri-posix.ads \
s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
- a-numaux.ads<a-numaux-x86.ads \
- a-numaux.adb<a-numaux-x86.adb \
g-trasym.ads<g-trasym-unimplemented.ads \
g-trasym.adb<g-trasym-unimplemented.adb \
- system.ads<system-darwin-x86_64.ads \
+ a-numaux.ads<a-numaux-x86.ads \
+ a-numaux.adb<a-numaux-x86.adb \
$(ATOMICS_TARGET_PAIRS)
+ ifeq ($(strip $(MULTISUBDIR)),/i386)
+ LIBGNAT_TARGET_PAIRS += \
+ system.ads<system-darwin-x86.ads
+ SO_OPTS += -m32
+ else
+ LIBGNAT_TARGET_PAIRS += \
+ system.ads<system-darwin-x86_64.ads
+ endif
endif
ifeq ($(strip $(filter-out powerpc%,$(arch))),)
a-numaux.ads<a-numaux-darwin.ads \
a-numaux.adb<a-numaux-darwin.adb \
g-trasym.ads<g-trasym-unimplemented.ads \
- g-trasym.adb<g-trasym-unimplemented.adb \
- system.ads<system-darwin-ppc.ads
+ g-trasym.adb<g-trasym-unimplemented.adb
+ ifeq ($(strip $(MULTISUBDIR)),/ppc64)
+ LIBGNAT_TARGET_PAIRS += \
+ system.ads<system-darwin-ppc64.ads
+ SO_OPTS += -m64
+ else
+ LIBGNAT_TARGET_PAIRS += \
+ system.ads<system-darwin-ppc.ads
+ endif
endif
TOOLS_TARGET_PAIRS = \
EH_MECHANISM=-gcc
GNATLIB_SHARED = gnatlib-shared-darwin
- SO_OPTS = -Wl,-flat_namespace -shared-libgcc
RANLIB = ranlib -c
GMEM_LIB = gmemlib
LIBRARY_VERSION := $(LIB_VERSION)
LIBGNAT_SRCS = adadecode.c adadecode.h adaint.c adaint.h \
argv.c cio.c cstreams.c errno.c exit.c cal.c ctrl_c.c env.c env.h \
arit64.c raise.h raise.c sysdep.c aux-io.c init.c initialize.c \
- seh_init.c final.c tracebak.c tb-alvms.c tb-alvxw.c tb-gcc.c \
- expect.c mkdir.c socket.c gsocket.h targext.c $(EXTRA_LIBGNAT_SRCS)
+ locales.c seh_init.c final.c tracebak.c tb-alvms.c tb-alvxw.c \
+ tb-gcc.c expect.c mkdir.c socket.c gsocket.h targext.c $(EXTRA_LIBGNAT_SRCS)
LIBGNAT_OBJS = adadecode.o adaint.o argv.o cio.o cstreams.o ctrl_c.o \
errno.o exit.o env.o raise.o sysdep.o aux-io.o init.o initialize.o \
- seh_init.o cal.o arit64.o final.o tracebak.o expect.o mkdir.o \
- socket.o targext.o $(EXTRA_LIBGNAT_OBJS)
+ locales.o seh_init.o cal.o arit64.o final.o tracebak.o expect.o \
+ mkdir.o socket.o targext.o $(EXTRA_LIBGNAT_OBJS)
# NOTE ??? - when the -I option for compiling Ada code is made to work,
# the library installation will change and there will be a
$(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
$(LN_S) $(fsrcpfx)ada/$(word 2,$(subst <, ,$(PAIR))) \
$(RTSDIR)/$(word 1,$(subst <, ,$(PAIR)));)
-# Copy generated target dependent sources
- $(RM) $(RTSDIR)/s-oscons.ads
- (cd $(RTSDIR); $(LN_S) ../s-oscons.ads s-oscons.ads)
+# Copy tsystem.h
+ $(CP) $(srcdir)/tsystem.h $(RTSDIR)
$(RM) ../stamp-gnatlib-$(RTSDIR)
touch ../stamp-gnatlib1-$(RTSDIR)
# GNULLI End #############################################################
+ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(subst -, ,$(host)))),)
+OSCONS_CPP=../../$(DECC) -E /comment=as_is -DNATIVE \
+ -DTARGET='""$(target)""' $(fsrcpfx)ada/s-oscons-tmplt.c
+
+OSCONS_EXTRACT=../../$(DECC) -DNATIVE \
+ -DTARGET='""$(target)""' $(fsrcpfx)ada/s-oscons-tmplt.c ; \
+ ld -o s-oscons-tmplt.exe s-oscons-tmplt.obj; \
+ ./s-oscons-tmplt.exe > s-oscons-tmplt.s
+
+else
+# GCC_FOR_TARGET has paths relative to the gcc directory, so we need to adjust
+# for running it from $(RTSDIR)
+OSCONS_CC=`echo "$(GCC_FOR_TARGET)" \
+ | sed -e 's^\./xgcc^../../xgcc^' -e 's^-B./^-B../../^'`
+OSCONS_CPP=$(OSCONS_CC) $(GNATLIBCFLAGS) -E -C \
+ -DTARGET=\"$(target)\" $(fsrcpfx)ada/s-oscons-tmplt.c > s-oscons-tmplt.i
+OSCONS_EXTRACT=$(OSCONS_CC) -S s-oscons-tmplt.i
+endif
+
+./bldtools/oscons/xoscons: xoscons.adb xutil.ads xutil.adb
+ -$(MKDIR) ./bldtools/oscons
+ $(RM) $(addprefix ./bldtools/oscons/,$(notdir $^))
+ $(CP) $^ ./bldtools/oscons
+ (cd ./bldtools/oscons ; gnatmake -q xoscons)
+
+$(RTSDIR)/s-oscons.ads: ../stamp-gnatlib1-$(RTSDIR) s-oscons-tmplt.c gsocket.h ./bldtools/oscons/xoscons
+ $(RM) $(RTSDIR)/s-oscons-tmplt.i $(RTSDIR)/s-oscons-tmplt.s
+ (cd $(RTSDIR) ; \
+ $(OSCONS_CPP) ; \
+ $(OSCONS_EXTRACT) ; \
+ ../bldtools/oscons/xoscons)
+
# Don't use semicolon separated shell commands that involve list expansions.
# The semicolon triggers a call to DCL on VMS and DCL can't handle command
# line lengths in excess of 256 characters.
# Example: cd $(RTSDIR); ar rc libfoo.a $(LONG_LIST_OF_OBJS)
# is guaranteed to overflow the buffer.
-gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../stamp-gnatlib2-$(RTSDIR)
+gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../stamp-gnatlib2-$(RTSDIR) $(RTSDIR)/s-oscons.ads
$(MAKE) -C $(RTSDIR) \
CC="`echo \"$(GCC_FOR_TARGET)\" \
| sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \
THREAD_KIND="$(THREAD_KIND)" \
gnatlib
$(RM) $(RTSDIR)/libgna*$(soext)
- cd $(RTSDIR); ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
+ cd $(RTSDIR); ../../xgcc -B../../ -shared -shared-libgcc \
+ $(TARGET_LIBGCC2_CFLAGS) \
-o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
$(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) $(MISCLIB)
- cd $(RTSDIR); ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
+ cd $(RTSDIR); ../../xgcc -B../../ -shared -shared-libgcc \
+ $(TARGET_LIBGCC2_CFLAGS) \
-o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
$(GNATRTL_TASKING_OBJS) \
$(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
$< $(OUTPUT_OPTION)
# force no function reordering on a-except.o because of the exclusion bounds
-# mechanism (see the source file for more detailed information). However we
-# can do that only when building the runtime (not the compiler) because the
-# -fno-toplevel-reorder option exists only in GCC 4.2 and above.
+# mechanism (see the source file for more detailed information).
-ifneq (,$(findstring xgcc,$(CC)))
NO_REORDER_ADAFLAGS=-fno-toplevel-reorder
-else
-NO_REORDER_ADAFLAGS=
-endif
# force debugging information on a-except.o so that it is always
# possible to set conditional breakpoints on exceptions.
exit.o : adaint.h exit.c
expect.o : expect.c
final.o : final.c
-gmem.o : gmem.c
link.o : link.c
+locales.o : locales.c
mkdir.o : mkdir.c
socket.o : socket.c gsocket.h
sysdep.o : sysdep.c