# Top level -*- makefile -*- fragment for GNU Ada (GNAT).
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
# Free Software Foundation, Inc.
#This file is part of GCC.
ADA_TREE_H = ada/gcc-interface/ada-tree.h
-# force debugging information on s-tasdeb.o so that it is always
-# possible to set conditional breakpoints on tasks.
+# Special flags - see gcc-interface/Makefile.in for the template
+
+ada/s-traceb.o : ada/s-traceb.adb ada/s-traceb.ads
+ $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) $(ADA_INCLUDES) \
+ $< $(OUTPUT_OPTION)
ada/s-tasdeb.o : ada/s-tasdeb.adb ada/s-tasdeb.ads
$(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 $(ADA_INCLUDES) \
$< $(OUTPUT_OPTION)
-# force debugging information on s-vaflop.o so that it is always
-# possible to call the VAX float debug print routines.
-# force at least -O so that the inline assembly works.
-
ada/s-vaflop.o : ada/s-vaflop.adb ada/s-vaflop.ads
$(CC) -c -O $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) $(ADA_INCLUDES) \
- $(OUTPUT_OPTION) $<
-
-# force debugging information on a-except.o so that it is always
-# possible to set conditional breakpoints on exceptions.
-# use -O1 otherwise gdb isn't able to get a full backtrace on mips targets.
+ $< $(OUTPUT_OPTION)
ada/a-except.o : ada/a-except.adb ada/a-except.ads
$(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O1 -fno-inline \
$(ADA_INCLUDES) $< $(OUTPUT_OPTION)
-# compile s-except.o without optimization and with debug info to let the
-# debugger set breakpoints and inspect subprogram parameters on exception
-# related events.
-
ada/s-except.o : ada/s-except.adb ada/s-except.ads
$(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 \
$(ADA_INCLUDES) $< $(OUTPUT_OPTION)
-# force debugging information on s-assert.o so that it is always
-# possible to set breakpoint on assert failures.
+ada/s-assert.o : ada/s-assert.adb ada/s-assert.ads
+ $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) $(ADA_INCLUDES) \
+ $< $(OUTPUT_OPTION)
-ada/s-assert.o : ada/s-assert.adb ada/s-assert.ads ada/a-except.ads
- $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O2 \
- $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
+ada/a-tags.o : ada/a-tags.adb ada/a-tags.ads
+ $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) $(ADA_INCLUDES) \
+ $< $(OUTPUT_OPTION)
+
+ada/tracebak.o : ada/tracebak.c $(CONFIG_H) $(SYSTEM_H)
+ $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) \
+ $(INCLUDES) -fno-omit-frame-pointer $< $(OUTPUT_OPTION)
# dependencies for windows specific tool (mdll)
ada/mdll-utl.o : ada/mdll-utl.adb ada/mdll.ads ada/mdll-utl.ads ada/sdefault.ads ada/types.ads
$(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
-# force debugging information and no optimization on s-memory.o so that it
-# is always possible to set breakpoint on __gnat_malloc and __gnat_free
-# this is important for gnatmem using GDB. memtrack.o is built from
-# memtrack.adb, and used by the post-mortem analysis with gnatmem.
-
-ada/s-memory.o : ada/s-memory.adb ada/s-memory.ads
- $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 \
- $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
-
-ada/memtrack.o : ada/memtrack.adb ada/s-memory.ads
- $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 \
- $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
-
ada/adadecode.o : ada/adadecode.c $(CONFIG_H) $(SYSTEM_H) ada/adadecode.h
ada/adaint.o : ada/adaint.c $(CONFIG_H) $(SYSTEM_H) ada/adaint.h
ada/argv.o : ada/argv.c $(CONFIG_H) $(SYSTEM_H) ada/adaint.h
ada/final.o : ada/final.c $(CONFIG_H) $(SYSTEM_H) ada/raise.h
ada/link.o : ada/link.c
-
ada/targext.o : ada/targext.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H)
$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
$(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
$(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
-# Need to keep the frame pointer to unwind the stack properly for some targets.
-ada/tracebak.o : ada/tracebak.c $(CONFIG_H) $(SYSTEM_H)
- $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) \
- $(INCLUDES) -fno-omit-frame-pointer $< $(OUTPUT_OPTION)
-
ada/cuintp.o : ada/gcc-interface/cuintp.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(TREE_H) ada/gcc-interface/ada.h ada/types.h ada/uintp.h \
ada/atree.h ada/elists.h ada/nlists.h ada/stringt.h ada/fe.h $(ADA_TREE_H) \
$(COMPILER) -c $(ALL_COMPILERFLAGS) -I.. $(ALL_CPPFLAGS) $< -o $@
ada/decl.o : ada/gcc-interface/decl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
- $(TM_H) $(TREE_H) $(FLAGS_H) toplev.h $(TARGET_H) $(TREE_INLINE_H) \
- ada/gcc-interface/ada.h ada/types.h ada/atree.h \
+ $(TM_H) $(TREE_H) $(FLAGS_H) toplev.h $(TARGET_H) \
+ $(TREE_INLINE_H) ada/gcc-interface/ada.h ada/types.h ada/atree.h \
ada/elists.h ada/namet.h ada/nlists.h ada/repinfo.h ada/snames.h \
ada/stringt.h ada/uintp.h ada/fe.h ada/sinfo.h ada/einfo.h $(ADA_TREE_H) \
ada/gcc-interface/gigi.h gt-ada-decl.h
ada/misc.o : ada/gcc-interface/misc.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(TREE_H) $(DIAGNOSTIC_H) $(TARGET_H) $(FUNCTION_H) \
$(FLAGS_H) debug.h toplev.h langhooks.h \
- $(LANGHOOKS_DEF_H) $(OPTS_H) $(OPTIONS_H) $(TREE_INLINE_H) $(PLUGIN_H) \
+ $(LANGHOOKS_DEF_H) $(OPTS_H) $(OPTIONS_H) $(TREE_INLINE_H) \
ada/gcc-interface/ada.h ada/adadecode.h ada/types.h ada/atree.h \
ada/elists.h ada/namet.h ada/nlists.h ada/stringt.h ada/uintp.h ada/fe.h \
ada/sinfo.h ada/einfo.h $(ADA_TREE_H) ada/gcc-interface/gigi.h \
ADAFLAGS = -W -Wall -gnatpg -gnata
SOME_ADAFLAGS =-gnata
FORCE_DEBUG_ADAFLAGS = -g
+NO_SIBLING_ADAFLAGS=-fno-optimize-sibling-calls
+NO_REORDER_ADAFLAGS=-fno-toplevel-reorder
GNATLIBFLAGS = -gnatpg -nostdinc
GNATLIBCFLAGS = -g -O2
# Pretend that _Unwind_GetIPInfo is available for the target by default. This
# List of extra object files linked in with various programs.
EXTRA_GNATTOOLS_OBJS = ../../prefix.o ../../version.o
+# List extra gnattools
+EXTRA_GNATTOOLS =
+
# List of target dependent sources, overridden below as necessary
TARGET_ADA_SRCS =
TGT_LIB =
TOOLS_LIBS = $(EXTRA_GNATTOOLS_OBJS) targext.o link.o $(LIBGNAT) ../../../libiberty/libiberty.a $(SYSLIBS) $(TGT_LIB)
+# Convert the target variable into a space separated list of architecture,
+# manufacturer, and operating system and assign each of those to its own
+# variable.
+
+host:=$(subst -, ,$(host_canonical))
+targ:=$(subst -, ,$(target))
+arch:=$(word 1,$(targ))
+ifeq ($(words $(targ)),2)
+ manu:=
+ osys:=$(word 2,$(targ))
+else
+ manu:=$(word 2,$(targ))
+ osys:=$(word 3,$(targ))
+endif
+
# Specify the directories to be searched for header files.
# Both . and srcdir are used, in that order,
# so that tm.h and config.h will be found in the compilation
uintp.o uname.o urealp.o usage.o widechar.o scil_ll.o \
$(EXTRA_GNATMAKE_OBJS)
-# Convert the target variable into a space separated list of architecture,
-# manufacturer, and operating system and assign each of those to its own
-# variable.
-
-host:=$(subst -, ,$(host_canonical))
-targ:=$(subst -, ,$(target))
-arch:=$(word 1,$(targ))
-ifeq ($(words $(targ)),2)
- manu:=
- osys:=$(word 2,$(targ))
-else
- manu:=$(word 2,$(targ))
- osys:=$(word 3,$(targ))
-endif
-
# Make arch match the current multilib so that the RTS selection code
# picks up the right files. For a given target this must be coherent
# with MULTILIB_DIRNAMES defined in gcc/config/target/t-*.
s-osprim.adb<s-osprim-mingw.adb \
s-taprop.adb<s-taprop-mingw.adb
- EH_MECHANISM=-gcc
ifeq ($(strip $(filter-out x86_64%,$(arch))),)
ifeq ($(strip $(MULTISUBDIR)),/32)
LIBGNAT_TARGET_PAIRS += \
# ??? This will be replaced by gnatlib-shared-dual-win32 when GNAT
# auto-import support for array/record will be done.
GNATLIB_SHARED = gnatlib-shared-win32
+
+ EH_MECHANISM=-gcc
endif
TOOLS_TARGET_PAIRS= \
$(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
$(LN_S) $(fsrcpfx)ada/$(word 2,$(subst <, ,$(PAIR))) \
$(RTSDIR)/$(word 1,$(subst <, ,$(PAIR)));)
+# Copy tsystem.h
+ $(CP) $(srcdir)/tsystem.h rts
# Copy generated target dependent sources
$(RM) $(RTSDIR)/s-oscons.ads
(cd $(RTSDIR); $(LN_S) ../s-oscons.ads s-oscons.ads)
gnatlib-zcx:
$(MAKE) $(FLAGS_TO_PASS) EH_MECHANISM="-gcc" \
- THREAD_KIND="$(THREAD_KIND)" ../stamp-gnatlib1-$(RTSDIR)
+ THREAD_KIND="$(THREAD_KIND)" ../stamp-gnatlib1-$(RTSDIR)
sed -e 's/ZCX_By_Default.*/ZCX_By_Default : constant Boolean := True;/' $(RTSDIR)/system.ads > $(RTSDIR)/s.ads
$(MV) $(RTSDIR)/s.ads $(RTSDIR)/system.ads
$(MAKE) $(FLAGS_TO_PASS) \
ADA_INCLUDE_DIR = $(libsubdir)/adainclude
ADA_RTL_OBJ_DIR = $(libsubdir)/adalib
+# Special flags
+
# force no sibling call optimization on s-traceb.o so the number of stack
# frames to be skipped when computing a call chain is not modified by
-# optimization. However we can do that only when building the runtime
-# (not the compiler) because the -fno-optimize-sibling-calls option exists
-# only in GCC 3 and above.
+# optimization.
-ifneq (,$(findstring xgcc,$(CC)))
-NO_SIBLING_ADAFLAGS=-fno-optimize-sibling-calls
-else
-NO_SIBLING_ADAFLAGS=
-endif
-
-s-traceb.o : s-traceb.adb
+s-traceb.o : s-traceb.adb s-traceb.ads
$(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) \
- $(NO_SIBLING_ADAFLAGS) $(ADA_INCLUDES) \
- $< $(OUTPUT_OPTION)
+ $(NO_SIBLING_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
# force debugging information on s-tasdeb.o so that it is always
# possible to set conditional breakpoints on tasks.
$(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 $(ADA_INCLUDES) \
$< $(OUTPUT_OPTION)
-# force no function reordering on a-except.o because of the exclusion bounds
-# mechanism (see the source file for more detailed information).
+# force debugging information on s-vaflop.o so that it is always
+# possible to call the VAX float debug print routines.
+# force at least -O so that the inline assembly works.
-NO_REORDER_ADAFLAGS=-fno-toplevel-reorder
+s-vaflop.o : s-vaflop.adb s-vaflop.ads
+ $(CC) -c -O $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) $(ADA_INCLUDES) \
+ $< $(OUTPUT_OPTION)
+# force no function reordering on a-except.o because of the exclusion bounds
+# mechanism (see the source file for more detailed information).
# force debugging information on a-except.o so that it is always
# possible to set conditional breakpoints on exceptions.
# use -O1 otherwise gdb isn't able to get a full backtrace on mips targets.
# force debugging information on s-assert.o so that it is always
# possible to set breakpoint on assert failures.
-s-assert.o : s-assert.adb s-assert.ads a-except.ads
- $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O2 $(ADA_INCLUDES) \
+s-assert.o : s-assert.adb s-assert.ads
+ $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) $(ADA_INCLUDES) \
$< $(OUTPUT_OPTION)
+# force debugging information on a-tags.o so that the debugger can find
+# the description of Ada.Tags.Type_Specific_Data.
+
+a-tags.o : a-tags.adb a-tags.ads
+ $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) $(ADA_INCLUDES) \
+ $< $(OUTPUT_OPTION)
+
+# need to keep the frame pointer in this file to pop the stack properly on
+# some targets.
+tracebak.o : tracebak.c tb-alvms.c tb-alvxw.c tb-gcc.c
+ $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) \
+ $(INCLUDES) -fno-omit-frame-pointer $< $(OUTPUT_OPTION)
+
adadecode.o : adadecode.c adadecode.h
aux-io.o : aux-io.c
argv.o : argv.c
exit.o : adaint.h exit.c
expect.o : expect.c
final.o : final.c
-link.o : link.c
locales.o : locales.c
mkdir.o : mkdir.c
socket.o : socket.c gsocket.h
sysdep.o : sysdep.c
-raise-gcc.o : raise-gcc.c raise.h
raise.o : raise.c raise.h
vx_stack_info.o : vx_stack_info.c
+raise-gcc.o : raise-gcc.c raise.h
+ $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
+ -iquote $(srcdir) \
+ $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
+
cio.o : cio.c
$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
$(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
$(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
-targext.o : targext.c
+link.o : link.c
$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
$(ALL_CPPFLAGS) $(INCLUDES_FOR_SUBDIR) \
$< $(OUTPUT_OPTION)
-# Need to keep the frame pointer in this file to pop the stack properly on
-# some targets.
-tracebak.o : tracebak.c tb-alvms.c tb-alvxw.c tb-gcc.c
- $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) \
- $(INCLUDES) -fno-omit-frame-pointer $< $(OUTPUT_OPTION)
+targext.o : targext.c
+ $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
+ -iquote $(srcdir) \
+ $(ALL_CPPFLAGS) $(INCLUDES_FOR_SUBDIR) \
+ $< $(OUTPUT_OPTION)
# In GNU Make, ignore whether `stage*' exists.
.PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap