aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2016-07-15 06:32:58 +0200
committerTristan Gingold <tgingold@free.fr>2016-07-16 15:06:44 +0200
commite35b24adbb1d0e76c076fe475c8442738b3378be (patch)
treeb65ad8fa33cfad1dbbff863561d6cb964f889801
parent0eadd36bc47b08ad552d325c54f9e3a305c6838c (diff)
downloadghdl-e35b24adbb1d0e76c076fe475c8442738b3378be.tar.gz
ghdl-e35b24adbb1d0e76c076fe475c8442738b3378be.tar.bz2
ghdl-e35b24adbb1d0e76c076fe475c8442738b3378be.zip
Rework gcc build procedure. Add vpi build command.
-rw-r--r--BUILD.txt17
-rw-r--r--Makefile.in106
-rwxr-xr-xconfigure4
-rw-r--r--dist/gcc/Make-lang.in75
-rw-r--r--dist/gcc/README40
-rw-r--r--dist/gcc/config-lang.in2
-rw-r--r--src/ghdldrv/ghdl_gcc.adb2
-rw-r--r--src/ghdldrv/ghdl_llvm.adb2
8 files changed, 98 insertions, 150 deletions
diff --git a/BUILD.txt b/BUILD.txt
index 00fcda30b..51c6d91d7 100644
--- a/BUILD.txt
+++ b/BUILD.txt
@@ -52,8 +52,9 @@ Building with the gcc backend
You need to download and untar the sources of
gcc version 4.9 [do not modify this line as this is read by scripts].
-First configure ghdl and specify gcc source dir:
-$ ./configure --with-gcc=/path/to/gcc/source/dir
+First configure ghdl, specify gcc source dir and prefix.
+(replace /usr/local by your prefix directory):
+$ ./configure --with-gcc=/path/to/gcc/source/dir --prefix=/usr/local
Then invoke make to copy ghdl sources in the source dir:
$ make copy-sources
@@ -74,18 +75,24 @@ $ make; make install
Then configure gcc. The list of --disable configure options could be
adjusted for your needs. GHDL don't require all these optional
-libraries and disabling them speed-up the build.
+libraries and disabling them speed-up the build. Note the prefix
+directory must be the same as the one used to configure ghdl.
$ mkdir gcc-objs; cd gcc-objs
$ ../gcc-4.9.3/configure --prefix=/usr/local --enable-languages=c,vhdl \
--disable-bootstrap --with-gmp=/usr/local --disable-lto --disable-multilib \
--disable-libssp --disable-libgomp --disable-libquadmath
$ make -j2
-Finally install:
+Install gcc:
$ make install
or if you don't want to install makeinfo:
$ make install MAKEINFO=true
+Build and install vhdl libraries:
+$ cd ..
+$ make ghdllib
+$ make install
+
Building with the llvm backend
******************************
@@ -114,7 +121,7 @@ Once gcc (with ghdl) has been built once, it is possible to work on ghdl
sources tree without copying them in gcc tree. Commands are:
$ make ghdl1-gcc # To build the compiler
$ make ghdl_gcc # To build the driver
-$ make libs.vhdl.gcc # To compile the vhdl libraries
+$ make libs.vhdl.local_gcc # To compile the vhdl libraries
$ make grt-all # To build the ghdl runtime
$ make grt.links # To locally install the ghdl runtime
TODO: gcc object dir
diff --git a/Makefile.in b/Makefile.in
index 7bde0921b..66238f009 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -97,7 +97,7 @@ include $(GRTSRCDIR)/Makefile.inc
#################### For mcode backend ##############################
-all.mcode: ghdl_mcode libs.vhdl.mcode
+all.mcode: ghdl_mcode libs.vhdl.mcode all.vpi
GHDL_MCODE_INCFLAGS=$(GHDL_COMMON_INCFLAGS) -aI$(srcdir)/src/ghdldrv -aI$(srcdir)/src/grt -aI$(srcdir)/src/ortho -aI$(srcdir)/src/ortho/mcode
@@ -114,7 +114,7 @@ libs.vhdl.mcode: vhdl.libs.all
install.mcode.program: install.dirs ghdl_mcode
$(INSTALL_PROGRAM) ghdl_mcode $(DESTDIR)$(bindir)/ghdl
-install.mcode: install.mcode.program install.vhdllib
+install.mcode: install.mcode.program install.vhdllib install.vpi
oread-mcode: force
$(MAKE) -f $(srcdir)/src/ortho/mcode/Makefile \
@@ -126,8 +126,11 @@ oread-mcode: force
gcc_vhdl_dir=$(gcc_src_dir)/gcc/vhdl
all.gcc:
- echo "For installing sources in gcc, do: make copy-sources"
- echo "Then configure gcc"
+ echo "For installing sources in gcc, do:"
+ echo "1) make copy-sources"
+ echo "2) configure, build and install gcc"
+ echo "3) make ghdllib"
+ echo "4) make install"
copy-sources.gcc:
$(RM) -rf $(gcc_vhdl_dir)
@@ -141,21 +144,20 @@ copy-sources.gcc:
$(CP) -p $(srcdir)/src/ortho/gcc/*.c $(gcc_vhdl_dir)
$(CP) -p $(srcdir)/src/ortho/gcc/*.opt $(gcc_vhdl_dir)
$(CP) -p $(srcdir)/doc/ghdl.texi $(srcdir)/doc/ghdl.1 $(gcc_vhdl_dir)
- $(MKDIR) $(gcc_vhdl_dir)/grt
- $(CP) -pR $(srcdir)/src/grt/* $(gcc_vhdl_dir)/grt
- $(MKDIR) $(gcc_vhdl_dir)/libraries
- $(CP) -pR $(srcdir)/libraries/* $(gcc_vhdl_dir)/libraries
$(MKDIR) $(gcc_vhdl_dir)/ghdldrv
$(CP) -pR $(srcdir)/src/ghdldrv/*.ad? $(gcc_vhdl_dir)/ghdldrv
$(CP) -p $(srcdir)/dist/gcc/Make-lang.in $(gcc_vhdl_dir)
- $(SED) \
- -e "/^####libraries Makefile.inc/r $(srcdir)/libraries/Makefile.inc" \
- -e "/^####grt Makefile.inc/r $(srcdir)/src/grt/Makefile.inc" \
- < $(srcdir)/dist/gcc/Makefile.in > $(gcc_vhdl_dir)/Makefile.in
$(CP) -p $(srcdir)/dist/gcc/config-lang.in $(gcc_vhdl_dir)
$(CP) -p $(srcdir)/dist/gcc/lang-options.h $(gcc_vhdl_dir)
$(CP) -p $(srcdir)/dist/gcc/lang-specs.h $(gcc_vhdl_dir)
+libs.vhdl.gcc:
+ $(MAKE) GHDL=$(bindir)/ghdl vhdl.libs.all libs.vhdl.standard
+
+ghdllib: libs.vhdl.gcc libgrt.a
+
+install.gcc: install.vhdllib install.grt install.vpi
+
GHDL_GCC_INCFLAGS=$(GHDL_COMMON_INCFLAGS)
ghdl1-gcc: force
@@ -176,9 +178,7 @@ grt.links:
ln -sf $(libdirreverse)/libbacktrace.a .; \
fi
-libs.vhdl.gcc: ghdl_gcc ghdl1-gcc
- $(MAKE) GHDL=ghdl_gcc vhdl.libs.all
- $(MAKE) GHDL1=./ghdl1-gcc libs.vhdl.standard
+libs.vhdl.local_gcc: ghdl_gcc ghdl1-gcc vhdl.libs.all libs.vhdl.standard
ghdl1-debug: force
$(MAKE) -f $(srcdir)/src/ortho/debug/Makefile \
@@ -195,7 +195,7 @@ oread-gcc: force
GHDL_LLVM_INCFLAGS=$(GHDL_COMMON_INCFLAGS) -aI$(srcdir)/src/ghdldrv -aI$(srcdir)/src/grt -aI$(srcdir)/src/ortho -aI$(srcdir)/src/ortho/llvm
-all.llvm: ghdl1-llvm ghdl_llvm grt-all libs.vhdl.llvm
+all.llvm: ghdl1-llvm ghdl_llvm grt-all libs.vhdl.llvm all.vpi
all.llvm_jit: ghdl_llvm_jit
@@ -212,11 +212,10 @@ llvm-cbindings.o: $(srcdir)/src/ortho/llvm/llvm-cbindings.cpp
$(OPT_FLAGS) -o $@ $<
libs.vhdl.llvmjit: ghdl_llvm_jit
- $(MAKE) GHDL=ghdl_llvm_jit vhdl.libs.all
+ $(MAKE) GHDL=$(PWD)/ghdl_llvm_jit vhdl.libs.all
libs.vhdl.llvm: ghdl_llvm ghdl1-llvm
- $(MAKE) GHDL=ghdl_llvm ANALYZE_OPTS="--GHDL1=ghdl1-llvm$(EXEEXT)" vhdl.libs.all
- $(MAKE) GHDL1=./ghdl1-llvm$(EXEEXT) libs.vhdl.standard
+ $(MAKE) GHDL=$(PWD)/ghdl_llvm ANALYZE_OPTS="--GHDL1=ghdl1-llvm$(EXEEXT)" vhdl.libs.all libs.vhdl.standard
ghdl_llvm: force
$(GNATMAKE) $(GHDL_LLVM_INCFLAGS) -aI$(srcdir)/src/ghdldrv $(GNATFLAGS)\
@@ -235,16 +234,11 @@ oread-llvm: force
GNAT_FLAGS="-aI$(srcdir)/src/ortho/oread $(GNATFLAGS)" \
LLVM_CONFIG="$(LLVM_CONFIG)"
-install.grt.llvm: libgrt.a grt.lst install.dirs
- $(INSTALL_DATA) libgrt.a $(DESTDIR)$(VHDL_LIB_DIR)/libgrt.a
- $(INSTALL_DATA) grt.lst $(DESTDIR)$(VHDL_LIB_DIR)/grt.lst
- $(INSTALL_DATA) $(GRTSRCDIR)/grt.ver $(DESTDIR)$(VHDL_LIB_DIR)/grt.ver
-
install.llvm.program: install.dirs ghdl1-llvm ghdl_llvm
$(INSTALL_PROGRAM) ghdl_llvm$(EXEEXT) $(DESTDIR)$(bindir)/ghdl$(EXEEXT)
$(INSTALL_PROGRAM) ghdl1-llvm$(EXEEXT) $(DESTDIR)$(bindir)/ghdl1-llvm$(EXEEXT)
-install.llvm: install.llvm.program install.vhdllib install.grt.llvm
+install.llvm: install.llvm.program install.vhdllib install.grt install.vpi
################ For simul (no code generation, interpretation) ##########
@@ -253,8 +247,7 @@ GHDL_SIMUL_INCFLAGS=$(GHDL_COMMON_INCFLAGS) -aI$(srcdir)/src/ghdldrv -aI$(srcdir
ghdl_simul: $(GRT_ADD_OBJS) $(GRT_SRC_DEPS) force
$(GNATMAKE) $(GHDL_SIMUL_INCFLAGS) $(GNATFLAGS) ghdl_simul $(GNAT_BARGS) -largs $(GNAT_LARGS) $(GRT_ADD_OBJS) $(subst @,$(GRTSRCDIR),$(GRT_EXTRA_LIB))
-libs.vhdl.simul: ghdl_simul
- $(MAKE) GHDL=ghdl_simul vhdl.libs.all
+libs.vhdl.simul: ghdl_simul vhdl.libs.all
################ mhdlsim (library for the vhdl part) ####################
@@ -281,10 +274,18 @@ ghwdump.o: $(srcdir)/src/grt/ghwdump.c $(srcdir)/src/grt/ghwlib.h
ghwlib.o: $(srcdir)/src/grt/ghwlib.c $(srcdir)/src/grt/ghwlib.h
$(CC) -c -o $@ $< $(OPT_FLAGS) $(WARN_CFLAGS)
+############### grt #####################################################
+
+install.grt: libgrt.a grt.lst install.dirs
+ $(INSTALL_DATA) libgrt.a $(DESTDIR)$(VHDL_LIB_DIR)/libgrt.a
+ $(INSTALL_DATA) grt.lst $(DESTDIR)$(VHDL_LIB_DIR)/grt.lst
+ $(INSTALL_DATA) $(GRTSRCDIR)/grt.ver $(DESTDIR)$(VHDL_LIB_DIR)/grt.ver
+
################ VPI #####################################################
vpi_thunk.o: $(GRTSRCDIR)/vpi_thunk.c $(GRTSRCDIR)/vpi_thunk.h
- $(CC) -c -o $@ $< -fPIC $(OPT_FLAGS) $(WARN_CFLAGS)
+# Do not use OPT_FLAGS (do not enable coverage)
+ $(CC) -c -o $@ $< -fPIC -O $(WARN_CFLAGS)
libghdlvpi.so: vpi_thunk.o
$(CC) -o $@ $< -shared -Wl,-soname,libghdlvpi.so
@@ -296,7 +297,9 @@ libghdlvpi.dylib: vpi_thunk.o
# Allow the use of -rpath in executable
$(CC) -o $@ $< -shared -Wl,-install_name,@rpath/libghdlvpi.dylib
-install.vpi: libghdlvpi$(SOEXT) install.dirs
+all.vpi: libghdlvpi$(SOEXT)
+
+install.vpi: all.vpi install.dirs
$(INSTALL_DATA) -p libghdlvpi$(SOEXT) $(DESTDIR)$(libdir)/
$(INSTALL_DATA) -p $(GRTSRCDIR)/vpi_user.h $(DESTDIR)$(incdir)/
@@ -305,43 +308,30 @@ install.vpi: libghdlvpi$(SOEXT) install.dirs
LIBSRC_DIR:=$(srcdir)/libraries
LIBDST_DIR:=$(libdirsuffix)
-GHDL=ghdl_$(backend)
+GHDL=$(PWD)/ghdl_$(backend)
ANALYZE_OPTS:=
-ANALYZE:=$(libdirreverse)/../../$(GHDL) -a $(ANALYZE_OPTS) $(LIB_CFLAGS)
+ANALYZE:=$(GHDL) -a $(ANALYZE_OPTS) $(LIB_CFLAGS)
ANALYZE_DEP:=$(GHDL)
include $(srcdir)/libraries/Makefile.inc
-GHDL1=./ghdl1-gcc
-$(LIB93_DIR)/std/std_standard.o: $(GHDL1)
-ifeq ($(GHDL),ghdl_llvm)
- $(GHDL1) --std=93 -quiet $(LIB_CFLAGS) -c -o $@ --compile-standard
+ifeq "$(backend)" "gcc"
+ STD_GHDL_FLAGS=
else
- $(GHDL1) --std=93 -quiet $(LIB_CFLAGS) -o std_standard_93.s \
- --compile-standard
- $(CC) -c -o $@ std_standard_93.s
- $(RM) std_standard_93.s
+ STD_GHDL_FLAGS=--GHDL1=$(PWD)/ghdl1-$(backend)
endif
-$(LIB87_DIR)/std/std_standard.o: $(GHDL1)
-ifeq ($(GHDL),ghdl_llvm)
- $(GHDL1) --std=87 -quiet $(LIB_CFLAGS) -c -o $@ --compile-standard
-else
- $(GHDL1) --std=87 -quiet $(LIB_CFLAGS) -o std_standard_87.s \
- --compile-standard
- $(CC) -c -o $@ std_standard_87.s
- $(RM) std_standard_87.s
-endif
+$(LIB93_DIR)/std/std_standard.o: $(GHDL)
+ cd $(LIB93_DIR)/std; \
+ $(GHDL) --bootstrap-standard $(STD_GHDL_FLAGS) --std=93 $(LIB_CFLAGS)
-$(LIB08_DIR)/std/std_standard.o: $(GHDL1)
-ifeq ($(GHDL),ghdl_llvm)
- $(GHDL1) --std=08 -quiet $(LIB_CFLAGS) -c -o $@ --compile-standard
-else
- $(GHDL1) --std=08 -quiet $(LIB_CFLAGS) -o std_standard_08.s \
- --compile-standard
- $(CC) -c -o $@ std_standard_08.s
- $(RM) std_standard_08.s
-endif
+$(LIB87_DIR)/std/std_standard.o: $(GHDL)
+ cd $(LIB87_DIR)/std; \
+ $(GHDL) --bootstrap-standard $(STD_GHDL_FLAGS) --std=87 $(LIB_CFLAGS)
+
+$(LIB08_DIR)/std/std_standard.o: $(GHDL)
+ cd $(LIB08_DIR)/std; \
+ $(GHDL) --bootstrap-standard $(STD_GHDL_FLAGS) --std=08 $(LIB_CFLAGS)
libs.vhdl.standard: $(LIB93_DIR)/std/std_standard.o \
$(LIB87_DIR)/std/std_standard.o \
@@ -351,6 +341,8 @@ install.dirs:
[ -d $(DESTDIR)$(prefix) ] || $(MKDIR) -p $(DESTDIR)$(prefix)
[ -d $(DESTDIR)$(bindir) ] || $(MKDIR) -p $(DESTDIR)$(bindir)
[ -d $(DESTDIR)$(libdir) ] || $(MKDIR) -p $(DESTDIR)$(libdir)
+ [ -d $(DESTDIR)$(prefix)/$(libdirsuffix) ] || \
+ $(MKDIR) -p $(DESTDIR)$(prefix)/$(libdirsuffix)
[ -d $(DESTDIR)$(incdir) ] || $(MKDIR) -p $(DESTDIR)$(incdir)
install.vhdllib: install.dirs
diff --git a/configure b/configure
index 44839d38b..a00e8f998 100755
--- a/configure
+++ b/configure
@@ -149,6 +149,10 @@ if test $backend = gcc; then
echo "Need gcc version $gcc_version"
exit 1
fi
+ if test "x$backtrace_lib" = x ; then
+ # Automatically use libbacktrace from gcc.
+ backtrace_lib="$prefix/$libdirsuffix/libbacktrace.a"
+ fi
fi
# For llvm backend, check llvm-config
diff --git a/dist/gcc/Make-lang.in b/dist/gcc/Make-lang.in
index 8aa15e922..3316251d8 100644
--- a/dist/gcc/Make-lang.in
+++ b/dist/gcc/Make-lang.in
@@ -39,41 +39,17 @@
MV = mv
RM = rm -f
-GHDLLIB_CFLAGS=-O2 -g
-GHDLLIB_AFLAGS=-gnatpn
# Extra flags to pass to recursive makes.
GHDL_ADAFLAGS= -Wall -gnata
-VHDL_LIB_DIR=$(libsubdir)/vhdl
GNATBIND = gnatbind
GNATMAKE = gnatmake
-VHDL_FLAGS_TO_PASS = \
- "GHDL_ADAFLAGS=$(GHDL_ADAFLAGS)" \
- "GRT_FLAGS=$(GHDLLIB_CFLAGS)" \
- "GRT_ADAFLAGS=$(GHDLLIB_AFLAGS)" \
- "LIB_CFLAGS=$(GHDLLIB_CFLAGS)" \
- "GNATMAKE=$(GNATMAKE)" \
- "GNATBIND=$(GNATBIND)" \
- "CFLAGS=$(CFLAGS)" \
- "VHDL_LIB_DIR=$(VHDL_LIB_DIR)" \
- "INSTALL_DATA=$(INSTALL_DATA)" \
- "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
- "libexecsubdir=$(libexecsubdir)"
-
-# Command to run the Makefile in vhdl subdir. Don't forget the dependency on
-# vhdl/Makefile
-MAKE_IN_VHDL=$(MAKE) -C vhdl $(FLAGS_TO_PASS) $(VHDL_FLAGS_TO_PASS) ADAC="$(CC)" CC="$(CC)"
# Define the names for selecting vhdl in LANGUAGES.
-vhdl VHDL: ghdl1$(exeext) ghdl$(exeext) vhdl/libgrt.a ghdllib
+vhdl VHDL: ghdl1$(exeext) ghdl$(exeext)
# Tell GNU Make to ignore these, if they exist.
-.PHONY: vhdl VHDL ghdllib
-
-#ortho-lang.o: $(agcc_srcdir)/ortho-lang.c \
-# $(AGCC_GCCOBJ_DIR)gcc/gtype-vhdl.h \
-# $(AGCC_GCCOBJ_DIR)gcc/gt-vhdl-ortho-lang.h
-# $(COMPILER) -c -o $@ $< $(AGCC_CFLAGS) $(INCLUDES)
+.PHONY: vhdl VHDL
GHDL1_OBJS = attribs.o vhdl/ortho-lang.o
@@ -94,7 +70,23 @@ ghdl1$(exeext): force $(GHDL1_OBJS) $(BACKEND) $(LIBDEPS)
-bargs -E -cargs $(CFLAGS) $(GHDL_ADAFLAGS) \
-largs --LINK=$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) $(GHDL1_OBJS) \
$(filter-out main.o,$(BACKEND)) $(LIBS) $(BACKENDLIBS)
- if test $@ -nt s-ghdllib; then $(RM) -f s-ghdllib; fi
+
+vhdl_target1:=$(subst -gnu,,$(target))
+vhdl_targ:=$(subst -, ,$(vhdl_target1))
+ifeq ($(words $(vhdl_targ)),2)
+ vhdl_osys:=$(word 2,$(vhdl_targ))
+else
+ vhdl_osys:=$(word 3,$(vhdl_targ))
+endif
+
+# Set target files.
+ifeq ($(filter-out mingw32 mingw64,$(vhdl_osys)),)
+ VHDL_SOEXT=.dll
+else ifeq ($(filter-out darwin%,$(vhdl_osys)),)
+ VHDL_SOEXT=.dylib
+else
+ VHDL_SOEXT=.so
+endif
vhdl/default_pathes.ads: Makefile
echo "-- DO NOT EDIT" > tmp-dpathes.ads
@@ -113,7 +105,9 @@ vhdl/default_pathes.ads: Makefile
echo " Compiler_Llvm : constant String := \"\";" >> tmp-dpathes.ads
echo " Post_Processor : constant String := \"\";" >> tmp-dpathes.ads
echo " Lib_Prefix : constant String :=">> tmp-dpathes.ads
- echo " \"lib/gcc/$(target_noncanonical)/$(version)/vhdl/\";" >> tmp-dpathes.ads
+ echo " \"lib/ghdl\";" >> tmp-dpathes.ads
+ echo " Shared_Library_Extension : constant String :=">> tmp-dpathes.ads
+ echo " \"$(VHDL_SOEXT)\";" >> tmp-dpathes.ads
echo "end Default_Pathes;" >> tmp-dpathes.ads
$(srcdir)/../move-if-change tmp-dpathes.ads $@
@@ -122,21 +116,6 @@ ghdl$(exeext): ghdl1$(exeext) vhdl/default_pathes.ads force
$(GNATMAKE) -o $@ -aI$(srcdir)/vhdl -aI$(srcdir)/vhdl/ghdldrv \
-aIvhdl -aOvhdl ghdl_gcc \
-bargs -E -cargs $(ADA_CFLAGS) $(GHDL_ADAFLAGS) -largs $(LIBS)
- if test $@ -nt s-ghdllib; then $(RM) -f s-ghdllib; fi
-
-# Ghdl libraries. Also depends on xgcc to build std_standard.o
-s-ghdllib: ghdl$(exeext) ghdl1$(exeext) $(GCC_PASSES)
- $(MAKE_IN_VHDL) ghdllib
- touch $@
-
-ghdllib: s-ghdllib
-
-vhdl/libgrt.a: vhdl/Makefile force
- $(MAKE_IN_VHDL) libgrt.a grt.lst
-
-vhdl/Makefile: config.status $(srcdir)/vhdl/Makefile.in
- CONFIG_HEADERS= CONFIG_LINKS= CONFIG_COMMANDS= \
- CONFIG_FILES=vhdl/Makefile $(SHELL) config.status
# Build hooks:
@@ -173,20 +152,18 @@ vhdl.install-normal:
vhdl.install-plugin:
# Install the driver program as ghdl.
-vhdl.install-common: ghdl$(exeext) s-ghdllib vhdl/Makefile
+vhdl.install-common: ghdl$(exeext) ghdl1$(exeext)
-mkdir $(DESTDIR)$(bindir)
-$(RM) $(DESTDIR)$(bindir)/ghdl$(exeext)
$(INSTALL_PROGRAM) ghdl$(exeext) $(DESTDIR)$(bindir)/ghdl$(exeext)
-# Install the library
- $(MAKE_IN_VHDL) install-ghdllib
+ -mkdir $(DESTDIR)$(libdir)
+ -mkdir $(DESTDIR)$(libdir)/ghdl
+ $(INSTALL_DATA) ../libbacktrace/.libs/libbacktrace.a $(DESTDIR)$(libdir)/ghdl
install-info:: $(DESTDIR)$(infodir)/ghdl.info
vhdl.install-info: $(DESTDIR)$(infodir)/ghdl.info
-install-ghdllib: ghdl$(exeext) ghdl1$(exeext) vhdl/Makefile s-ghdllib
- $(MAKE_IN_VHDL) install-ghdllib
-
vhdl.install-man: $(DESTDIR)$(man1dir)/ghdl$(man1ext)
$(DESTDIR)$(man1dir)/ghdl$(man1ext): $(srcdir)/vhdl/ghdl.1
diff --git a/dist/gcc/README b/dist/gcc/README
index 48aa84ba7..41357265b 100644
--- a/dist/gcc/README
+++ b/dist/gcc/README
@@ -1,6 +1,7 @@
This is the README from the source distribution of GHDL.
-To get the binary distribution or more information, go to http://ghdl.free.fr
+To get the binary distribution or more information, go to:
+ https://github.com/tgingold/ghdl
Copyright:
**********
@@ -26,42 +27,7 @@ Boston, MA 02111-1307, USA.
Building GHDL from sources:
***************************
-Required:
-* the sources of @GCCVERSION@ (at least the core part).
- Note: other versions of gcc sources have not been tested.
-* the Ada95 GNAT compiler (GNAT GPL 2008 are known to work;
- Ada compilers in most Linux distributions are more or less buggy)
-* GNU/Linux for ix86 (pc systems) (porting is necessary for other systems)
-
-Procedure:
-* Check your Ada compiler. On some systems (or with some distribution), the
- GNAT compiler seems broken. Try this very simple example, using file
- example.adb
-<<<<<<<<<<<<<<<<<<
-procedure Example is
-begin
- null;
-end Example;
-<<<<<<<<<<<<<<<<<<
- Compile with
- $ gnatmake example
- It should create an executable, 'example'.
- If this doesn't work, your GNAT installation is broken. It may be a PATH
- problem or something else.
-* untar the gcc tarball
-* untar the ghdl tarball (this sould have been done, since you are reading a
- file from it).
-* move or copy the vhdl directory of ghdl into the gcc subdirectory of
- the gcc distribution.
- You should have a @GCCVERSION@/gcc/vhdl directory.
-* configure gcc with the --enable-languages=vhdl option. You may of course
- add other languages. Also you'd better to disable bootstraping using
- --disable-bootstrap.
- Refer to the gcc installation documentation.
-* compile gcc.
- 'make CFLAGS="-O"' is OK
-* install gcc. This installs the ghdl driver too.
- 'make install' is OK.
+See BUILD.txt
There is a mailing list for any questions. You can subscribe via:
https://mail.gna.org/listinfo/ghdl-discuss/
diff --git a/dist/gcc/config-lang.in b/dist/gcc/config-lang.in
index 7010b1127..3ce9851f3 100644
--- a/dist/gcc/config-lang.in
+++ b/dist/gcc/config-lang.in
@@ -33,6 +33,4 @@ compilers="ghdl1\$(exeext)"
stagestuff="ghdl\$(exeext) ghdl1\$(exeext)"
-outputs=vhdl/Makefile
-
gtfiles="\$(srcdir)/vhdl/ortho-lang.c"
diff --git a/src/ghdldrv/ghdl_gcc.adb b/src/ghdldrv/ghdl_gcc.adb
index d97a7ed16..f08c4cef0 100644
--- a/src/ghdldrv/ghdl_gcc.adb
+++ b/src/ghdldrv/ghdl_gcc.adb
@@ -19,6 +19,7 @@ with Ghdlmain;
with Ghdllocal;
with Ghdldrv;
with Ghdlprint;
+with Ghdlvpi;
procedure Ghdl_Gcc is
begin
@@ -27,6 +28,7 @@ begin
Ghdlmain.Version_String := new String'("GCC back-end code generator");
Ghdldrv.Backend := Ghdldrv.Backend_Gcc;
Ghdldrv.Register_Commands;
+ Ghdlvpi.Register_Commands;
Ghdllocal.Register_Commands;
Ghdlprint.Register_Commands;
Ghdlmain.Register_Commands;
diff --git a/src/ghdldrv/ghdl_llvm.adb b/src/ghdldrv/ghdl_llvm.adb
index 7f2efddc5..4c4c948d3 100644
--- a/src/ghdldrv/ghdl_llvm.adb
+++ b/src/ghdldrv/ghdl_llvm.adb
@@ -19,6 +19,7 @@ with Ghdlmain;
with Ghdllocal;
with Ghdlprint;
with Ghdldrv;
+with Ghdlvpi;
procedure Ghdl_Llvm is
begin
@@ -27,6 +28,7 @@ begin
Ghdlmain.Version_String := new String'("llvm code generator");
Ghdldrv.Backend := Ghdldrv.Backend_Llvm;
Ghdldrv.Register_Commands;
+ Ghdlvpi.Register_Commands;
Ghdllocal.Register_Commands;
Ghdlprint.Register_Commands;
Ghdlmain.Register_Commands;