public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Luke <hazelnusse@gmail.com>
To: Luke <hazelnusse@gmail.com>, binutils@sourceware.org
Subject: Re: TARGET undefined in bucomm.c
Date: Wed, 08 Jun 2011 10:08:00 -0000	[thread overview]
Message-ID: <BANLkTikN20ioswvOf3buQEDAOiopXCs=Lg@mail.gmail.com> (raw)
In-Reply-To: <20110608091959.GD4172@bubble.grove.modra.org>

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

  reply	other threads:[~2011-06-08 10:08 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-06 17:46 Luke
2011-06-06 17:58 ` H.J. Lu
2011-06-06 18:19   ` Luke
2011-06-06 19:32     ` Luke
2011-06-06 20:04       ` Ian Lance Taylor
2011-06-07  3:14         ` Luke
2011-06-07 12:11           ` Ian Lance Taylor
2011-06-07 12:24             ` Andreas Schwab
2011-06-07 18:27             ` Luke
2011-06-07 18:58               ` H.J. Lu
2011-06-08  0:41                 ` Luke
2011-06-08  8:03                   ` Andreas Schwab
2011-06-08  8:28                     ` Luke
2011-06-08  9:20                       ` Alan Modra
2011-06-08 10:08                         ` Luke [this message]
2011-06-08 11:07                           ` Andreas Schwab
2011-06-08 16:28                             ` Luke
2011-06-08 13:26                           ` Ian Lance Taylor
2011-06-08 16:55                             ` Luke
2011-06-08 18:02                               ` Ian Lance Taylor
2011-06-08 21:59                                 ` Luke
2011-06-08  8:49                     ` Luke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='BANLkTikN20ioswvOf3buQEDAOiopXCs=Lg@mail.gmail.com' \
    --to=hazelnusse@gmail.com \
    --cc=binutils@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).