aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@adacore.com>2018-05-30 08:56:12 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2018-05-30 08:56:12 +0000
commitc0368be1a18a9ae007ed3f4ef0f2b1400c6b43f6 (patch)
tree9abb1cc5d5dde7895a87965bbe8172271bbcc840 /gcc
parentc667752e4ce7aba64f59f30a8c6e60c48fa525f4 (diff)
downloadgcc-c0368be1a18a9ae007ed3f4ef0f2b1400c6b43f6.zip
gcc-c0368be1a18a9ae007ed3f4ef0f2b1400c6b43f6.tar.gz
gcc-c0368be1a18a9ae007ed3f4ef0f2b1400c6b43f6.tar.bz2
[Ada] Move special flags for Ada runtime files from Makefile.in to Makefile.rtl
2018-05-30 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * gcc-interface/Makefile.in: Move special flags for Ada runtime files from here... * Makefile.rtl: ... to here. Update comments. Protect call to "GCC_FOR_TARGET" in case target_os isn't defined. From-SVN: r260922
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog7
-rw-r--r--gcc/ada/Makefile.rtl74
-rw-r--r--gcc/ada/gcc-interface/Makefile.in54
3 files changed, 73 insertions, 62 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 430e75f..3f1f045 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,12 @@
2018-05-30 Arnaud Charlet <charlet@adacore.com>
+ * gcc-interface/Makefile.in: Move special flags for Ada runtime files
+ from here...
+ * Makefile.rtl: ... to here. Update comments. Protect call to
+ "GCC_FOR_TARGET" in case target_os isn't defined.
+
+2018-05-30 Arnaud Charlet <charlet@adacore.com>
+
* gcc-interface/Makefile.in: Move target pair settings from here...
* Makefile.rtl: ... to here.
(setup-rts): New target.
diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl
index 17d2ecc..34988c8 100644
--- a/gcc/ada/Makefile.rtl
+++ b/gcc/ada/Makefile.rtl
@@ -1852,13 +1852,15 @@ ifeq ($(strip $(filter-out ibm aix%,$(target_vendor) $(target_os))),)
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
system.ads<libgnat/system-aix.ads
- ifeq ($(findstring ppc64, \
- $(shell $(GCC_FOR_TARGET) $(GNATLIBCFLAGS) \
- -print-multi-os-directory)), \
- ppc64)
- TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-aix.adb
- else
- TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
+ ifneq ($(target_os),)
+ ifeq ($(findstring ppc64, \
+ $(shell $(GCC_FOR_TARGET) $(GNATLIBCFLAGS) \
+ -print-multi-os-directory)), \
+ ppc64)
+ TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-aix.adb
+ else
+ TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
+ endif
endif
EXTRA_GNATRTL_NONTASKING_OBJS += $(TRASYM_DWARF_UNIX_OBJS)
@@ -2580,7 +2582,7 @@ endif
# LIBGNAT_SRCS is the list of all C files (including headers) of the runtime
# library. LIBGNAT_OBJS is the list of object files for libgnat.
-# thread.c is special as put into GNATRTL_TASKING_OBJS by Makefile.rtl
+# thread.c is special as put into GNATRTL_TASKING_OBJS
LIBGNAT_OBJS = adadecode.o adaint.o argv.o aux-io.o \
cal.o cio.o cstreams.o ctrl_c.o \
env.o errno.o exit.o expect.o final.o rtfinal.o rtinit.o \
@@ -2673,3 +2675,59 @@ setup-rts: force
$(LN_S) $(GNAT_SRC)/$(word 2,$(subst <, ,$(PAIR))) \
$(RTSDIR)/$(word 1,$(subst <, ,$(PAIR)));)
+# 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. We don't want inlining, either.
+
+s-traceb.o : s-traceb.adb s-traceb.ads
+ $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) $(NO_INLINE_ADAFLAGS) \
+ $(NO_SIBLING_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
+
+# compile s-tasdeb.o without optimization and with debug info so that it is
+# always possible to set conditional breakpoints on tasks.
+
+s-tasdeb.o : s-tasdeb.adb s-tasdeb.ads
+ $(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 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.
+
+a-except.o : a-except.adb a-except.ads
+ $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) $(NO_INLINE_ADAFLAGS) \
+ $(NO_REORDER_ADAFLAGS) -O1 $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
+
+# compile s-excdeb.o without optimization and with debug info to let the
+# debugger set breakpoints and inspect subprogram parameters on exception
+# related events.
+
+s-excdeb.o : s-excdeb.adb s-excdeb.ads 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.
+
+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)
+
+# force no sibling call optimization on s-memory.o to avoid turning the
+# tail recursion in Alloc into a loop that confuses branch prediction.
+
+s-memory.o : s-memory.adb s-memory.ads
+ $(CC) -c $(ALL_ADAFLAGS) $(NO_SIBLING_ADAFLAGS) $(ADA_INCLUDES) \
+ $< $(OUTPUT_OPTION)
+
diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in
index 27d9203..9a52e6d 100644
--- a/gcc/ada/gcc-interface/Makefile.in
+++ b/gcc/ada/gcc-interface/Makefile.in
@@ -881,60 +881,6 @@ 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. We don't want inlining, either.
-
-s-traceb.o : s-traceb.adb s-traceb.ads
- $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) $(NO_INLINE_ADAFLAGS) \
- $(NO_SIBLING_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
-
-# compile s-tasdeb.o without optimization and with debug info so that it is
-# always possible to set conditional breakpoints on tasks.
-
-s-tasdeb.o : s-tasdeb.adb s-tasdeb.ads
- $(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 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.
-
-a-except.o : a-except.adb a-except.ads
- $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) $(NO_INLINE_ADAFLAGS) \
- $(NO_REORDER_ADAFLAGS) -O1 $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
-
-# compile s-excdeb.o without optimization and with debug info to let the
-# debugger set breakpoints and inspect subprogram parameters on exception
-# related events.
-
-s-excdeb.o : s-excdeb.adb s-excdeb.ads 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.
-
-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)
-
-# force no sibling call optimization on s-memory.o to avoid turning the
-# tail recursion in Alloc into a loop that confuses branch prediction.
-
-s-memory.o : s-memory.adb s-memory.ads
- $(CC) -c $(ALL_ADAFLAGS) $(NO_SIBLING_ADAFLAGS) $(ADA_INCLUDES) \
- $< $(OUTPUT_OPTION)
-
# need to keep the frame pointer in tracebak.o to pop the stack properly on
# some targets.