aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--BUILD.txt116
-rw-r--r--README117
-rwxr-xr-xconfigure8
3 files changed, 123 insertions, 118 deletions
diff --git a/BUILD.txt b/BUILD.txt
new file mode 100644
index 000000000..f0547e4ce
--- /dev/null
+++ b/BUILD.txt
@@ -0,0 +1,116 @@
+Build GHDL (Long instructions)
+******************************
+
+GHDL supports many backend (code generator), so you first must choose
+the backend you want to use. There are currently 3 supported backends:
+
+* gcc
+* mcode (this is an internal code generator for x86_64 and i386)
+* llvm (experimental)
+
+Here is a short comparaison:
+
+* gcc:
++ generated code is faster (particularly with -O or -O2)
++ generated code can be debugger (with -g)
++ the output is an executable
++ ported to many platforms (x86, x86_64, powerpc, sparc)
+- analyze can takes time (particularly for big units)
+- build is more complex
+
+* mcode
++ very easy to build
+- but x86_64/i386 only
++ very quick analysis time
++ can analyze very big designs
+- simulation is slower
+- no executable created
+
+* llvm
++ same advantages of gcc (good generated code, debuggable)
++ easier to build than gcc
+
+As GCC is written in Ada, you need to use the GNU Ada compiler (GNAT).
+I recommend to use GNAT GPL from http://libre.adacore.com (free).
+GHDL was tested with GNAT GPL 2014. Any later version should work.
+The only other dependency is zlib (On ubuntu/debian, install zlib1g-dev).
+
+Building with mcode backend
+***************************
+
+This is as simple as:
+$ ./configure --prefix=PREFIX
+ where PREFIX is the directory for installation
+$ make
+ This builds the ghdl_mcode executable, which can be used as is.
+$ make install
+ To install within PREFIX
+
+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
+
+Then invoke make to copy ghdl sources in the source dir:
+$ make copy-sources
+
+To build gcc, you must first compile gmp, mpfr and mpc (replace /usr/local
+ by your prefix directory):
+$ mkdir gmp-objs; cd gmp-objs
+$ ../gmp-4.3.2/configure --prefix=/usr/local --disable-shared
+$ make; make install
+$ cd ..; mkdir mpfr-objs; cd mpfr-objs
+$ ../mpfr-2.4.2/configure --prefix=/usr/local --disable-shared \
+ --with-gmp=/usr/local
+$ make; make install
+$ cd ..; mkdir mpc-objs; cd mpc-objs
+$ ../mpc-0.8.1/configure --prefix=/usr/local --disable-shared \
+ --with-gmp=/usr/local
+$ make; make install
+
+Then configure gcc:
+$ 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
+$ make -j2
+
+Finally install:
+$ make install
+or if you don't want to install makeinfo:
+$ make install MAKEINFO=true
+
+Building with the llvm backend
+******************************
+
+You need to build and install
+llvm version 3.5 [do not modify this line as this is read by scripts].
+
+First configure ghdl with '--with-llvm-config'
+$ ./configure --with-llvm-config
+
+If llvm-config is not in your path, you can specify it:
+$ ./configure --with-llvm-config=LLVM_INSTALL/bin/llvm-config
+
+If you want to have stack backtraces on errors (like assert failure or
+index of out bounds), you need to configure and build libbacktrace from gcc
+(you don't need to configure gcc), and add to configure:
+ --with-backtrace-lib=/path-to-gcc-build/libbacktrace/.libs/libbacktrace.a
+
+Then build with 'make' and install with 'make install'.
+
+Notes for developpers
+*********************
+
+Developping with the gcc backend:
+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 grt-all # To build the ghdl runtime
+$ make grt.links # To locally install the ghdl runtime
+TODO: gcc object dir
diff --git a/README b/README
index 08a7244ef..ffed7af33 100644
--- a/README
+++ b/README
@@ -28,7 +28,8 @@ If you aren't on linux, see below for full instructions.
You need GNAT GPL 2014 (or later) for x86 (32 or 64 bits). GNAT is the GNU Ada
compiler and GNAT GPL is very easy to install (download anonymously from
-libre.adacore.com, untar and run the doinstall script).
+libre.adacore.com, untar and run the doinstall script). You also need
+zlib (for Debian or Ubuntu: install zlib1g-dev package).
In the GHDL source directory, configure and build:
$ ./configure --prefix=/usr/local
@@ -43,116 +44,4 @@ That's all!
Build GHDL (Long instructions)
******************************
-GHDL supports many backend (code generator), so you first must choose
-the backend you want to use. There are currently 3 supported backends:
-
-* gcc
-* mcode (this is an internal code generator for x86_64 and i386)
-* llvm (experimental)
-
-Here is a short comparaison:
-
-* gcc:
-+ generated code is faster (particularly with -O or -O2)
-+ generated code can be debugger (with -g)
-+ the output is an executable
-+ ported to many platforms (x86, x86_64, powerpc, sparc)
-- analyze can takes time (particularly for big units)
-- build is more complex
-
-* mcode
-+ very easy to build
-- but x86_64/i386 only
-+ very quick analysis time
-+ can analyze very big designs
-- simulation is slower
-- no executable created
-
-* llvm
-+ same advantages of gcc (good generated code, debuggable)
-+ easier to build than gcc
-
-As GCC is written in Ada, you need to use the GNU Ada compiler (GNAT).
-I recommend to use GNAT GPL from http://libre.adacore.com (free).
-GHDL was tested with GNAT GPL 2014. Any later version should work.
-The only other dependency is zlib (On ubuntu/debian, install zlib1g-dev).
-
-Building with mcode backend
-***************************
-
-This is as simple as:
-$ ./configure --prefix=PREFIX
- where PREFIX is the directory for installation
-$ make
- This builds the ghdl_mcode executable, which can be used as is.
-$ make install
- To install within PREFIX
-
-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
-
-Then invoke make to copy ghdl sources in the source dir:
-$ make copy-sources
-
-To build gcc, you must first compile gmp, mpfr and mpc (replace /usr/local
- by your prefix directory):
-$ mkdir gmp-objs; cd gmp-objs
-$ ../gmp-4.3.2/configure --prefix=/usr/local --disable-shared
-$ make; make install
-$ cd ..; mkdir mpfr-objs; cd mpfr-objs
-$ ../mpfr-2.4.2/configure --prefix=/usr/local --disable-shared \
- --with-gmp=/usr/local
-$ make; make install
-$ cd ..; mkdir mpc-objs; cd mpc-objs
-$ ../mpc-0.8.1/configure --prefix=/usr/local --disable-shared \
- --with-gmp=/usr/local
-$ make; make install
-
-Then configure gcc:
-$ 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
-$ make -j2
-
-Finally install:
-$ make install
-or if you don't want to install makeinfo:
-$ make install MAKEINFO=true
-
-Building with the llvm backend
-******************************
-
-You need to build and install
-llvm version 3.5 [do not modify this line as this is read by scripts].
-
-First configure ghdl with '--with-llvm-config'
-$ ./configure --with-llvm-config
-
-If llvm-config is not in your path, you can specify it:
-$ ./configure --with-llvm-config=LLVM_INSTALL/bin/llvm-config
-
-If you want to have stack backtraces on errors (like assert failure or
-index of out bounds), you need to configure and build libbacktrace from gcc
-(you don't need to configure gcc), and add to configure:
- --with-backtrace-lib=/path-to-gcc-build/libbacktrace/.libs/libbacktrace.a
-
-Then build with 'make' and install with 'make install'.
-
-Notes for developpers
-*********************
-
-Developping with the gcc backend:
-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 grt-all # To build the ghdl runtime
-$ make grt.links # To locally install the ghdl runtime
-TODO: gcc object dir
+See BUILD.txt
diff --git a/configure b/configure
index 140666d74..e03b97132 100755
--- a/configure
+++ b/configure
@@ -38,12 +38,12 @@ else
echoc=
fi
-# Read required gcc version from README file
-gcc_version=`grep '^gcc version' $srcdir/README |
+# Read required gcc version from BUILD.txt file
+gcc_version=`grep '^gcc version' $srcdir/BUILD.txt |
sed -e 's/gcc version \([0-9.]*\) \[.*\]\.$/\1/'`
-# Read required llvm version from README file
-llvm_version=`grep '^llvm version' $srcdir/README |
+# Read required llvm version from BUILD.txt file
+llvm_version=`grep '^llvm version' $srcdir/BUILD.txt |
sed -e 's/llvm version \([0-9.]*\) \[.*\]\.$/\1/'`
# Check $1 is a prefix of $2