From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18521 invoked by alias); 8 Jun 2011 10:08:26 -0000 Received: (qmail 18510 invoked by uid 22791); 8 Jun 2011 10:08:23 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,TW_BJ,TW_CX,TW_DC,TW_GX,TW_LG X-Spam-Check-By: sourceware.org Received: from mail-vx0-f169.google.com (HELO mail-vx0-f169.google.com) (209.85.220.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 08 Jun 2011 10:08:08 +0000 Received: by vxk20 with SMTP id 20so301100vxk.0 for ; Wed, 08 Jun 2011 03:08:07 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.179.193 with SMTP id di1mr963128vdc.147.1307527687204; Wed, 08 Jun 2011 03:08:07 -0700 (PDT) Received: by 10.52.184.8 with HTTP; Wed, 8 Jun 2011 03:08:07 -0700 (PDT) In-Reply-To: <20110608091959.GD4172@bubble.grove.modra.org> References: <20110608091959.GD4172@bubble.grove.modra.org> Date: Wed, 08 Jun 2011 10:08:00 -0000 Message-ID: Subject: Re: TARGET undefined in bucomm.c From: Luke To: Luke , binutils@sourceware.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2011-06/txt/msg00091.txt.bz2 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=3Dgcc COLLECT_LTO_WRAPPER=3D/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=3D'Ubuntu/Linaro 4.5.2-8ubuntu4' --with-bugurl=3Dfile:///usr/share/doc/gcc-4.5/README.Bugs --enable-languages=3Dc,c++,fortran,objc,obj-c++ --prefix=3D/usr --program-suffix=3D-4.5 --enable-shared --enable-multiarch --with-multiarch-defaults=3Dx86_64-linux-gnu --enable-linker-build-id --with-system-zlib --libexecdir=3D/usr/lib/x86_64-linux-gnu --without-included-gettext --enable-threads=3Dposix --with-gxx-include-dir=3D/usr/include/c++/4.5 --libdir=3D/usr/lib/x86_64-linux-gnu --enable-nls --with-sysroot=3D/ --enable-clocale=3Dgnu --enable-libstdcxx-debug --enable-libstdcxx-time=3Dyes --enable-plugin --enable-gold --enable-ld=3Ddefault --with-plugin-ld=3Dld.gold --enable-objc-gc --disable-werror --with-arch-32=3Di686 --with-tune=3Dgeneric --enable-checking=3Drelease --build=3Dx86_64-linux-gnu --host=3Dx86_64-linux-gnu --target=3Dx86_64-linux-gnu Thread model: posix gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4) COLLECT_GCC_OPTIONS=3D'-fversion' '-v' '-mtune=3Dgeneric' '-march=3Dx86-64' /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/cc1 -quiet -v help-dummy -D_FORTIFY_SOURCE=3D2 -quiet -dumpbase help-dummy -mtune=3Dgeneric -march=3Dx86-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=3D100 --param ggc-min-heapsize=3D131= 072 COLLECT_GCC_OPTIONS=3D'-fversion' '-v' '-mtune=3Dgeneric' '-march=3Dx86-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=3D/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=3D/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=3D'-fversion' '-v' '-mtune=3Dgeneric' '-march=3Dx86-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=3Dgnu -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 versio= n. 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=3D100 --param ggc-min-heapsize=3D131= 072 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 wrote: > On Wed, Jun 08, 2011 at 01:28:08AM -0700, Luke wrote: >> Yes. =C2=A0In the build folder (next to the source folder) there are the= se: >> $ 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 "" >> # 1 "" >> # 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. =C2=A0The 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. =C2=A0The > 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. =C2=A0(Adding -v > to the gcc command line will verify the search paths.) =C2=A0config.h is > readable isn't it? > > -- > Alan Modra > Australia Development Lab, IBM > --=20 "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