From 478cfa18e8882a87ecd1d5057b2520e39d896294 Mon Sep 17 00:00:00 2001 From: Maxime Perrotin Date: Thu, 30 Jul 2020 18:12:52 +0200 Subject: [PATCH] Use gprconfig to force the use of GCC when LLVM is there --- templates/concurrency_view/ada_pohi_gpr/node.tmplt | 8 +++++--- templates/concurrency_view/c_pohi_gpr/node.tmplt | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/templates/concurrency_view/ada_pohi_gpr/node.tmplt b/templates/concurrency_view/ada_pohi_gpr/node.tmplt index 2b54e8f9..ce04fdec 100644 --- a/templates/concurrency_view/ada_pohi_gpr/node.tmplt +++ b/templates/concurrency_view/ada_pohi_gpr/node.tmplt @@ -11,7 +11,7 @@ @@SET@@ STM32_GNAT = True @@END_IF@@ -GNATMAKE = gprbuild +GPRBUILD = gprbuild @@IF@@ @_STM32_GNAT_@ export ADA_PROJECT_PATH=${CURDIR}/Ada_Drivers_Library/boards:${CURDIR}/Ada_Drivers_Library/boards/@_REPLACE(_full/):LOWER:Ada_Runtime_@/ @@ -26,7 +26,7 @@ TARGET = NATIVE @@IF@@ @_STM32_GNAT_@ all: Ada_Drivers_Library/README.md ../../dataview/Ada_STM32/built @@TABLE@@ - $(GNATMAKE) -p -P @_LOWER:Partition_Names_@.gpr -XTARGET=$(TARGET) -cargs:C -DSTATIC=static -cargs:C -DFP_WORD_SIZE=4 + $(GPRBUILD) -p -P @_LOWER:Partition_Names_@.gpr -XTARGET=$(TARGET) -cargs:C -DSTATIC=static -cargs:C -DFP_WORD_SIZE=4 @@END_TABLE@@ Ada_Drivers_Library/README.md: @@ -40,7 +40,9 @@ Ada_Drivers_Library/README.md: @@ELSE@@ all: + # Configure gprbuild to use GCC toolchain (for C and C++) even if LLVM is installed + gprconfig --batch --target=x86_64-pc-linux-gnu --config=C,,,,GCC --config=C++,,,,G++ @@TABLE@@ - $(GNATMAKE) -p -P @_LOWER:Partition_Names_@.gpr -XTARGET=$(TARGET) -cargs:C -DSTATIC=static -cargs:Ada -gnatE + $(GPRBUILD) -p -P @_LOWER:Partition_Names_@.gpr -XTARGET=$(TARGET) -cargs:C -DSTATIC=static -cargs:Ada -gnatE @@END_TABLE@@ @@END_IF@@ diff --git a/templates/concurrency_view/c_pohi_gpr/node.tmplt b/templates/concurrency_view/c_pohi_gpr/node.tmplt index 82f6f53b..182a61ff 100644 --- a/templates/concurrency_view/c_pohi_gpr/node.tmplt +++ b/templates/concurrency_view/c_pohi_gpr/node.tmplt @@ -20,6 +20,8 @@ simulate: @@END_TABLE@@ debug_native: + # Configure gprbuild to use GCC toolchain even if LLVM is installed + gprconfig --batch --target=x86_64-pc-linux-gnu --config=C,,,,GCC --config=C++,,,,G++ @@TABLE@@ gprbuild -v -p -P @_LOWER:Partition_Names_@.gpr -XCFG="Debug" -cargs:C -DSTATIC="" @@END_TABLE@@ -- GitLab