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


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?

~Luke

On Mon, Jun 6, 2011 at 10:13 PM, Ian Lance Taylor <iant@google.com> wrote:
> Luke <hazelnusse@gmail.com> writes:
>
>> but not when building bucomm.c. ÂSo config.h *isn't* being included,
>> for some reason. ÂI don't know which config.h is being included by
>> alloca-conf.h, but it isn't the generated binutils/config.h. ÂThe only
>> major difference I can see is the -I flags. ÂCould this have something
>> to do with it?
>
> Run something like
>
> make CFLAGS="-g -O2 --save-temps" bucomm.o
>
> That will create, besides bucomm.o, a file bucomm.i. ÂIn the first 20
> lines of bucomm.i you should see an entry for config.h. ÂWhere is
> config.h being found?
>
> When I try it, I see the appended, which shows config.h being included
> from the binutils build directory, as expected.
>
> Ian
>
> # 1 "../../src/binutils/bucomm.c"
> # 1 "/home/iant/binutils/objdir/binutils//"
> # 1 "<built-in>"
> # 1 "<command-line>"
> # 1 "../../src/binutils/bucomm.c"
> # 26 "../../src/binutils/bucomm.c"
> # 1 "../../src/binutils/sysdep.h" 1
> # 25 "../../src/binutils/sysdep.h"
> # 1 "../../src/binutils/../include/alloca-conf.h" 1
> # 1 "./config.h" 1
> # 2 "../../src/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
>



-- 
"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]