From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21087 invoked by alias); 9 Nov 2005 22:18:06 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 21079 invoked by uid 22791); 9 Nov 2005 22:18:03 -0000 Received: from mail2.ifrsys.com (HELO mail7.ifrsys.com) (65.196.219.163) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Wed, 09 Nov 2005 22:18:03 +0000 Received: from [10.200.136.194] ([10.200.136.194]) by mail7.ifrsys.com with ESMTP id jA9MHwY22648; Wed, 9 Nov 2005 16:17:58 -0600 Message-ID: <43727695.1090804@aeroflex.com> Date: Wed, 09 Nov 2005 22:18:00 -0000 From: Frank Beesley User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317) MIME-Version: 1.0 To: karuottu@mbnet.fi CC: gcc-help@gcc.gnu.org Subject: Re: Updating powerpc-crosscompile environment from gcc-2.95.3 References: <43725835.4070503@aeroflex.com> <43726A38.4060506@mbnet.fi> In-Reply-To: <43726A38.4060506@mbnet.fi> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2005-11/txt/msg00144.txt.bz2 Lets take one step back - take a look at Kimmo Mustonen's original message: ------- ./configure --target=powerpc-linux --prefix=/tmp/cross --nfp make TARGET_CONFIGDIRS= make install PATH=/tmp/cross/bin:$PATH export PATH cd /tmp/cross/src bzip2 -dc /m/nfs/data/readwrite/sipo-external/gcc-4.0.2.tar.bz2 \ | tar -xf - mkdir -p gcc-4.0.2-obj cd gcc-4.0.2-obj ../gcc-4.0.2/configure --target=powerpc-linux --with-cpu=603e --nfp \ --prefix=/tmp/cross --enable-shared --enable-languages="c" \ --with-newlib --disable-threads make TARGET_CONFIGDIRS= ------- So we both have just built and installed a new binutils (2.16 for Kimmo, 2.15 for me) using a native gcc (2.95 for Kimmo, 3.2.2 for me) and we are now trying to build the first-stage gcc cross-compiler (4.0.2 for Kimmo, 4.0.1 for me). My suggestion to Kimmo was to change his gcc configure to remove enable-shared and replace it with disable-shared. Because of this change I am able to get further through the first-step gcc cross-compiler build - though is does not successfully complete. After I run the gcc configure I run make to build the gcc cross compiler. This is what is failing with the message that it cannot create executables - this is from within the make script, and yes I understand that the "compiler" is not who actually makes the "executable". I have also tried setting my path to $PREFIX/$TARGET/bin:$PATH to point at the newly built tools but the configure for gcc fails when I do this. So still have not figured out the right combination to build the gcc cross compiler. I cannot successfully run "make install-gcc" because I cannot build gcc for the powerpc-motorola-linux target. Thanks Frank Kai Ruottu wrote: > Frank Beesley wrote: > >> "../gcc-4.0.1/configure --prefix=$PREFIX --target=$TARGET >> --disable-nls --disable-shared --enable-languages=c --without-headers >> --with-newlib" >> >> "make" >> >> I get farther then the message you have but it still fails with: >> checking for powerpc-motorola-linux-gcc... >> /rpm/ppc/build/gcc/gcc/xgcc -B/rpm/ppc/build/gcc/gcc/ >> -B/opt/ppc/powerpc-motorola-linux/bin/ >> -B/opt/ppc/powerpc-motorola-linux/lib/ -isystem >> /opt/ppc/powerpc-motorola-linux/include -isystem >> /opt/ppc/powerpc-motorola-linux/sys-include >> checking for C compiler default output file name... configure: error: >> C compiler cannot create executables > > > What do you think being required for "creating executables" ? If you > know this quite basic thing about "C compilers", then you also know why > it cannot create them ! > > In the GCC world, "creating executables" is very far from "compiling", > but in the Windoze MSVC, BCC etc. cases "compiling" is considered being > just the same thing as "creating executables" ! > > So, believe me or not, this error message is really misleading or just > a fact in the GCC world: A "C compiler" never creates executables there, > it doesn't even "create objects", one needs an assembler from the GNU > binutils or some "native 'as'" for this task... What kind of tool > creates executables and what kind of components will be required > additionally with the "compiled & assembled" object created from the > "hello world" C source, will be leaved to you as a homework to find > out... > > In your case I would try writing : > > make install-gcc > > and then try "compiling" a Hello World in order to see what happens: > > powerpc-motorola-linux-gcc -v -O2 -o hello-test hello.c > > Can it create this 'hello-test' executable at all? What very obvious is > still missing >