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


On Wed, Jun 08, 2011 at 01:28:08AM -0700, Luke wrote:
> Yes.  In the build folder (next to the source folder) there are these:
> $ find build -name "config.h"
> ./binutils/config.h
> ./opcodes/config.h
> ./libiberty/config.h
> ./intl/config.h
> ./bfd/config.h
> 
> the bucomm.o target is including finding bfg/config.h, instead of
> binutils/config.h:
> # 1 "../../binutils-2.21/binutils/bucomm.c"
> # 1 "/home/luke/repos/summon-arm-toolchain/build/binutils//"
> # 1 "<built-in>"
> # 1 "<command-line>"
> # 1 "../../binutils-2.21/binutils/bucomm.c"
> # 26 "../../binutils-2.21/binutils/bucomm.c"
> # 1 "../../binutils-2.21/binutils/sysdep.h" 1
> # 25 "../../binutils-2.21/binutils/sysdep.h"
> # 1 "../../binutils-2.21/binutils/../include/alloca-conf.h" 1
> # 1 "../bfd/config.h" 1
> # 2 "../../binutils-2.21/binutils/../include/alloca-conf.h" 2
> 
> I don't know why that is, but I think it must be the reason TARGETS is
> undefined.

Unless you have been editing include/alloca-conf.h, I'd say you have a
broken gcc.  The first line of alloca-conf.h is
#include "config.h"

There isn't a config.h in source_path/include/, so gcc should start
looking in the -I paths you showed on your gcc command line.  The
first one was "." and you're in build_path/binutils/ when compiling
bucomm.c, so gcc should pick up the config.h in that dir.  (Adding -v
to the gcc command line will verify the search paths.)  config.h is
readable isn't it?

-- 
Alan Modra
Australia Development Lab, IBM


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