This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: TARGET undefined in bucomm.c


I tried three approaches, all which led to the same error:

First, a build folder outside of the source tree:
$ tar xvf binutils-2.21.tar.bz2
$ mkdir build
$ cd build
$ ../binutils-2.21/configure
$ make

and I get:
make[4]: Entering directory
`/home/luke/repos/summon-arm-toolchain/build/binutils'
gcc -DHAVE_CONFIG_H -I. -I../../binutils-2.21/binutils  -I.
-I../../binutils-2.21/binutils -I../bfd
-I../../binutils-2.21/binutils/../bfd
-I../../binutils-2.21/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-2.21/binutils/bucomm.c
../../binutils-2.21/binutils/bucomm.c: In function âset_default_bfd_targetâ:
../../binutils-2.21/binutils/bucomm.c:160:24: error: âTARGETâ
undeclared (first use in this function)
../../binutils-2.21/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


Second, I tried a build in the source tree:
$ tar xvf binutils-2.21.tar.bz2
$ cd binutils-2.21
$ ./configure
$ make

and I get:
make[4]: Entering directory
`/home/luke/repos/summon-arm-toolchain/binutils-2.21/binutils'
gcc -DHAVE_CONFIG_H -I.  -I. -I. -I../bfd -I./../bfd -I./../include
-DLOCALEDIR="\"/usr/local/share/locale\""
-Dbin_dummy_emulation=bin_vanilla_emulation  -W -Wall
-Wstrict-prototypes -Wmissing-prototypes -Wshadow -g -O2 -MT size.o
-MD -MP -MF .deps/size.Tpo -c -o size.o size.c
mv -f .deps/size.Tpo .deps/size.Po
gcc -DHAVE_CONFIG_H -I.  -I. -I. -I../bfd -I./../bfd -I./../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 bucomm.c
bucomm.c: In function âset_default_bfd_targetâ:
bucomm.c:160:24: error: âTARGETâ undeclared (first use in this function)
bucomm.c:160:24: note: each undeclared identifier is reported only
once for each function it appears in
make[4]: *** [bucomm.o] Error 1

Finally, if I make a build folder inside of the source tree, I get the
same exact result, which is what I reported previously.

So this doesn't seem to be the source of the problem.


~Luke


On Tue, Jun 7, 2011 at 11:58 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Tue, Jun 7, 2011 at 11:26 AM, Luke <hazelnusse@gmail.com> wrote:
>> Here are the first lines of bucomm.i:
>>
>> # 1 "../../binutils/bucomm.c"
>> # 1 "/home/luke/repos/summon-arm-toolchain/binutils-2.21/build/binutils//"
>> # 1 "<built-in>"
>> # 1 "<command-line>"
>> # 1 "../../binutils/bucomm.c"
>> # 26 "../../binutils/bucomm.c"
>> # 1 "../../binutils/sysdep.h" 1
>> # 25 "../../binutils/sysdep.h"
>> # 1 "../../binutils/../include/alloca-conf.h" 1
>> # 1 "../bfd/config.h" 1
>> # 2 "../../binutils/../include/alloca-conf.h" 2
>>
>>
>> # 1 "/usr/include/alloca.h" 1 3 4
>> # 22 "/usr/include/alloca.h" 3 4
>> # 1 "/usr/include/features.h" 1 3 4
>>
>> So, for some reason, it is finding config.h in the bfd folder.
>>
>> What should I do to fix this?
>>
>
> Don't put build directory inside binutils source tree.
>
>
> H.J.
>



-- 
"Those who would give up essential liberty to purchase a little
temporary safety deserve neither liberty nor safety."

-- Benjamin Franklin, Historical Review of Pennsylvania, 1759


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]