README revision 60484
1These are the GNU binutils. These are utilities of use when dealing 2with object files. 3 4The linker (ld) is in a separate directory, which should be ../ld. 5Linker-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.9.tar.gz file, you'll get a directory 16called something like `binutils-2.9', 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.9 24 ./configure [options] 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 32If you have GNU make, we recommend building in a different directory: 33 34 mkdir objdir 35 cd objdir 36 ../binutils-2.9/configure [options] 37 make 38 make install 39 40This relies on the VPATH feature of GNU make. 41 42By default, the binutils will be configured to support the system on 43which they are built. When doing cross development, use the --target 44configure option to specify a different target. 45 46The --enable-targets option adds support for more binary file formats 47besides the default. List them as the argument to --enable-targets, 48separated by commas. For example: 49 50 ./configure --enable-targets=sun3,rs6000-aix,decstation 51 52The name 'all' compiles in support for all valid BFD targets (this was 53the default in releases before 2.3): 54 55 ./configure --enable-targets=all 56 57You can also specify the --enable-shared option when you run 58configure. This will build the BFD and opcodes libraries as shared 59libraries. You can use arguments with the --enable-shared option to 60indicate that only certain libraries should be built shared; for 61example, --enable-shared=bfd. The only potential shared libraries in 62a binutils release are bfd and opcodes. 63 64The binutils will be linked against the shared libraries. The build 65step will attempt to place the correct library in the runtime search 66path for the binaries. However, in some cases, after you install the 67binaries, you may have to set an environment variable, normally 68LD_LIBRARY_PATH, so that the system can find the installed libbfd 69shared library. 70 71To build under openVMS/AXP, see the file makefile.vms in the top level 72directory. 73 74If you don't have ar 75==================== 76 77If your system does not already have an ar program, the normal 78binutils build process will not work. In this case, run configure as 79usual. Before running make, run this script: 80 81#!/bin/sh 82MAKE_PROG="${MAKE-make}" 83MAKE="${MAKE_PROG} AR=true LINK=true" 84export MAKE 85${MAKE} $* all-libiberty 86${MAKE} $* all-intl 87${MAKE} $* all-bfd 88cd binutils 89MAKE="${MAKE_PROG}" 90export MAKE 91${MAKE} $* ar_DEPENDENCIES= ar_LDADD='../bfd/*.o `cat ../libiberty/required-list ../libiberty/needed-list | sed -e "s,\([^ ][^ ]*\),../libiberty/\1,g"` `if test -f ../intl/gettext.o; then echo '../intl/*.o'; fi`' ar 92 93This script will build an ar program in binutils/ar. Move binutils/ar 94into a directory on your PATH. After doing this, you can run make as 95usual to build the complete binutils distribution. You do not need 96the ranlib program in order to build the distribution. 97 98Porting 99======= 100 101Binutils-2.9 supports many different architectures, but there 102are many more not supported, including some that were supported 103by earlier versions. We are hoping for volunteers to 104improve this situation. 105 106The major effort in porting binutils to a new host and/or target 107architecture involves the BFD library. There is some documentation 108in ../bfd/doc. The file ../gdb/doc/gdbint.texinfo (distributed 109with gdb-4.x) may also be of help. 110 111Reporting bugs 112============== 113 114Send bug reports and patches to bug-gnu-utils@gnu.org. Always mention 115the version number you are running; this is printed by running any of 116the binutils with the --version option. We appreciate reports about 117bugs, but we do not promise to fix them. 118 119VMS 120=== 121 122This section was written by Klaus K"ampf <kkaempf@rmi.de>. It 123describes how to build and install the binutils on openVMS (Alpha and 124Vax). (The BFD library only supports reading Vax object files.) 125 126Compiling the release: 127 128To compile the gnu binary utilities and the gnu assembler, you'll 129need DEC C or GNU C for openVMS/Alpha. You'll need *both* compilers 130on openVMS/Vax. 131 132Compiling with either DEC C or GNU C works on openVMS/Alpha only. Some 133of the opcodes and binutils files trap a bug in the DEC C optimizer, 134so these files must be compiled with /noopt. 135 136Compiling on openVMS/Vax is a bit complicated, as the bfd library traps 137a bug in GNU C and the gnu assembler a bug in (my version of) DEC C. 138 139I never tried compiling with VAX C. 140 141 142You further need GNU Make Version 3.76 or later. This is available 143at ftp.progis.de or any GNU archive site. The makefiles assume that 144gmake starts gnu make as a foreign command. 145 146If you're compiling with DEC C or VAX C, you must run 147 148 $ @setup 149 150before starting gnu-make. This isn't needed with GNU C. 151 152On the Alpha you can choose the compiler by editing the toplevel 153makefile.vms. Either select CC=cc (for DEC C) or CC=gcc (for GNU C) 154 155 156Installing the release 157 158Provided that your directory setup conforms to the GNU on openVMS 159standard, you already have a concealed deviced named 'GNU_ROOT'. 160In this case, a simple 161 162 $ gmake install 163 164suffices to copy all programs and libraries to the proper directories. 165 166Define the programs as foreign commands by adding these lines to your 167login.com: 168 169 $ gas :== $GNU_ROOT:[bin]as.exe 170 $ size :== $GNU_ROOT:[bin]size.exe 171 $ nm :== $GNU_ROOT:[bin]nm.exe 172 $ objdump :== $GNU_ROOT:[bin]objdump.exe 173 $ strings :== $GNU_ROOT:[bin]strings.exe 174 175If you have a different directory setup, copy the binary utilities 176([.binutils]size.exe, [.binutils]nm.exe, [.binutils]objdump.exe, 177and [.binutils]strings.exe) and the gnu assembler and preprocessor 178([.gas]as.exe and [.gas]gasp.exe]) to a directory of your choice 179and define all programs as foreign commands. 180 181 182If you're satiesfied with the compilation, you may want to remove 183unneeded objects and libraries: 184 185 $ gmake clean 186 187 188If you have any problems or questions about the binutils on VMS, feel 189free to mail me at kkaempf@rmi.de. 190