Hi,

I have found a way to compile the VHDL libraries without first installing GHDL 
in the system.
The warnings are still there but it seems to work.
Overall I think what I needed could be enabled with rather generic 
modifications to the ghdl Makefile.
Here are my build steps in hope it's useful.

1) Compile gcc with normal make in the gcc build dir
2) Patch the Makefile in the ghdl source directory (see attached patch)
3) Build libraries with that command:

make \
        GHDL="${srcdir}/gcc-build/gcc/ghdl" \
        ANALYZE_OPTS="--GHDL1=${srcdir}/gcc-build/gcc/ghdl1" \
        STD_GHDL_FLAGS="--GHDL1=${srcdir}/gcc-build/gcc/ghdl1" \
        vhdl.libs.all libs.vhdl.standard

4) Built grt: make libgrt.a
5) Install gcc and libraries as described in file BUILD.txt

So I patch the Makefile to be able to manually set the variables ANALYZE_OPTS 
and STD_GHDL_FLAGS from my build script.
And I have to split the original command "make ghdllib" into the steps 3) and 
4) because otherwise the path the GHDL is overwritten.

Regards,
Adrien


On Sat, 2016-11-19 at 22:41 +0100, Adrien Prost-Boucle wrote:
> In the Makefile line 344 there
> 
> ifeq "$(backend)" "gcc"
>   # ghdl with gcc backend is already installed, no need to specify ghdl1
>   # (and we don't know where it is).
>   STD_GHDL_FLAGS=
> else
> ...
> 
> I commented STD_GHDL_FLAGS= so I could manually set the path to ghdl1 from 
> command line
> Then I launched
> 
> make \
>   GHDL=/home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl \
>   
> STD_GHDL_FLAGS=--GHDL1=/home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/ghdl1
>  \
>   libs.vhdl.all libs.vhdl.standard
> 
> The target libs.vhdl.standard executes with no error, but for the target 
> libs.vhdl.all I still get the errors
> 
> /home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl -a --std=87 
> -P../std --work=ieee ../../src/ieee/std_logic_1164.v87
> /home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl:warning: 
> library std does not exists for v87
> /home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl:warning: 
> library ieee does not exists for v87
> ...
> 
> So now I'm blocked, no other idea about what to try...
> Any idea?
> 
> Adrien
--- Makefile
+++ Makefile
@@ -331,7 +331,7 @@
 
 ANALYZE_DEP:=ghdl_$(backend)$(EXEEXT)
 GHDL=$(PWD)/$(ANALYZE_DEP)
-ANALYZE_OPTS:=
+#ANALYZE_OPTS:=
 ANALYZE:=$(GHDL) -a $(ANALYZE_OPTS) $(LIB_CFLAGS)
 
 # TODO?: don't include, make it separate
@@ -341,7 +341,7 @@
 ifeq "$(backend)" "gcc"
   # ghdl with gcc backend is already installed, no need to specify ghdl1
   # (and we don't know where it is).
-  STD_GHDL_FLAGS=
+  #STD_GHDL_FLAGS=
 else
   # Specify ghdl1 path, as it is spawned by ghdl.
   STD_GHDL_FLAGS=--GHDL1=$(PWD)/ghdl1-$(backend)$(EXEEXT)
_______________________________________________
Ghdl-discuss mailing list
Ghdl-discuss@gna.org
https://mail.gna.org/listinfo/ghdl-discuss

Reply via email to