This wiki page describes how to build the project from source code.
The source code for the project may be checked out using Subversion. The following command line should work on most "unix"-like operating systems:
% svn checkout svn://svn.code.sf.net/p/elftoolchain/code/trunk
git-svn users can use:
% git svn clone https://svn.code.sf.net/p/elftoolchain/code elftoolchain
Version | Branch | Comments |
---|---|---|
HEAD | trunk | New development. |
0.7.* | branches/release-branch-0.7 | "Stable" branch. |
Generic notes about the build process:
Makefile
s are written in a portable subset of the BSD make language. C
compilation tool chain is needed. current development | Please see the file trunk/INSTALL for build instructions. |
Release 0.7.1 | Please see the file INSTALL in the released sources. |
Release 0.6.1 | Please see the file INSTALL in the released sources. |
Release 0.5.1 | Please see the file INSTALL in the released sources. |
The following community-contributed instructions describe the process of building the source tree on operating systems that are not directly supported by the build rules in the source tree.
On Fedora 15, the following packages are required:
Package | Description |
---|---|
bmake | The NetBSD make(1) tool |
byacc | Berkeley Yacc, a parser generator |
bzip2-devel | A file compression utility |
expat-devel | An XML parser library |
flex | A tool for creating scanners (text pattern recognizers) |
gcc | C compiler. |
libarchive-devel | A library for handling streaming archive formats |
mk-files | Support files for bmake, the NetBSD make(1) tool |
PyYAML | YAML parser and emitter for Python |
subversion | For accessing the repository. |
sharutils | The GNU shar utilities for packaging and unpackaging shell archives |
zlib-devel | The zlib compression and decompression library |
.if {OS_HOST} == "FreeBSD"
to .if {OS_HOST} == "FreeBSD" || ${OS_HOST} == "Linux"
You need to fix /usr/share/mk/bsd.lib.mk, apply this patch
--- bsd.lib.mk.org 2011-08-30 02:00:50.017818359 +0900 +++ bsd.lib.mk 2011-08-30 02:05:03.275059683 +0900 @@ -195,6 +195,8 @@ # but we can use lorder from NetBSD :-) LD_shared=-shared -h lib${LIB}.so.${SHLIB_MAJOR} LD_solib= --whole-archive lib${LIB}_pic.a +LORDER=echo +TSORT=cat .endif LORDER?=lorder TSORT?=tsort
You need to install TET for test.
See also: Ticket #336.
Wiki: BuildAutomation
Wiki: Home
Wiki: PortingNotes
Wiki: libdwarf
Wiki: libelf