aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/Makefile.in
diff options
context:
space:
mode:
authorJerome Lambourg <lambourg@adacore.com>2018-08-21 14:49:49 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2018-08-21 14:49:49 +0000
commit5ec8edb56ea77f8627b6fc7b9f95751d27cd9162 (patch)
tree6e9cb10f5d42f631279ee16e67c2e4b38116af55 /gcc/ada/gcc-interface/Makefile.in
parent084e3bd183b1b7253f1216b5b165bde7bfbf6bf6 (diff)
downloadgcc-5ec8edb56ea77f8627b6fc7b9f95751d27cd9162.zip
gcc-5ec8edb56ea77f8627b6fc7b9f95751d27cd9162.tar.gz
gcc-5ec8edb56ea77f8627b6fc7b9f95751d27cd9162.tar.bz2
[Ada] Add a new gnat tool vxlink
VxLink is a helper tool used as a wrapper around g++/gcc to build VxWorks DKM (Downloadable Kernel Modules). Such DKM is a partially linked object that includes entry points for constructors and destructors. This tool thus uses g++ to generate an intermediate partially linked object, retrieves the list of constructors and destructors in it and produces a C file that lists those ctors/dtors in a way that is understood be VxWorks kernel. It then links this file with the intermediate object to produce a valid DKM. 2018-08-21 Jerome Lambourg <lambourg@adacore.com> gcc/ada/ * vxlink-bind.adb, vxlink-bind.ads, vxlink-link.adb, vxlink-link.ads, vxlink-main.adb, vxlink.adb, vxlink.ads: Add a new tool vxlink to handle VxWorks constructors in DKMs. * gcc-interface/Makefile.in: add rules to build vxlink From-SVN: r263736
Diffstat (limited to 'gcc/ada/gcc-interface/Makefile.in')
-rw-r--r--gcc/ada/gcc-interface/Makefile.in11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in
index 9a52e6d..4d870c2 100644
--- a/gcc/ada/gcc-interface/Makefile.in
+++ b/gcc/ada/gcc-interface/Makefile.in
@@ -441,6 +441,11 @@ ifeq ($(ENABLE_VXADDR2LINE),true)
TOOLSCASE=cross top_buildir=../../.. \
../../vxaddr2line$(exeext)
endif
+ifeq ($(ENABLE_VXLINK),true)
+ $(MAKE) -C tools -f ../Makefile $(TOOLS_FLAGS_TO_PASS) \
+ TOOLSCASE=cross top_build=../../.. \
+ ../../vxlink$(exeext)
+endif
common-tools: ../stamp-tools
$(GNATMAKE) -j0 -c -b $(ADA_INCLUDES) \
@@ -478,6 +483,12 @@ common-tools: ../stamp-tools
$(GNATLINK) -v vxaddr2line -o $@ \
--GCC="$(CC) $(ADA_INCLUDES)" --LINK="$(GCC_LINK)" ../targext.o $(CLIB)
+../../vxlink$(exeext): ../stamp-tools
+ $(GNATMAKE) -c $(ADA_INCLUDES) vxlink-main --GCC="$(CC) $(ALL_ADAFLAGS)"
+ $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) vxlink-main
+ $(GNATLINK) -v vxlink-main -o $@ \
+ --GCC="$(CC) $(ADA_INCLUDES)" --LINK="$(GCC_LINK)"
+
gnatmake-re: ../stamp-tools
$(GNATMAKE) -j0 $(ADA_INCLUDES) -u sdefault --GCC="$(CC) $(MOST_ADA_FLAGS)"
$(GNATMAKE) -j0 -c $(ADA_INCLUDES) gnatmake --GCC="$(CC) $(ALL_ADAFLAGS)"