From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3328 invoked by alias); 4 Feb 2008 11:38:58 -0000 Received: (qmail 3319 invoked by uid 22791); 4 Feb 2008 11:38:57 -0000 X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 04 Feb 2008 11:38:19 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1JLzeL-00051W-6H for ecos-discuss@sources.redhat.com; Mon, 04 Feb 2008 11:38:09 +0000 Received: from host217-34-45-110.in-addr.btopenworld.com ([217.34.45.110]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 04 Feb 2008 11:38:09 +0000 Received: from dlawrence by host217-34-45-110.in-addr.btopenworld.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 04 Feb 2008 11:38:09 +0000 To: ecos-discuss@sources.redhat.com From: Dave Lawrence Date: Mon, 04 Feb 2008 11:38:00 -0000 Message-ID: <47A6F914.4010400@ad-holdings.co.uk> References: <001001c85189$461611c0$1c0110ac@ariga> <4782BE28.8030706@mlbassoc.com> <002d01c85192$6fe45850$1c0110ac@ariga> <000501c85963$91046d80$1c0110ac@ariga> <47909868.8040905@ad-holdings.co.uk> <001801c866d0$0ce9aa90$1c0110ac@ariga> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) In-Reply-To: <001801c866d0$0ce9aa90$1c0110ac@ariga> X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: [ECOS] Re: Wrongfully compiled code X-SW-Source: 2008-02/txt/msg00001.txt.bz2 ariga masahiro wrote: > Hello Dave and others, > > To Mr.Dave Lawrence, > I have studied a little bit about building sh-elf-gcc. > As I know nothing about Python,I made my shell scripts from it. > I append contents of these shell scripts below. > I could not find out what configure.patch is and how to do it, > so I did not do anything about it. > Perhaps this is the cause of trouble but I explain later. > > I decided the directory to hold newly built files to be > /usr/local/sh-elf/bin. > > I downloaded next sources into /usr/local/sh-elf > and decompressed them. > > binutils-2.16.tar.bz2 > gcc-4.1.1.tar.bz2 > newlib-1.14.0.tar.gz > > After that newly directory looks like below. > /usr > `-- local > `-- sh-elf > |-- binutils-2.16 > |-- newlib-1.14.0 > |-- gcc-4.1.1 > |-- bin > | > > And I made building-directories in which I executed building scripts. > /tmp/build/build_binutils > /tmp/build/build_gcc > > I made setup.sh to set environment variables like TARGET,PREFIX etc. > > First of all I built binutils > and this succeeded without any trouble. > > $ cd /tmp/build > $ . setup.sh > $ cd build_binutils > $ . binutilsbuild.sh > > And I executed appendpath.sh which set PATH to /usr/local/sh-elf/bin. > > $ cd .. > $ . appendpath.sh > > And I tried to build gcc. > Before that,I made symbolic link to newlib like next. > > $ cd /usr/local/sh-elf/gcc-4.1.1 > $ ln -s ../newlib-1.14.0/newlib ../newlib-1.14.0/libgloss > ../newlib-1.14.0/COPYING.NEWLIB . > > Then I executed buildgcconetime.sh > > $ cd /tmp/build/build_gcc > $ . buildgcconetime.sh > > but I was encountered next error. > > checking for ISO C99 support in ... yes > checking for ISO C99 support in ... no > checking for ISO C99 support in ... no > checking for fully enabled ISO C99 support... no > configure: Debug build flags set to -g3 -O0 > checking for additional debug build... no > checking for extra compiler flags for building... > checking for thread model used by GCC... single > checking for shared libgcc... configure: error: Link tests are not > allowed after > GCC_NO_EXECUTABLES. > make[1]: *** [configure-target-libstdc++-v3] Error 1 > make[1]: Leaving directory `/tmp/build/build_gcc' > make: *** [all] Error 2 > make: Leaving directory `/tmp/build/build_gcc' > > My first-guess was that since this includes "test" , > I remembered Dave's next sentences. > > "I had to make one hack to the configure file. It fails on a test, but > you can proceed without it, you'll just have to inspect the file when > the problem occurs and comment out that test. I can't remember any more > details than that sorry." > > Now is this related to what you mean ? > If it does,could you elaborate what it is and how I should do it ? > Like which file I should apply configure.patch to,and how ? > Yes this was the error I had. I attached two files "patch" and "configure.patch" which was a bit pointless as you only need one of them. "patch" was created using "diff" from the Cygwin command line and can be applied using "patch" (the program). So the command you need is patch gcc-4.1.1/libstdc++-v3/configure patch (where the first use of the word patch is the program name and the second use is the name of the file) > Or is it not related to what you mean ? > Anyway would you please help me ? > > There is one more thing I care about. > > Cygwin's original gnutools exec file directory is next. > /cygwin/opt/ecos/gnutools/sh-elf/bin > > I noticed when I build it is interfered with. > First I renamed this directory like /gnutools-old > but I was encountered error like next. > > echo 'STMP_FIXPROTO=""' \ > >> > /usr/local/sh-elf/lib/gcc/sh-elf/4.1-GNUSH_v0602/install-tool > s/mkheaders.conf > echo 'STMP_FIXINC="stmp-fixinc"' \ > >> > /usr/local/sh-elf/lib/gcc/sh-elf/4.1-GNUSH_v0602/install-tool > s/mkheaders.conf > make[1]: *** No rule to make target > `/opt/ecos/gnutools/sh-elf/bin/sh-elf-ld', n > eeded by `stamp-collect-ld'. Stop. > make[1]: Leaving directory `/home/tkernel/shtools/buildshgcc/build_gcc/gcc' > make: *** [install-gcc] Error 2 > > So I remained it as it was and only renamed next exec files. > sh-elf-as.exe.prev > sh-elf-gcc.exe.prev > > I am not sure if I am right about it. > > If I succeeded to build newly sh-elf-gcc in /usr/local/sh-elf/bin > I intend to overwrite exec files in /usr/local/sh-elf/bin to > /opt/ecos/gnutools/sh-elf/bin. > Am I right ? The fact that its trying to drag in files from your old install doesn't sound good - I'd go with your plan of renaming that to gnutools-old or something. The "no rule to make target ..." error is almost certainly caused by dependency file generated during your previous build - try doing a "make clean" and start again. > > Would you please enlighten me ? > I am much obliged to you. > > shell scripts > ========================================================= > setup.sh ;this is for setting environment variables like next. > export TARGET=sh-elf > export HOST=i686-pc-cygwin > export BUILD=i686-pc-cygwin > export PREFIX=/usr/local/sh-elf > export CFLAGS="-O2" > export CXXFLAGS="-O2" > export CFLAGS_FOR_TARGET="-Os" > export CXXFLAGS_FOR_TARGET="Os" > -------------------------------------------------------- > appendpath.sh ;this is for adding newly built exec Directory to PATH > PATH=$PATH:/usr/local/sh-elf/bin > -------------------------------------------------------- > binutilsbuild.sh ;this is script for building binutils. > /usr/local/sh-elf/binutils-2.16/configure --target=$TARGET --host=$HOST > --build=$BUILD --prefix=$PREFIX 2>&1 | tee config.out > make 2>&1 | tee makeall.out > make install 2>&1 | tee makeinstall.out > -------------------------------------------------------- > buildgcconetime.sh ;this is script for building sh-elf-gcc > /usr/local/sh-elf/gcc-4.1.1/configure --target=$TARGET --host=$HOST > --build=$BUILD --prefix=$PREFIX --enable-languages=c,c++ --with-gnu-as > --with-gnu-ld --with-newlib > --with-ggxx-include-dir=/usr/local/sh-elf/sh-elf/include --with-ecos -v > 2>&1 | tee configgcc.txt > make -w all install 2>&1 | tee makegcc.txt > > Masahiro Ariga > > > -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss