Commit e1876cac by Eric Botcazou Committed by Eric Botcazou

Makefile.in (NO_SIBLING_ADAFLAGS): Always define.

	* gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
	(NO_REORDER_ADAFLAGS): New variable.
	(EXTRA_GNATTOOLS): Always define.
	(../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
	Clean up and adjust list of files compiled with special options.
	* gcc-interface/Make-lang.in: Likewise.
	(ada/decl.o): Cosmetical change.
	(ada/misc.o): Remove dependency on $(PLUGIN_H).

From-SVN: r172834
parent 23756963
2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
(NO_REORDER_ADAFLAGS): New variable.
(EXTRA_GNATTOOLS): Always define.
(../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
Clean up and adjust list of files compiled with special options.
* gcc-interface/Make-lang.in: Likewise.
(ada/decl.o): Cosmetical change.
(ada/misc.o): Remove dependency on $(PLUGIN_H).
2011-04-20 Jim Meyering <meyering@redhat.com> 2011-04-20 Jim Meyering <meyering@redhat.com>
* initialize.c (__gnat_initialize): Remove useless if-before-free. * initialize.c (__gnat_initialize): Remove useless if-before-free.
......
# Top level -*- makefile -*- fragment for GNU Ada (GNAT). # Top level -*- makefile -*- fragment for GNU Ada (GNAT).
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 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. # Free Software Foundation, Inc.
#This file is part of GCC. #This file is part of GCC.
...@@ -1127,43 +1127,39 @@ ada/sdefault.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \ ...@@ -1127,43 +1127,39 @@ ada/sdefault.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ADA_TREE_H = ada/gcc-interface/ada-tree.h ADA_TREE_H = ada/gcc-interface/ada-tree.h
# force debugging information on s-tasdeb.o so that it is always # Special flags - see gcc-interface/Makefile.in for the template
# possible to set conditional breakpoints on tasks.
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 ada/s-tasdeb.o : ada/s-tasdeb.adb ada/s-tasdeb.ads
$(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 $(ADA_INCLUDES) \ $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 $(ADA_INCLUDES) \
$< $(OUTPUT_OPTION) $< $(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 ada/s-vaflop.o : ada/s-vaflop.adb ada/s-vaflop.ads
$(CC) -c -O $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) $(ADA_INCLUDES) \ $(CC) -c -O $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) $(ADA_INCLUDES) \
$(OUTPUT_OPTION) $< $< $(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.
ada/a-except.o : ada/a-except.adb ada/a-except.ads ada/a-except.o : ada/a-except.adb ada/a-except.ads
$(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O1 -fno-inline \ $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O1 -fno-inline \
$(ADA_INCLUDES) $< $(OUTPUT_OPTION) $(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 ada/s-except.o : ada/s-except.adb ada/s-except.ads
$(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 \ $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 \
$(ADA_INCLUDES) $< $(OUTPUT_OPTION) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
# force debugging information on s-assert.o so that it is always ada/s-assert.o : ada/s-assert.adb ada/s-assert.ads
# possible to set breakpoint on assert failures. $(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 ada/a-tags.o : ada/a-tags.adb ada/a-tags.ads
$(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O2 \ $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) $(ADA_INCLUDES) \
$(ADA_INCLUDES) $< $(OUTPUT_OPTION) $< $(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) # dependencies for windows specific tool (mdll)
...@@ -1176,19 +1172,6 @@ ada/mdll-fil.o : ada/mdll-fil.adb ada/mdll.ads ada/mdll-fil.ads ...@@ -1176,19 +1172,6 @@ ada/mdll-fil.o : ada/mdll-fil.adb ada/mdll.ads ada/mdll-fil.ads
ada/mdll-utl.o : ada/mdll-utl.adb ada/mdll.ads ada/mdll-utl.ads ada/sdefault.ads ada/types.ads 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) $(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/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/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/argv.o : ada/argv.c $(CONFIG_H) $(SYSTEM_H) ada/adaint.h
...@@ -1197,7 +1180,6 @@ ada/exit.o : ada/exit.c $(CONFIG_H) $(SYSTEM_H) ada/adaint.h ...@@ -1197,7 +1180,6 @@ ada/exit.o : ada/exit.c $(CONFIG_H) $(SYSTEM_H) ada/adaint.h
ada/final.o : ada/final.c $(CONFIG_H) $(SYSTEM_H) ada/raise.h ada/final.o : ada/final.c $(CONFIG_H) $(SYSTEM_H) ada/raise.h
ada/link.o : ada/link.c ada/link.o : ada/link.c
ada/targext.o : ada/targext.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) ada/targext.o : ada/targext.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H)
$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \ $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
$(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION) $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
...@@ -1218,11 +1200,6 @@ ada/raise.o : ada/raise.c $(CONFIG_H) $(SYSTEM_H) ada/adaint.h ada/raise.h ...@@ -1218,11 +1200,6 @@ ada/raise.o : ada/raise.c $(CONFIG_H) $(SYSTEM_H) ada/adaint.h ada/raise.h
$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \ $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
$(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION) $(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 \ 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 \ $(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) \ ada/atree.h ada/elists.h ada/nlists.h ada/stringt.h ada/fe.h $(ADA_TREE_H) \
...@@ -1230,8 +1207,8 @@ ada/cuintp.o : ada/gcc-interface/cuintp.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ ...@@ -1230,8 +1207,8 @@ ada/cuintp.o : ada/gcc-interface/cuintp.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(COMPILER) -c $(ALL_COMPILERFLAGS) -I.. $(ALL_CPPFLAGS) $< -o $@ $(COMPILER) -c $(ALL_COMPILERFLAGS) -I.. $(ALL_CPPFLAGS) $< -o $@
ada/decl.o : ada/gcc-interface/decl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ 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) \ $(TM_H) $(TREE_H) $(FLAGS_H) toplev.h $(TARGET_H) \
ada/gcc-interface/ada.h ada/types.h ada/atree.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/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/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/gcc-interface/gigi.h gt-ada-decl.h
...@@ -1240,7 +1217,7 @@ ada/decl.o : ada/gcc-interface/decl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ ...@@ -1240,7 +1217,7 @@ ada/decl.o : ada/gcc-interface/decl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
ada/misc.o : ada/gcc-interface/misc.c $(CONFIG_H) $(SYSTEM_H) coretypes.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) \ $(TM_H) $(TREE_H) $(DIAGNOSTIC_H) $(TARGET_H) $(FUNCTION_H) \
$(FLAGS_H) debug.h toplev.h langhooks.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/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/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 \ ada/sinfo.h ada/einfo.h $(ADA_TREE_H) ada/gcc-interface/gigi.h \
......
...@@ -107,6 +107,8 @@ ADA_CFLAGS = ...@@ -107,6 +107,8 @@ ADA_CFLAGS =
ADAFLAGS = -W -Wall -gnatpg -gnata ADAFLAGS = -W -Wall -gnatpg -gnata
SOME_ADAFLAGS =-gnata SOME_ADAFLAGS =-gnata
FORCE_DEBUG_ADAFLAGS = -g FORCE_DEBUG_ADAFLAGS = -g
NO_SIBLING_ADAFLAGS=-fno-optimize-sibling-calls
NO_REORDER_ADAFLAGS=-fno-toplevel-reorder
GNATLIBFLAGS = -gnatpg -nostdinc GNATLIBFLAGS = -gnatpg -nostdinc
GNATLIBCFLAGS = -g -O2 GNATLIBCFLAGS = -g -O2
# Pretend that _Unwind_GetIPInfo is available for the target by default. This # Pretend that _Unwind_GetIPInfo is available for the target by default. This
...@@ -180,6 +182,9 @@ SYSLIBS = @GNAT_LIBEXC@ ...@@ -180,6 +182,9 @@ SYSLIBS = @GNAT_LIBEXC@
# List of extra object files linked in with various programs. # List of extra object files linked in with various programs.
EXTRA_GNATTOOLS_OBJS = ../../prefix.o ../../version.o EXTRA_GNATTOOLS_OBJS = ../../prefix.o ../../version.o
# List extra gnattools
EXTRA_GNATTOOLS =
# List of target dependent sources, overridden below as necessary # List of target dependent sources, overridden below as necessary
TARGET_ADA_SRCS = TARGET_ADA_SRCS =
...@@ -243,6 +248,21 @@ LIBDEPS = $(LIBINTL_DEP) $(LIBIBERTY) ...@@ -243,6 +248,21 @@ LIBDEPS = $(LIBINTL_DEP) $(LIBIBERTY)
TGT_LIB = TGT_LIB =
TOOLS_LIBS = $(EXTRA_GNATTOOLS_OBJS) targext.o link.o $(LIBGNAT) ../../../libiberty/libiberty.a $(SYSLIBS) $(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. # Specify the directories to be searched for header files.
# Both . and srcdir are used, in that order, # Both . and srcdir are used, in that order,
# so that tm.h and config.h will be found in the compilation # so that tm.h and config.h will be found in the compilation
...@@ -312,21 +332,6 @@ GNATMAKE_OBJS = a-except.o ali.o ali-util.o aspects.o s-casuti.o \ ...@@ -312,21 +332,6 @@ GNATMAKE_OBJS = a-except.o ali.o ali-util.o aspects.o s-casuti.o \
uintp.o uname.o urealp.o usage.o widechar.o scil_ll.o \ uintp.o uname.o urealp.o usage.o widechar.o scil_ll.o \
$(EXTRA_GNATMAKE_OBJS) $(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 # 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 # picks up the right files. For a given target this must be coherent
# with MULTILIB_DIRNAMES defined in gcc/config/target/t-*. # with MULTILIB_DIRNAMES defined in gcc/config/target/t-*.
...@@ -1634,7 +1639,6 @@ ifeq ($(strip $(filter-out cygwin32% mingw32% pe,$(osys))),) ...@@ -1634,7 +1639,6 @@ ifeq ($(strip $(filter-out cygwin32% mingw32% pe,$(osys))),)
s-osprim.adb<s-osprim-mingw.adb \ s-osprim.adb<s-osprim-mingw.adb \
s-taprop.adb<s-taprop-mingw.adb s-taprop.adb<s-taprop-mingw.adb
EH_MECHANISM=-gcc
ifeq ($(strip $(filter-out x86_64%,$(arch))),) ifeq ($(strip $(filter-out x86_64%,$(arch))),)
ifeq ($(strip $(MULTISUBDIR)),/32) ifeq ($(strip $(MULTISUBDIR)),/32)
LIBGNAT_TARGET_PAIRS += \ LIBGNAT_TARGET_PAIRS += \
...@@ -1666,6 +1670,8 @@ ifeq ($(strip $(filter-out cygwin32% mingw32% pe,$(osys))),) ...@@ -1666,6 +1670,8 @@ ifeq ($(strip $(filter-out cygwin32% mingw32% pe,$(osys))),)
# ??? This will be replaced by gnatlib-shared-dual-win32 when GNAT # ??? This will be replaced by gnatlib-shared-dual-win32 when GNAT
# auto-import support for array/record will be done. # auto-import support for array/record will be done.
GNATLIB_SHARED = gnatlib-shared-win32 GNATLIB_SHARED = gnatlib-shared-win32
EH_MECHANISM=-gcc
endif endif
TOOLS_TARGET_PAIRS= \ TOOLS_TARGET_PAIRS= \
...@@ -2444,6 +2450,8 @@ install-gnatlib: ../stamp-gnatlib-$(RTSDIR) ...@@ -2444,6 +2450,8 @@ install-gnatlib: ../stamp-gnatlib-$(RTSDIR)
$(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \ $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
$(LN_S) $(fsrcpfx)ada/$(word 2,$(subst <, ,$(PAIR))) \ $(LN_S) $(fsrcpfx)ada/$(word 2,$(subst <, ,$(PAIR))) \
$(RTSDIR)/$(word 1,$(subst <, ,$(PAIR)));) $(RTSDIR)/$(word 1,$(subst <, ,$(PAIR)));)
# Copy tsystem.h
$(CP) $(srcdir)/tsystem.h rts
# Copy generated target dependent sources # Copy generated target dependent sources
$(RM) $(RTSDIR)/s-oscons.ads $(RM) $(RTSDIR)/s-oscons.ads
(cd $(RTSDIR); $(LN_S) ../s-oscons.ads s-oscons.ads) (cd $(RTSDIR); $(LN_S) ../s-oscons.ads s-oscons.ads)
...@@ -2668,7 +2676,7 @@ gnatlib-sjlj: ...@@ -2668,7 +2676,7 @@ gnatlib-sjlj:
gnatlib-zcx: gnatlib-zcx:
$(MAKE) $(FLAGS_TO_PASS) EH_MECHANISM="-gcc" \ $(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 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 $(MV) $(RTSDIR)/s.ads $(RTSDIR)/system.ads
$(MAKE) $(FLAGS_TO_PASS) \ $(MAKE) $(FLAGS_TO_PASS) \
...@@ -2709,22 +2717,15 @@ b_gnatm.o : b_gnatm.adb ...@@ -2709,22 +2717,15 @@ b_gnatm.o : b_gnatm.adb
ADA_INCLUDE_DIR = $(libsubdir)/adainclude ADA_INCLUDE_DIR = $(libsubdir)/adainclude
ADA_RTL_OBJ_DIR = $(libsubdir)/adalib ADA_RTL_OBJ_DIR = $(libsubdir)/adalib
# Special flags
# force no sibling call optimization on s-traceb.o so the number of stack # 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 # frames to be skipped when computing a call chain is not modified by
# optimization. However we can do that only when building the runtime # optimization.
# (not the compiler) because the -fno-optimize-sibling-calls option exists
# only in GCC 3 and above.
ifneq (,$(findstring xgcc,$(CC))) s-traceb.o : s-traceb.adb s-traceb.ads
NO_SIBLING_ADAFLAGS=-fno-optimize-sibling-calls
else
NO_SIBLING_ADAFLAGS=
endif
s-traceb.o : s-traceb.adb
$(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) \ $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) \
$(NO_SIBLING_ADAFLAGS) $(ADA_INCLUDES) \ $(NO_SIBLING_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
$< $(OUTPUT_OPTION)
# force debugging information on s-tasdeb.o so that it is always # force debugging information on s-tasdeb.o so that it is always
# possible to set conditional breakpoints on tasks. # possible to set conditional breakpoints on tasks.
...@@ -2733,11 +2734,16 @@ s-tasdeb.o : s-tasdeb.adb s-tasdeb.ads ...@@ -2733,11 +2734,16 @@ s-tasdeb.o : s-tasdeb.adb s-tasdeb.ads
$(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 $(ADA_INCLUDES) \ $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 $(ADA_INCLUDES) \
$< $(OUTPUT_OPTION) $< $(OUTPUT_OPTION)
# force no function reordering on a-except.o because of the exclusion bounds # force debugging information on s-vaflop.o so that it is always
# mechanism (see the source file for more detailed information). # 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 # force debugging information on a-except.o so that it is always
# possible to set conditional breakpoints on exceptions. # possible to set conditional breakpoints on exceptions.
# use -O1 otherwise gdb isn't able to get a full backtrace on mips targets. # use -O1 otherwise gdb isn't able to get a full backtrace on mips targets.
...@@ -2757,10 +2763,23 @@ s-except.o : s-except.adb s-except.ads ...@@ -2757,10 +2763,23 @@ s-except.o : s-except.adb s-except.ads
# force debugging information on s-assert.o so that it is always # force debugging information on s-assert.o so that it is always
# possible to set breakpoint on assert failures. # possible to set breakpoint on assert failures.
s-assert.o : s-assert.adb s-assert.ads a-except.ads s-assert.o : s-assert.adb s-assert.ads
$(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O2 $(ADA_INCLUDES) \ $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) $(ADA_INCLUDES) \
$< $(OUTPUT_OPTION) $< $(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 adadecode.o : adadecode.c adadecode.h
aux-io.o : aux-io.c aux-io.o : aux-io.c
argv.o : argv.c argv.o : argv.c
...@@ -2770,15 +2789,18 @@ errno.o : errno.c ...@@ -2770,15 +2789,18 @@ errno.o : errno.c
exit.o : adaint.h exit.c exit.o : adaint.h exit.c
expect.o : expect.c expect.o : expect.c
final.o : final.c final.o : final.c
link.o : link.c
locales.o : locales.c locales.o : locales.c
mkdir.o : mkdir.c mkdir.o : mkdir.c
socket.o : socket.c gsocket.h socket.o : socket.c gsocket.h
sysdep.o : sysdep.c sysdep.o : sysdep.c
raise-gcc.o : raise-gcc.c raise.h
raise.o : raise.c raise.h raise.o : raise.c raise.h
vx_stack_info.o : vx_stack_info.c 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 cio.o : cio.c
$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \ $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
$(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION) $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
...@@ -2791,16 +2813,16 @@ initialize.o : initialize.c raise.h ...@@ -2791,16 +2813,16 @@ initialize.o : initialize.c raise.h
$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \ $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
$(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION) $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
targext.o : targext.c link.o : link.c
$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \ $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
$(ALL_CPPFLAGS) $(INCLUDES_FOR_SUBDIR) \ $(ALL_CPPFLAGS) $(INCLUDES_FOR_SUBDIR) \
$< $(OUTPUT_OPTION) $< $(OUTPUT_OPTION)
# Need to keep the frame pointer in this file to pop the stack properly on targext.o : targext.c
# some targets. $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
tracebak.o : tracebak.c tb-alvms.c tb-alvxw.c tb-gcc.c -iquote $(srcdir) \
$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) \ $(ALL_CPPFLAGS) $(INCLUDES_FOR_SUBDIR) \
$(INCLUDES) -fno-omit-frame-pointer $< $(OUTPUT_OPTION) $< $(OUTPUT_OPTION)
# In GNU Make, ignore whether `stage*' exists. # In GNU Make, ignore whether `stage*' exists.
.PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap .PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment