README revision 33965
1This is a beta release of a completely rewritten binutils distribution.
2(Rewritten since binutils 1.x, that is.)
3
4The linker (ld) has been moved into a separate directory, which should be
5../ld.  Linker-specific notes are in ../ld/README.
6
7As of version 2.5, the assembler (as) is also included in this package, in
8../gas.  Assembler-specific notes can be found in ../gas/README.
9
10Recent changes are in ./NEWS, ../ld/NEWS, and ../gas/NEWS.
11
12Unpacking and Installation -- quick overview
13============================================
14
15When you unpack the binutils-2.8.tar.gz file, you'll get a directory
16called something like `binutils-2.8', which contains various files and
17directories.  Most of the files in the top directory are for
18information and for configuration.  The actual source code is in
19subdirectories.
20
21To build binutils, you can just do:
22
23	cd binutils-2.8
24	./configure [ --enable-targets='target1,target2...' ]
25	make
26	make install # copies the programs files into /usr/local/bin
27		     # by default.
28
29This will configure and build all the libraries as well as the
30assembler, the binutils, and the linker.
31
32The --enable-targets option adds support for more binary file
33formats besides the default.  By default, support for only the
34selected target file format is compiled in.  To add support for more
35formats, list them as the argument to --enable-targets, separated by
36commas.  For example:
37
38	./configure --enable-targets=sun3,rs6000-aix,decstation
39
40The name 'all' compiles in support for all valid BFD targets (this was
41the default in releases before 2.3):
42
43	./configure --enable-targets=all
44
45The binutils can be used in a cross-development environment.
46The file etc/configure.texi contains more information.
47
48You can also specify the --enable-shared option when you run
49configure.  This will build the BFD and opcodes libraries as shared
50libraries.  This will only work on certain systems, and currently will
51only work when compiling with gcc.  You can use arguments with the
52--enable-shared option to indicate that only certain libraries should
53be built shared; for example, --enable-shared=bfd.  The only potential
54shared libraries in a binutils release are bfd and opcodes.
55
56The binutils will be linked against the shared libraries.  The build
57step will attempt to place the correct library in the runtime search
58path for the binaries.  However, in some cases, after you install the
59binaries, you may have to set an environment variable, normally
60LD_LIBRARY_PATH, so that the system can find the installed libbfd
61shared library.
62
63If you specify --enable-commonbfdlib as well as --enable-shared, then
64a single shared library will be built containing the bfd, opcodes, and
65libiberty libraries.  It will be installed as libbfd.  This option
66will make the binutils programs as small as possible.
67
68To build under openVMS/AXP, see the file makefile.vms in the top level
69directory.
70
71If you don't have ar
72====================
73
74If your system does not already have an ar program, the normal
75binutils build process will not work.  In this case, run configure as
76usual.  Before running make, run this script:
77
78#!/bin/sh
79MAKE=${MAKE-make}
80${MAKE} $* AR=true all-libiberty
81${MAKE} $* AR=true all-bfd
82cd binutils
83${MAKE} $* ADDL_DEPS='$(BULIBS)' ADDL_LIBS='$(BULIBS) ../bfd/*.o `cat ../libiberty/required-list ../libiberty/needed-list | sed -e "s,\([^ ][^ ]*\),../libiberty/\1,g"`' ar
84
85This script will build an ar program in binutils/ar.  Move binutils/ar
86into a directory on your PATH.  After doing this, you can run make as
87usual to build the complete binutils distribution.  You do not need
88the ranlib program in order to build the distribution.
89
90Porting
91=======
92Binutils-2.8 supports many different architectures, but there
93are many more not supported, including some that were supported
94by earlier versions.  We are hoping for volunteers to
95improve this situation.
96
97The major effort in porting binutils to a new host and/or target
98architecture involves the BFD library.  There is some documentation
99in ../bfd/doc.  The file ../gdb/doc/gdbint.texinfo (distributed
100with gdb-4.x) may also be of help.
101
102Reporting bugs
103==============
104Send bug reports and patches to bug-gnu-utils@prep.ai.mit.edu.  Always
105mention the version number you are running; this is printed by running
106any of the binutils with the --version option.  We appreciate reports
107about bugs, but we do not promise to fix them.
108