This is the mail archive of the
mailing list for the binutils project.
Re: How to add a new target in binutils ?
On 2012å09æ21æ 01:27, Ian Lance Taylor wrote:
On Wed, Sep 19, 2012 at 11:41 PM, Shawn <email@example.com> wrote:Thanks Ian, that's great, GOLD is a nice work. I plan to take the
gold/powerpc.cc & elfcpp/powerpc.h as my start point.
I'm new to binutils and I want to port a linker to a new architecture.
What I need is just a very basic linker , which can link static elf object
files or static libraries into executables, no functionality for shared
library or dynamic link.
I tried the Gold first, but found it has been bounded to the binutils,
and can't be compiled separately. so I tried to port the bintuils as a
Although gold is part of the binutils, it does not use BFD. So to
port gold it would suffice to just change the top level configure and
But I still have some questions. At first I have tried to compile the
gold separately with following command :
but error occurs:
errorï ../bfd/bfdver.hïno such file or directory
make: *** [options.o] error 1
make: *** [all-recursive] error 1
make: *** [all] error 2
So can I compile the gold separately ?
configure: error: *** unknown target vector bfd_elf32_mpu_vec
You need to add your new vector to the list in bfd/configure.in and
then run autoconf.
I added the bfd_elf32_mpu_vec in bfd/configure.in as follows:
bfd_elf32_cr16_vec) tb="$tb elf32-cr16.lo elf32.lo $elf" ;;
bfd_elf32_mpu_vec) tb="$tb elf32-mpu.lo elf32.lo $elf" ;;
and the run the aclocal & autoconf , but errors
configure.in:116: warning: macro `AM_BINUTILS_WARNINGS' not found in library
configure.in:116: error: possibly undefined macro: AM_BINUTILS_WARNINGS
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
By the way, I have used the option "--enable-maintainer-mode" at the
first try, Will this option update the configuration script automatically ?