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


The gcc I am using is what came with Kubuntu 11.04:
luke@ThinkPad-W510:binutils$ gcc --version -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/lto-wrapper
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.


Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
4.5.2-8ubuntu4'
--with-bugurl=file:///usr/share/doc/gcc-4.5/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.5 --enable-shared --enable-multiarch
--with-multiarch-defaults=x86_64-linux-gnu --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib/x86_64-linux-gnu
--without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.5
--libdir=/usr/lib/x86_64-linux-gnu --enable-nls --with-sysroot=/
--enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-plugin --enable-gold
--enable-ld=default --with-plugin-ld=ld.gold --enable-objc-gc
--disable-werror --with-arch-32=i686 --with-tune=generic
--enable-checking=release --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4)
COLLECT_GCC_OPTIONS='-fversion' '-v' '-mtune=generic' '-march=x86-64'
 /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/cc1 -quiet -v
help-dummy -D_FORTIFY_SOURCE=2 -quiet -dumpbase help-dummy
-mtune=generic -march=x86-64 -auxbase help-dummy -version -fversion
-fstack-protector -o /tmp/cc24ZqNP.s
GNU C (Ubuntu/Linaro 4.5.2-8ubuntu4) version 4.5.2 (x86_64-linux-gnu)
        compiled by GNU C version 4.5.2, GMP version 4.3.2, MPFR
version 3.0.0-p8, MPC version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
COLLECT_GCC_OPTIONS='-fversion' '-v' '-mtune=generic' '-march=x86-64'
 as -V -Qy --64 --version -o /tmp/ccyZVzzN.o /tmp/cc24ZqNP.s
GNU assembler version 2.21.0 (x86_64-linux-gnu) using BFD version (GNU
Binutils for Ubuntu) 2.21.0.20110327
GNU assembler (GNU Binutils for Ubuntu) 2.21.0.20110327
Copyright 2011 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `x86_64-linux-gnu'.
COMPILER_PATH=/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/:/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/:/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/:/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/:/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/
LIBRARY_PATH=/home/luke/usr/lib/:./:/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/:/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/../../../:/lib/:/usr/lib/:/usr/lib/x86_64-linux-gnu/
COLLECT_GCC_OPTIONS='-fversion' '-v' '-mtune=generic' '-march=x86-64'
 /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/collect2
--build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu
-dynamic-linker /lib64/ld-linux-x86-64.so.2 -z relro --version
/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/../../../crt1.o
/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/../../../crti.o
/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/crtbegin.o
-L/home/luke/usr/lib -L.
-L/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2
-L/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/../../..
-L/usr/lib/x86_64-linux-gnu /tmp/ccyZVzzN.o -lgcc --as-needed -lgcc_s
--no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed
/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/crtend.o
/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/../../../crtn.o
GNU ld (GNU Binutils for Ubuntu) 2.21.0.20110327
Copyright 2011 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
luke@ThinkPad-W510:binutils$

When I run command given by make, but with the -v option as you suggest, I get:
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory
"/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/../../../../../x86_64-linux-gnu/include"
ignoring duplicate directory "."
  as it is a non-system directory that duplicates a system directory
ignoring duplicate directory "."
  as it is a non-system directory that duplicates a system directory
ignoring duplicate directory "../../binutils-2.21/binutils"
#include "..." search starts here:
#include <...> search starts here:
 ../../binutils-2.21/binutils
 ../bfd
 ../../binutils-2.21/binutils/../bfd
 ../../binutils-2.21/binutils/../include
 /home/luke/usr/include
 .
 /usr/local/include
 /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include
 /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include-fixed
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.


I just did a clean install of Ubuntu 11.04 on a virtual machine and it
compiled just fine out of the box.  My host machine is Kubuntu 11.04
and gcc is the same version and seems to be built with the same flags,
so it would be weird if those two things were the same yet gcc was
somehow to blame.  Maybe something else with my build environment is
messing things up?

~Luke



On Wed, Jun 8, 2011 at 2:19 AM, Alan Modra <amodra@gmail.com> wrote:
> 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
>



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