From 0594d17c40ce054f61d2a5679e377467ebc7c796 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Mon, 10 Mar 2014 06:35:28 +0100 Subject: Rename ghdl_mcode.adb to ghdl_jit.adb. Display code generate name. --- translate/ghdldrv/Makefile | 14 +++++++------- translate/ghdldrv/ghdl_jit.adb | 35 +++++++++++++++++++++++++++++++++++ translate/ghdldrv/ghdl_mcode.adb | 33 --------------------------------- 3 files changed, 42 insertions(+), 40 deletions(-) create mode 100644 translate/ghdldrv/ghdl_jit.adb delete mode 100644 translate/ghdldrv/ghdl_mcode.adb (limited to 'translate') diff --git a/translate/ghdldrv/Makefile b/translate/ghdldrv/Makefile index 605f0a540..221a4a609 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_jit.adb b/translate/ghdldrv/ghdl_jit.adb new file mode 100644 index 000000000..ba7087492 --- /dev/null +++ b/translate/ghdldrv/ghdl_jit.adb @@ -0,0 +1,35 @@ +-- 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 +-- Software Foundation; either version 2, or (at your option) any later +-- version. +-- +-- GHDL is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or +-- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +-- for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with GCC; see the file COPYING. If not, write to the Free +-- Software Foundation, 59 Temple Place - Suite 330, Boston, MA +-- 02111-1307, USA. +with Ghdlmain; +with Ghdllocal; +with Ghdlprint; +with Ghdlrun; +with Ortho_Jit; + +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'(Ortho_Jit.Get_Jit_Name & " code generator"); + Ghdlrun.Register_Commands; + Ghdllocal.Register_Commands; + Ghdlprint.Register_Commands; + Ghdlmain.Register_Commands; + Ghdlmain.Main; +end Ghdl_Jit; diff --git a/translate/ghdldrv/ghdl_mcode.adb b/translate/ghdldrv/ghdl_mcode.adb deleted file mode 100644 index 56b23420c..000000000 --- a/translate/ghdldrv/ghdl_mcode.adb +++ /dev/null @@ -1,33 +0,0 @@ --- GHDL driver for mcode/jit. --- Copyright (C) 2002, 2003, 2004, 2005 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 --- Software Foundation; either version 2, or (at your option) any later --- version. --- --- GHDL is distributed in the hope that it will be useful, but WITHOUT ANY --- WARRANTY; without even the implied warranty of MERCHANTABILITY or --- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --- for more details. --- --- You should have received a copy of the GNU General Public License --- along with GCC; see the file COPYING. If not, write to the Free --- Software Foundation, 59 Temple Place - Suite 330, Boston, MA --- 02111-1307, USA. -with Ghdlmain; -with Ghdllocal; -with Ghdlprint; -with Ghdlrun; - -procedure Ghdl_Mcode 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"); - Ghdlrun.Register_Commands; - Ghdllocal.Register_Commands; - Ghdlprint.Register_Commands; - Ghdlmain.Register_Commands; - Ghdlmain.Main; -end Ghdl_Mcode; -- cgit v1.2.3