summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ortho/llvm/ortho_jit.adb5
-rw-r--r--ortho/mcode/ortho_jit.adb5
-rw-r--r--ortho/ortho_jit.ads3
-rw-r--r--translate/ghdldrv/Makefile14
-rw-r--r--translate/ghdldrv/ghdl_jit.adb (renamed from translate/ghdldrv/ghdl_mcode.adb)12
5 files changed, 27 insertions, 12 deletions
diff --git a/ortho/llvm/ortho_jit.adb b/ortho/llvm/ortho_jit.adb
index 9aa6c1c..fdda667 100644
--- a/ortho/llvm/ortho_jit.adb
+++ b/ortho/llvm/ortho_jit.adb
@@ -143,4 +143,9 @@ package body Ortho_Jit is
null;
end Disp_Help;
+ function Get_Jit_Name return String is
+ begin
+ return "LLVM";
+ end Get_Jit_Name;
+
end Ortho_Jit;
diff --git a/ortho/mcode/ortho_jit.adb b/ortho/mcode/ortho_jit.adb
index c924542..7aa9724 100644
--- a/ortho/mcode/ortho_jit.adb
+++ b/ortho/mcode/ortho_jit.adb
@@ -117,4 +117,9 @@ package body Ortho_Jit is
Put_Line (" --snap=FILE Write memory snapshot to FILE");
end Disp_Help;
+ function Get_Jit_Name return String is
+ begin
+ return "mcode";
+ end Get_Jit_Name;
+
end Ortho_Jit;
diff --git a/ortho/ortho_jit.ads b/ortho/ortho_jit.ads
index dd3062c..89c3663 100644
--- a/ortho/ortho_jit.ads
+++ b/ortho/ortho_jit.ads
@@ -36,5 +36,8 @@ package Ortho_Jit is
function Decode_Option (Option : String) return Boolean;
procedure Disp_Help;
+
+ -- Return the name of the code generator, to be displayed by --version.
+ function Get_Jit_Name return String;
end Ortho_Jit;
diff --git a/translate/ghdldrv/Makefile b/translate/ghdldrv/Makefile
index 605f0a5..221a4a6 100644
--- a/translate/ghdldrv/Makefile
+++ b/translate/ghdldrv/Makefile
@@ -66,11 +66,14 @@ ortho_code-x86-flags.ads:
ghdl_mcode: GRT_FLAGS+=-DWITH_GNAT_RUN_TIME
ghdl_mcode: default_pathes.ads $(GRT_ADD_OBJS) $(ORTHO_DEPS) memsegs_c.o chkstk.o force
- $(GNATMAKE) -aI../../ortho/mcode -aI../../ortho $(GNATFLAGS) ghdl_mcode $(GNAT_BARGS) -largs memsegs_c.o chkstk.o $(GNAT_LARGS) $(GRT_ADD_OBJS) $(subst @,$(GRTSRCDIR),$(GRT_EXTRA_LIB))
+ $(GNATMAKE) -o $@ -aI../../ortho/mcode -aI../../ortho $(GNATFLAGS) ghdl_jit.adb $(GNAT_BARGS) -largs memsegs_c.o chkstk.o $(GNAT_LARGS) $(GRT_ADD_OBJS) $(subst @,$(GRTSRCDIR),$(GRT_EXTRA_LIB))
+
+memsegs_c.o: ../../ortho/mcode/memsegs_c.c
+ $(CC) -c -g -o $@ $<
ghdl_llvm_jit: GRT_FLAGS+=-DWITH_GNAT_RUN_TIME
ghdl_llvm_jit: default_pathes.ads $(GRT_ADD_OBJS) $(ORTHO_DEPS) llvm-cbindings.o force
- $(GNATMAKE) -o $@ -aI../../ortho/llvm -aI../../ortho $(GNATFLAGS) ghdl_mcode $(GNAT_BARGS) -largs llvm-cbindings.o $(GNAT_LARGS) $(GRT_ADD_OBJS) $(subst @,$(GRTSRCDIR),$(GRT_EXTRA_LIB)) `$(LLVM_CONFIG) --ldflags --libs --system-libs` -lc++
+ $(GNATMAKE) -o $@ -aI../../ortho/llvm -aI../../ortho $(GNATFLAGS) ghdl_jit.adb $(GNAT_BARGS) -largs llvm-cbindings.o $(GNAT_LARGS) $(GRT_ADD_OBJS) $(subst @,$(GRTSRCDIR),$(GRT_EXTRA_LIB)) `$(LLVM_CONFIG) --ldflags --libs --system-libs` -lc++
llvm-cbindings.o: ../../ortho/llvm/llvm-cbindings.cpp
$(CXX) -c -m64 `$(LLVM_CONFIG) --includedir --cxxflags` -g -o $@ $<
@@ -78,9 +81,6 @@ llvm-cbindings.o: ../../ortho/llvm/llvm-cbindings.cpp
ghdl_simul: default_pathes.ads $(GRT_ADD_OBJS) force
$(GNATMAKE) -aI../../simulate $(GNATFLAGS) ghdl_simul $(GNAT_BARGS) -largs $(GNAT_LARGS) $(GRT_ADD_OBJS) $(subst @,$(GRTSRCDIR),$(GRT_EXTRA_LIB))
-memsegs_c.o: ../../ortho/mcode/memsegs_c.c
- $(CC) -c -g -o $@ $<
-
ghdl_gcc: default_pathes.ads force
$(GNATMAKE) $(GNATFLAGS) ghdl_gcc $(GNAT_BARGS) -largs $(GNAT_LARGS)
@@ -162,8 +162,8 @@ install.llvm:
$(MAKE) GHDL=ghdl_llvm GHDL1=../ghdl1-llvm install.all
clean: force
- $(RM) -f *.o *.ali ghdl_gcc ghdl_mcode
- $(RM) -f b~*.ad? *~ default_pathes.ads
+ $(RM) -f *.o *.ali ghdl_gcc ghdl_mcode ghdl_llvm ghdl_llvm_jit
+ $(RM) -f b~*.ad? *~ default_pathes.ads ghdl_simul
$(RM) -rf ../lib
force:
diff --git a/translate/ghdldrv/ghdl_mcode.adb b/translate/ghdldrv/ghdl_jit.adb
index 56b2342..ba70874 100644
--- a/translate/ghdldrv/ghdl_mcode.adb
+++ b/translate/ghdldrv/ghdl_jit.adb
@@ -1,5 +1,5 @@
--- GHDL driver for mcode/jit.
--- Copyright (C) 2002, 2003, 2004, 2005 Tristan Gingold
+-- GHDL driver for jit.
+-- Copyright (C) 2002-2014 Tristan Gingold
--
-- GHDL is free software; you can redistribute it and/or modify it under
-- the terms of the GNU General Public License as published by the Free
@@ -19,15 +19,17 @@ with Ghdlmain;
with Ghdllocal;
with Ghdlprint;
with Ghdlrun;
+with Ortho_Jit;
-procedure Ghdl_Mcode is
+procedure Ghdl_Jit is
begin
-- Manual elaboration so that the order is known (because it is the order
-- used to display help).
- Ghdlmain.Version_String := new String'("mcode code generator");
+ Ghdlmain.Version_String :=
+ new String'(Ortho_Jit.Get_Jit_Name & " code generator");
Ghdlrun.Register_Commands;
Ghdllocal.Register_Commands;
Ghdlprint.Register_Commands;
Ghdlmain.Register_Commands;
Ghdlmain.Main;
-end Ghdl_Mcode;
+end Ghdl_Jit;