From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17391 invoked by alias); 4 Feb 2008 01:49:05 -0000 Received: (qmail 17101 invoked by uid 22791); 4 Feb 2008 01:49:03 -0000 X-Spam-Check-By: sourceware.org Received: from defer117.ocn.ad.jp (HELO defer117.ocn.ad.jp) (125.206.148.136) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 04 Feb 2008 01:48:38 +0000 Received: from pop132.ocn.ne.jp (pop132.ocn.ne.jp [60.37.31.215]) by defer117.ocn.ad.jp (Postfix) with ESMTP id 5316BBA5EF; Mon, 4 Feb 2008 10:48:36 +0900 (JST) Received: from ariga (p1012-ipbf3109marunouchi.tokyo.ocn.ne.jp [122.29.52.12]) by pop132.ocn.ne.jp (OCN) with SMTP id m141mZt5003862; Mon, 4 Feb 2008 10:48:35 +0900 (JST) Message-ID: <001801c866d0$0ce9aa90$1c0110ac@ariga> From: "ariga masahiro" To: "Dave Lawrence" Cc: References: <001001c85189$461611c0$1c0110ac@ariga> <4782BE28.8030706@mlbassoc.com> <002d01c85192$6fe45850$1c0110ac@ariga> <000501c85963$91046d80$1c0110ac@ariga> <47909868.8040905@ad-holdings.co.uk> Date: Mon, 04 Feb 2008 01:49:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="ISO-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook Express 6.00.2900.2869 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: Re: [ECOS] Re: Wrongfully compiled code X-SW-Source: 2008-02/txt/msg00000.txt.bz2 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 ? 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 ? 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