Commit 81b6ae1e by Arnaud Charlet Committed by Pierre-Marie de Rodat

[Ada] Refactor compilation of Ada units in Makefile.rtl

2018-06-11  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

	* Makefile.rtl: Compile Ada files with $(ADAC) instead of $(CC).

From-SVN: r261404
parent 6778c2ca
2018-06-11 Arnaud Charlet <charlet@adacore.com>
* Makefile.rtl: Compile Ada files with $(ADAC) instead of $(CC).
2018-06-11 Hristian Kirtchev <kirtchev@adacore.com> 2018-06-11 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch11.adb, exp_unst.adb, inline.adb, sem_ch12.adb, sem_util.adb: * exp_ch11.adb, exp_unst.adb, inline.adb, sem_ch12.adb, sem_util.adb:
......
...@@ -17,11 +17,14 @@ ...@@ -17,11 +17,14 @@
#along with GCC; see the file COPYING3. If not see #along with GCC; see the file COPYING3. If not see
#<http://www.gnu.org/licenses/>. #<http://www.gnu.org/licenses/>.
# This makefile fragment is included in the ada Makefile (both Unix # This makefile fragment is included in the ada Makefile.
# and Windows).
# Its purpose is to allow the separate maintainence of the list of # Its purpose is to allow the separate maintenance of the list of
# GNATRTL objects, which frequently changes. # GNATRTL objects and target pairs, which frequently changes.
ifndef ADAC
ADAC=$(CC)
endif
# Objects needed only for tasking # Objects needed only for tasking
GNATRTL_TASKING_OBJS= \ GNATRTL_TASKING_OBJS= \
...@@ -2682,15 +2685,16 @@ setup-rts: force ...@@ -2682,15 +2685,16 @@ setup-rts: force
# optimization. We don't want inlining, either. # optimization. We don't want inlining, either.
s-traceb.o : s-traceb.adb s-traceb.ads s-traceb.o : s-traceb.adb s-traceb.ads
$(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) $(NO_INLINE_ADAFLAGS) \ $(ADAC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) \
$(NO_SIBLING_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION) $(NO_INLINE_ADAFLAGS) $(NO_SIBLING_ADAFLAGS) $(ADA_INCLUDES) $< \
$(OUTPUT_OPTION)
# compile s-tasdeb.o without optimization and with debug info so that it is # compile s-tasdeb.o without optimization and with debug info so that it is
# always possible to set conditional breakpoints on tasks. # always possible to set conditional breakpoints on tasks.
s-tasdeb.o : s-tasdeb.adb s-tasdeb.ads s-tasdeb.o : s-tasdeb.adb s-tasdeb.ads
$(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 $(ADA_INCLUDES) \ $(ADAC) -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 no function reordering on a-except.o because of the exclusion bounds
# mechanism (see the source file for more detailed information). # mechanism (see the source file for more detailed information).
...@@ -2699,35 +2703,36 @@ s-tasdeb.o : s-tasdeb.adb s-tasdeb.ads ...@@ -2699,35 +2703,36 @@ s-tasdeb.o : s-tasdeb.adb s-tasdeb.ads
# 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.
a-except.o : a-except.adb a-except.ads a-except.o : a-except.adb a-except.ads
$(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) $(NO_INLINE_ADAFLAGS) \ $(ADAC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) \
$(NO_REORDER_ADAFLAGS) -O1 $(ADA_INCLUDES) $< $(OUTPUT_OPTION) $(NO_INLINE_ADAFLAGS) $(NO_REORDER_ADAFLAGS) -O1 $(ADA_INCLUDES) \
$< $(OUTPUT_OPTION)
# compile s-excdeb.o without optimization and with debug info to let the # compile s-excdeb.o without optimization and with debug info to let the
# debugger set breakpoints and inspect subprogram parameters on exception # debugger set breakpoints and inspect subprogram parameters on exception
# related events. # related events.
s-excdeb.o : s-excdeb.adb s-excdeb.ads s-except.ads s-excdeb.o : s-excdeb.adb s-excdeb.ads s-except.ads
$(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 $(ADA_INCLUDES) \ $(ADAC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 \
$< $(OUTPUT_OPTION) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
# 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 s-assert.o : s-assert.adb s-assert.ads
$(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) $(ADA_INCLUDES) \ $(ADAC) -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 # force debugging information on a-tags.o so that the debugger can find
# the description of Ada.Tags.Type_Specific_Data. # the description of Ada.Tags.Type_Specific_Data.
a-tags.o : a-tags.adb a-tags.ads a-tags.o : a-tags.adb a-tags.ads
$(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) $(ADA_INCLUDES) \ $(ADAC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) $(ADA_INCLUDES) \
$< $(OUTPUT_OPTION) $< $(OUTPUT_OPTION)
# force no sibling call optimization on s-memory.o to avoid turning the # force no sibling call optimization on s-memory.o to avoid turning the
# tail recursion in Alloc into a loop that confuses branch prediction. # tail recursion in Alloc into a loop that confuses branch prediction.
s-memory.o : s-memory.adb s-memory.ads s-memory.o : s-memory.adb s-memory.ads
$(CC) -c $(ALL_ADAFLAGS) $(NO_SIBLING_ADAFLAGS) $(ADA_INCLUDES) \ $(ADAC) -c $(ALL_ADAFLAGS) $(NO_SIBLING_ADAFLAGS) $(ADA_INCLUDES) \
$< $(OUTPUT_OPTION) $< $(OUTPUT_OPTION)
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