This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: TARGET undefined in bucomm.c
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Luke <hazelnusse at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Mon, 6 Jun 2011 10:57:45 -0700
- Subject: Re: TARGET undefined in bucomm.c
- References: <BANLkTinkW+Oh-K4+UwYTf56h1m8zvi2TYA@mail.gmail.com>
On Mon, Jun 6, 2011 at 10:45 AM, Luke <hazelnusse@gmail.com> wrote:
> I'm trying to compile binutils-2.21 on x86_64 . ?I configured using:
>
> $ mkdir build
> $ cd build
> $ ../configure --target=arm-none-eabi --enable-multilib --with-gnu-as
> --with-gnu-ld --disable-nls --disable-werror
>
> It gets through the compilation of libiterty, bfd, and opcodes. ?Then,
> when building binutils, it fails as follows:
>
> gcc -DHAVE_CONFIG_H -I. -I../../binutils ?-I. -I../../binutils
> -I../bfd -I../../binutils/../bfd -I../../binutils/../include
> -DLOCALEDIR="\"/usr/local/share/locale\""
> -Dbin_dummy_emulation=bin_vanilla_emulation ?-W -Wall
> -Wstrict-prototypes -Wmissing-prototypes -Wshadow -g -O2 -MT bucomm.o
> -MD -MP -MF .deps/bucomm.Tpo -c -o bucomm.o ../../binutils/bucomm.c
> ../../binutils/bucomm.c: In function ‘set_default_bfd_target’:
> ../../binutils/bucomm.c:160:24: error: ‘TARGET’ undeclared (first use
> in this function)
> ../../binutils/bucomm.c:160:24: note: each undeclared identifier is
> reported only once for each function it appears in
>
> I have grepped all the files for TARGET and don't understand why this
> would be happening -- am I using configure wrong, or do I need to
> define an environment variable?
>
> I have filed a bug report here:
> http://sourceware.org/bugzilla/show_bug.cgi?id=12844
>
> Searching the internet has been fruitless, has anybody else seen this behavior?
>
> Let me know if there is other information I should provide to help
> figure this out.
Please show
# grep TARGET binutils/config.h
I got
[hjl@gnu-6 build-x86_64-linux]$ grep TARGET binutils/config.h
#define TARGET "x86_64-unknown-linux-gnu"
#define TARGET_PREPENDS_UNDERSCORE 0
[hjl@gnu-6 build-x86_64-linux]$
--
H.J.