summaryrefslogtreecommitdiff
path: root/dist/gcc/README
blob: 48aa84ba7668a2596492f78e5301afb78866ebdb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
This is the README from the source distribution of GHDL.

To get the binary distribution or more information, go to http://ghdl.free.fr

Copyright:
**********
GHDL is copyright (c) 2002 - 2015 Tristan Gingold.
See the GHDL manual for more details.

This program 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 of the License, or
(at your option) any later version.

This program 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 this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
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.

There is a mailing list for any questions.  You can subscribe via:
  https://mail.gna.org/listinfo/ghdl-discuss/
Please report bugs on https://github.com/tgingold/ghdl/issues

If you cannot compile, please report the gcc version, GNAT version and gcc
source version.

* Note for ppc64 (and AIX ?) platform:
The object file format contains an identifier for the source language. Because
gcc doesn't know about the VHDL, gcc crashes very early. This could be fixed
with a very simple change in gcc/config/rs6000/rs6000.c,
function rs6000_output_function_epilogue (as of gcc 4.8):
       else if (! strcmp (language_string, "GNU Objective-C"))
        i = 14;
       else
-       gcc_unreachable ();
+       i = 0;
       fprintf (file, "%d,", i);

       /* 8 single bit fields: global linkage (not set for C extern linkage,

Tristan Gingold.