]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - binutils/README
* config/sh/tm-sh.h (BELIEVE_PCC_PROMOTION): Define, so that
[thirdparty/binutils-gdb.git] / binutils / README
CommitLineData
eba174ce 1This is a beta release of a completely rewritten binutils distribution.
7d1f3464
ILT
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.
d08a5233
PB
9
10These programs have been tested on various architectures.
d08a5233
PB
11However, since this is a beta release taken directly from an
12evolving source tree, there might be some problems. In particular,
13the programs have not been ported to as many machines as the
14old binutils. There are also features of the old versions
15that are missing on the new programs. We would appreciate
16patches to make things run on other machines; especially welcome
17are fixes for what used to work on the old programs!
eba174ce
PB
18(See ./TODO, as well a ../bfd/TODO and ../ld/TODO.)
19
7d1f3464 20Recent changes are in ./NEWS, ../ld/NEWS, and ../gas/NEWS.
d08a5233
PB
21
22Unpacking and Installation -- quick overview
23==========================
24
25In this release, the binary utilities, the linker, the generic GNU include
eba174ce 26files, the BFD ("binary file description") library, gprof, and getopt all
7d1f3464 27have directories of their own underneath the binutils-2.7 directory.
d08a5233
PB
28The idea is that a variety of GNU tools can
29share a common copy of these things. Configuration scripts and
30makefiles exist to cruise up and down this directory tree and
31automatically build all the pieces in the right order.
32
7d1f3464
ILT
33When you unpack the binutils-2.7.tar.gz file, you'll get a directory
34called something like `binutils-2.7', which contains:
d08a5233 35
7d1f3464
ILT
36 COPYING bfd/ configure* libiberty/
37 COPYING.LIB binutils/ configure.in move-if-change*
38 CYGNUS build-all.mk etc/ opcodes/
39 ChangeLog config/ gprof/ test-build.mk
40 Makefile.in config.guess* inc
d08a5233
PB
41
42To build binutils, you can just do:
43
7d1f3464
ILT
44 cd binutils-2.7
45 ./configure [ --enable-targets='target1,target2...' ]
d08a5233 46 make
7d1f3464
ILT
47 make install # copies the programs files into /usr/local/bin
48 # by default.
eba174ce 49
d08a5233
PB
50This will configure and build all the libraries as well as binutils
51and the linker.
52
7d1f3464
ILT
53The --enable-targets option adds support for more binary file
54formats besides the default. By default, support for only the
55selected target file format is compiled in. To add support for more
56formats, list them as the argument to --enable-targets, separated by
57commas. For example:
58
59 ./configure --enable-targets=sun3,rs6000-aix,decstation
60
61The name 'all' compiles in support for all valid BFD targets (this was
62the default in previous releases):
63
64 ./configure --enable-targets=all
65
d08a5233 66The binutils can be used in a cross-development environment.
7d1f3464
ILT
67The file etc/configure.texi contains more information.
68
69You can also specify the --enable-shared option when you run
70configure. This will build the BFD and opcodes libraries as shared
71libraries. This will only work on certain systems, and currently will
72only work when compiling with gcc. You can use arguments with the
73--enable-shared option to indicate that only certain libraries should
74be built shared; for example, --enable-shared=bfd. The only
75possibilities in a binutils release are bfd and opcodes.
76
77The binutils will be linked against the shared libraries. The build
78step will attempt to place the correct library in the runtime search
79path for the binaries. However, in some cases, after you install the
80binaries, you may have to set an environment variable, normally
81LD_LIBRARY_PATH, so that the system can find the installed libbfd
82shared library.
83
84If you specify --enable-commonbfdlib as well as --enable-shared, then
85a single shared library will be built containing the bfd, opcodes, and
86libiberty libraries. It will be installed as libbfd. This option
87will make the binutils programs as small as possible.
88
89If you don't have ar
90====================
91
92If your system does not already have an ar program, the normal
93binutils build process will not work. In this case, run configure as
94usual. Before running make, run this script:
95
96#!/bin/sh
97MAKE=${MAKE-make}
98${MAKE} $* AR=true all-libiberty
99${MAKE} $* AR=true all-bfd
100cd binutils
101${MAKE} $* ADDL_DEPS='$(BULIBS)' ADDL_LIBS='$(BULIBS) ../bfd/*.o `cat ../libiberty/required-list ../libiberty/needed-list | sed -e "s,\([^ ][^ ]*\),../libiberty/\1,g"`' ar
102
103This script will build an ar program in binutils/ar. Move binutils/ar
104into a directory on your PATH. After doing this, you can run make as
105usual to build the complete binutils distribution. You do not need
106the ranlib program in order to build the distribution.
d08a5233
PB
107
108Porting
109=======
7d1f3464 110Binutils-2.7 supports many different architectures, but there
d08a5233
PB
111are many more not supported, including some that were supported
112by earlier versions. We are hoping for volunteers to
113improve this situation.
114
115The major effort in porting binutils to a new host and/or target
116architecture involves the BFD library. There is some documentation
117in ../bfd/doc. The file ../gdb/doc/gdbint.texinfo (distributed
eba174ce 118with gdb-4.x) may also be of help.
d08a5233
PB
119
120If your system uses some variant of old-style a.out-format,
121you can start with a copy of bfd/newsos3.c, and edit it to fit.
122(You may also need to tweak bfd/aout-target.h.)
123Alternatively, you could use the host-aout.c target. This is a
124special kludge that only works for native (non-cross) configurations.
125
126Reporting bugs
127==============
128If you can't track down a bug and send suggestions/patches
129for fixes, you should probably *not* be using this release.
eba174ce
PB
130We have little time to spend tracking down whatever random bugs you
131may run into (except for configurations that Cygnus supports for
132its customers). The general place to send bug reports or patches
133is to bug-gnu-utils@ai.mit.edu; you can also send them directly to
7d1f3464 134raeburn@cygnus.com or ian@cygnus.com.