include problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 hi

I am having a problem when building binutils, when building it is
picking up the wrong copy of a header file.

it is not not taking the file from the local dir. even with -I. first.

want is wrong?????

roger@roger-VirtualBox:~/minsoc/minsoc/tools/gcc-src/binutils-build/binutils$
gcc --version
gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

build line :-
gcc -DHAVE_CONFIG_H -I. -I../../binutils-2.20.1/binutils -I.
-I../../binutils-2.20.1/binutils -I../bfd
-I../../binutils-2.20.1/binutils/../bfd
-I../../binutils-2.20.1/binutils/../include
-DLOCALEDIR="\"/home/roger/cpu_tools/share/locale\""
-Dbin_dummy_emulation=bin_vanilla_emulation -W -Wall -Wstrict-prototypes
-Wmissing-prototypes -Werror -g -O2 -MT bucomm.o -MD -MP -MF
.deps/bucomm.Tpo -c -o bucomm.o ../../binutils-2.20.1/binutils/bucomm.c
../../binutils-2.20.1/binutils/bucomm.c: In function
‘set_default_bfd_target’:
../../binutils-2.20.1/binutils/bucomm.c:155:24: error: ‘TARGET’
undeclared (first use in this function)
../../binutils-2.20.1/binutils/bucomm.c:155:24: note: each undeclared
identifier is reported only once for each function it appears in
make[4]: *** [bucomm.o] Error 1
make[4]: Leaving directory
`/home/roger/minsoc/minsoc/tools/gcc-src/binutils-build/binutils'

files :-
roger@roger-VirtualBox:~/minsoc/minsoc/tools/gcc-src/binutils-build$ ls
binutils/
config.cache config.log defparse.c doc Makefile mcparse.h rcparse.c
size.o sysinfo sysinfo.h syslex.c sysroff.h
config.h config.status defparse.h libtool mcparse.c po rcparse.h
stamp-h1 sysinfo.c sysinfo.o syslex.o
roger@roger-VirtualBox:~/minsoc/minsoc/tools/gcc-src/binutils-build$ ls bfd/
archive.lo bfdwin.lo config.log elf32-gen.o elflink.o init.o ofiles
stabs.lo targmatch.h
archive.o bfdwin.o config.status elf32.lo elf.lo libbfd.a opncls.lo
stabs.o tekhex.lo
archures.lo binary.lo corefile.lo elf32.o elf.o libbfd.la opncls.o
stab-syms.lo tekhex.o
archures.o binary.o corefile.o elf32-or32.lo elf-strtab.lo libbfd.lo po
stab-syms.o verilog.lo
bfd.h cache.lo cpu-or32.lo elf32-or32.o elf-strtab.o libbfd.o reloc.lo
stamp-h1 verilog.o
bfd-in3.h cache.o cpu-or32.o elf32-target.h format.lo libtool reloc.o
stamp-lib
bfdio.lo coffgen.lo doc elf64-target.h format.o libtool-soversion
section.lo stamp-ofiles
bfdio.o coffgen.o dwarf1.lo elf-attrs.lo hash.lo linker.lo section.o
stmp-bfd-h
bfd.lo compress.lo dwarf1.o elf-attrs.o hash.o linker.o simple.lo syms.lo
bfd.o compress.o dwarf2.lo elf-eh-frame.lo ihex.lo Makefile simple.o syms.o
bfd_stdint.h config.cache dwarf2.o elf-eh-frame.o ihex.o merge.lo
srec.lo targets.lo
bfdver.h config.h elf32-gen.lo elflink.lo init.lo merge.o srec.o targets.o



building with -E :-
# 1 "../../binutils-2.20.1/binutils/bucomm.c"
# 1 "/home/roger/minsoc/minsoc/tools/gcc-src/binutils-build/binutils//"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "../../binutils-2.20.1/binutils/bucomm.c"
# 26 "../../binutils-2.20.1/binutils/bucomm.c"
# 1 "../../binutils-2.20.1/binutils/sysdep.h" 1
# 25 "../../binutils-2.20.1/binutils/sysdep.h"
# 1 "../../binutils-2.20.1/binutils/../include/alloca-conf.h" 1
# 1 "../bfd/config.h" 1
# 2 "../../binutils-2.20.1/binutils/../include/alloca-conf.h" 2

and strace :-

24734 open("../../binutils-2.20.1/binutils/alloca-conf.h",
O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
24734 open("../bfd/alloca-conf.h", O_RDONLY|O_NOCTTY) = -1 ENOENT (No
such file or directory)
24734 open("../../binutils-2.20.1/binutils/../bfd/alloca-conf.h",
O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
24734 open("../../binutils-2.20.1/binutils/../include/alloca-conf.h",
O_RDONLY|O_NOCTTY) = 4
24734 fstat64(4, {st_mode=S_IFREG|0644, st_size=1142, ...}) = 0
24734 read(4, "#include \"config.h\"\n\n/* This is "..., 1142) = 1142
24734 close(4) = 0
24734 open("../../binutils-2.20.1/binutils/../include/config.h",
O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
24734 open("../../binutils-2.20.1/binutils/config.h", O_RDONLY|O_NOCTTY)
= -1 ENOENT (No such file or directory)
24734 open("../bfd/config.h", O_RDONLY|O_NOCTTY) = 4
24734 fstat64(4, {st_mode=S_IFREG|0644, st_size=9466, ...}) = 0
24734 read(4, "/* config.h. Generated from con"..., 9466) = 9466
24734 close(4) = 0
24734 open("../../binutils-2.20.1/binutils/alloca.h", O_RDONLY|O_NOCTTY)
= -1 ENOENT (No such file or directory)
24734 open("../bfd/alloca.h", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such
file or directory)




Roger


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux