Commits (3)
default.cgpr
ada/buildsupport_version.ads
buildsupport
tmpBuild
......@@ -29,8 +29,8 @@ ifeq ($(UNAME), Linux)
fi ; \
fi
endif
@#[ "$(DEBIAN)" != "" ] && [ $(ARCH) == 64 ] && EXTRAFLAG="--target=x86_64-linux" ; \
# Define a gprbuild default configuration to avoid compiling with llvm
gprconfig --batch --config=Ada,,default,,GNAT --config=C,,default,,GCC --config=C++,,default,,G++
OCARINA_PATH=`ocarina-config --prefix` \
$(gnatpath)gprbuild -x -g $(exec) -p -P buildsupport.gpr -XBUILD="debug" $$EXTRAFLAG -j4
......
-- *************************** buildsupport **************************** --
-- (c) 2015 European Space Agency - maxime.perrotin@esa.int
-- (c) 2015-2020 European Space Agency - maxime.perrotin@esa.int
-- LGPL license, see LICENSE file
with Ocarina.Types; use Ocarina.Types;
with Interfaces.C; use Interfaces.C;
-- with Types; use Types;
with Ocarina.Types;
with Interfaces.C;
package Imported_Routines is
use Interfaces.C;
procedure C_Set_OutDir (Dir : char_array);
procedure C_Set_Stack (Val : char_array);
......@@ -79,9 +79,9 @@ package Imported_Routines is
filename : char_array);
procedure C_Add_Package (Name : char_array);
procedure C_Set_Compute_Time
(Lower_Bound : Unsigned_Long_Long;
(Lower_Bound : Ocarina.Types.Unsigned_Long_Long;
Lower_Unit : char_array;
Upper_Bound : Unsigned_Long_Long;
Upper_Bound : Ocarina.Types.Unsigned_Long_Long;
Upper_Unit : char_array);
procedure C_Set_Context_Variable
(varName : char_array;
......@@ -90,8 +90,9 @@ package Imported_Routines is
varMod : char_array;
varFile : char_array;
fullName : char_array);
procedure C_Set_Period (Period : Unsigned_Long_Long);
procedure C_Set_Interface_Queue_Size (Size : Unsigned_Long_Long);
procedure C_Set_Period (Period : Ocarina.Types.Unsigned_Long_Long);
procedure C_Set_Interface_Queue_Size
(Size : Ocarina.Types.Unsigned_Long_Long);
procedure C_Set_Glue;
procedure C_Set_SMP2;
procedure C_Set_Interfaceview (Name : char_array);
......
......@@ -426,7 +426,8 @@ void GW_Ada_Backend(FV * fv)
if (fv->system_ast->context->onlycv)
return;
if (ada == fv->language || qgenada == fv->language) {
if ((ada == fv->language && sdl != fv->original_language)
|| qgenada == fv->language) {
/* Create the files and add headers */
Init_Ada_GW_Backend(fv);
......
......@@ -164,8 +164,16 @@ void Set_Property (char *name, char *val)
void Set_Language_To_SDL()
{
if (NULL != fv)
if (NULL != fv) {
// During the build the language will be changed to Ada
// so we keep a trace of the original language set in the
// model, if any backend needs it.
// The skeleton generation needs it to avoid overwriting the
// .ads file generated by opengeode.
fv->language = sdl;
fv->original_language = sdl;
}
}
void Set_Language_To_CPP()
......@@ -241,8 +249,10 @@ void Set_Language_To_Scade()
void Set_Language_To_Ada()
{
if (NULL != fv)
if (NULL != fv) {
fv->language = ada;
fv->original_language = ada;
}
}
void Set_Language_To_GUI()
......
......@@ -244,6 +244,7 @@ typedef struct t_fv {
struct t_system *system_ast;
Nature runtime_nature;
Language language;
Language original_language; // keep track of SDL
char *zipfile;
Interface_list *interfaces;
struct t_process *process;
......