From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19600 invoked by alias); 7 Jun 2011 18:27:10 -0000 Received: (qmail 19586 invoked by uid 22791); 7 Jun 2011 18:27:09 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-vw0-f41.google.com (HELO mail-vw0-f41.google.com) (209.85.212.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 07 Jun 2011 18:26:56 +0000 Received: by vws4 with SMTP id 4so4943259vws.0 for ; Tue, 07 Jun 2011 11:26:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.179.193 with SMTP id di1mr913511vdc.147.1307471215342; Tue, 07 Jun 2011 11:26:55 -0700 (PDT) Received: by 10.52.184.8 with HTTP; Tue, 7 Jun 2011 11:26:55 -0700 (PDT) In-Reply-To: References: Date: Tue, 07 Jun 2011 18:27:00 -0000 Message-ID: Subject: Re: TARGET undefined in bucomm.c From: Luke To: 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/msg00070.txt.bz2 Here are the first lines of bucomm.i: # 1 "../../binutils/bucomm.c" # 1 "/home/luke/repos/summon-arm-toolchain/binutils-2.21/build/binutils//" # 1 "" # 1 "" # 1 "../../binutils/bucomm.c" # 26 "../../binutils/bucomm.c" # 1 "../../binutils/sysdep.h" 1 # 25 "../../binutils/sysdep.h" # 1 "../../binutils/../include/alloca-conf.h" 1 # 1 "../bfd/config.h" 1 # 2 "../../binutils/../include/alloca-conf.h" 2 # 1 "/usr/include/alloca.h" 1 3 4 # 22 "/usr/include/alloca.h" 3 4 # 1 "/usr/include/features.h" 1 3 4 So, for some reason, it is finding config.h in the bfd folder. What should I do to fix this? ~Luke On Mon, Jun 6, 2011 at 10:13 PM, Ian Lance Taylor wrote: > Luke writes: > >> but not when building bucomm.c. =C2=A0So config.h *isn't* being included, >> for some reason. =C2=A0I don't know which config.h is being included by >> alloca-conf.h, but it isn't the generated binutils/config.h. =C2=A0The o= nly >> major difference I can see is the -I flags. =C2=A0Could this have someth= ing >> to do with it? > > Run something like > > make CFLAGS=3D"-g -O2 --save-temps" bucomm.o > > That will create, besides bucomm.o, a file bucomm.i. =C2=A0In the first 20 > lines of bucomm.i you should see an entry for config.h. =C2=A0Where is > config.h being found? > > When I try it, I see the appended, which shows config.h being included > from the binutils build directory, as expected. > > Ian > > # 1 "../../src/binutils/bucomm.c" > # 1 "/home/iant/binutils/objdir/binutils//" > # 1 "" > # 1 "" > # 1 "../../src/binutils/bucomm.c" > # 26 "../../src/binutils/bucomm.c" > # 1 "../../src/binutils/sysdep.h" 1 > # 25 "../../src/binutils/sysdep.h" > # 1 "../../src/binutils/../include/alloca-conf.h" 1 > # 1 "./config.h" 1 > # 2 "../../src/binutils/../include/alloca-conf.h" 2 > > > > > > > # 1 "/usr/include/alloca.h" 1 3 4 > # 22 "/usr/include/alloca.h" 3 4 > # 1 "/usr/include/features.h" 1 3 4 > --=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