From bd0feb3c614d33141062a5d5c7a4966a3b64d7bd Mon Sep 17 00:00:00 2001 From: Jerome Guitton Date: Mon, 19 Aug 2019 08:36:58 +0000 Subject: [PATCH] [Ada] Generate ada_target_properties Generate target-dependent info into a file named ada_target_properties. This information is used by tools for static analysis: they need to know the size of standard types for a given run-time library. This metadata is meant to be saved at the root of the run-time directory. 2019-08-19 Jerome Guitton gcc/ada/ * Makefile.rtl (system.o): New target to add generation of target properties. * gcc-interface/Makefile.in (install-gnatlib): Install ada_target_properties. From-SVN: r274658 --- gcc/ada/ChangeLog | 7 +++++++ gcc/ada/Makefile.rtl | 12 ++++++++++++ gcc/ada/gcc-interface/Makefile.in | 2 ++ 3 files changed, 21 insertions(+) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 2ac5309292f..1c983054fa3 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,10 @@ +2019-08-19 Jerome Guitton + + * Makefile.rtl (system.o): New target to add generation of + target properties. + * gcc-interface/Makefile.in (install-gnatlib): Install + ada_target_properties. + 2019-08-19 Eric Botcazou * inline.adb (Add_Inlined_Body): Do not special-case instances diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl index d6dd1514f4a..c1a422fae1e 100644 --- a/gcc/ada/Makefile.rtl +++ b/gcc/ada/Makefile.rtl @@ -2696,6 +2696,18 @@ setup-rts: force # propagation of exceptions cannot itself be compiled with checks that # may give rise to exceptions, e.g. stack overflow checks. +# Generate target-dependent info into a file named ada_target_properties. +# This information is used by tools for static analysis: they need to know +# the size of standard types for a given run-time library. This metadata +# is meant to be saved at the root of the run-time directory. + +ADA_TARGET_PROPERTIES = -gnatet=ada_target_properties + +system.o : system.ads + $(ADAC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< \ + $(ADA_TARGET_PROPERTIES) \ + $(OUTPUT_OPTION) + # 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. diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in index e9a4874a2ed..d4c9d157d1c 100644 --- a/gcc/ada/gcc-interface/Makefile.in +++ b/gcc/ada/gcc-interface/Makefile.in @@ -516,6 +516,8 @@ install-gnatlib: ../stamp-gnatlib-$(RTSDIR) install-gcc-specs for file in $(RTSDIR)/*.ali; do \ $(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \ done + $(INSTALL_DATA_DATE) $(RTSDIR)/ada_target_properties \ + $(DESTDIR)$(ADA_RTL_OBJ_DIR)/../ -cd $(RTSDIR); for file in *$(arext);do \ $(INSTALL_DATA) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \ $(RANLIB_FOR_TARGET) $(DESTDIR)$(ADA_RTL_OBJ_DIR)/$$file; \ -- 2.30.2