Bug 12844 - TARGET is undefined in bucomm.c
Summary: TARGET is undefined in bucomm.c
Status: RESOLVED INVALID
Alias: None
Product: binutils
Classification: Unclassified
Component: binutils (show other bugs)
Version: 2.21
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-05 09:06 UTC by Luke Peterson
Modified: 2011-06-08 23:17 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luke Peterson 2011-06-05 09:06:58 UTC
I'm running Kubuntu 11.04 on x86_64 and have downloaded binutils-2.21 and after untaring I run:
mkdir build
cd build
../configure
make

and I get this error:

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 -Werror -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
make[4]: *** [bucomm.o] Error 1

The same thing happens in the daily snapshot of binutils.  I have not found this error anywhere via Google, and the source simply says:

/* The macro TARGET is defined by Makefile.  */
  const char *target = TARGET;

Obviously, TARGET is not getting defined, but I don't know why.  I have tried setting the --target configure option (--target=arm-eabi, in my particular case), but this does not fix it.

It would be great to know what I'm doing wrong or if this is a bug.
Comment 1 Alan Modra 2011-06-08 23:17:57 UTC
C_INCLUDE_PATH set incorrectly