From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2854 invoked by alias); 21 Jan 2008 00:34:17 -0000 Received: (qmail 2697 invoked by uid 22791); 21 Jan 2008 00:34:10 -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, 21 Jan 2008 00:33:41 +0000 Received: from pop132.ocn.ne.jp (pop132.ocn.ne.jp [60.37.31.215]) by defer117.ocn.ad.jp (Postfix) with ESMTP id 30ABBB8CDA; Mon, 21 Jan 2008 09:33:38 +0900 (JST) Received: from ariga (p1012-ipbf3109marunouchi.tokyo.ocn.ne.jp [122.29.52.12]) by pop132.ocn.ne.jp (OCN) with SMTP id m0L0XbZV013352; Mon, 21 Jan 2008 09:33:37 +0900 (JST) Message-ID: <007d01c85bc5$42cd60e0$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, 21 Jan 2008 00:34: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-01/txt/msg00112.txt.bz2 Hello every one, Thank you,Dave, very much for your reply. I will study a little and endeavor to re-install. But I must find time between other jobs, so it will take a little time. I will report to you result after that. Masahiro Ariga > ariga masahiro wrote: >> Hello, >> >> Thank you very much for your confirmation. >> I am much relieved to have found the cause of trouble. >> >> But I do not know how to re-install sh-elf-gcc on Cygwin. >> Could you please teach me how to do it ? >> >> Masahiro Ariga > I found no pre-built version of GCC for this target available for > download. > It's 18 months since I built it, and I've only ever built GCC once, so > I'm just > going off the top of my head, but I did save a python script which goes > through > the steps of building binutils and GCC. I've also generated a patch for > the configure > hack there are two versions attached, "configure.patch" was created > using SVN > (from the root of that tag) "patch" was created using diff. > > You will need the cygwin build of Python installed via the standard > cygwin installer program from > cygwin.com > > The GCC release can be obtained from SVN > svn co svn://gcc.gnu.org/svn/gcc/tags/gcc_4_1_1_release gcc_4_1_1 > If you don't have SVN search their website for a tarball. > Obtain the aforementioned versions of newlib and binutils (you'll have > to search for these > the gcc website and/or google will get you there pretty quickly) and > unpack them such > that you have the following directory layout > > ./gcc_4_1_1 > ./gcc_4_1_1/newlib > ./binutils-2.16 > ./buildall.py > ./patch > ./configure.patch > > Either apply configure.patch using SVN (and I have no idea how to do > that from the > command line version) or apply "patch" using : > patch gcc_4_1_1/libstdc++-v3/configure -ipatch > > Let's assume you want to install to /opt/ecos/gcc411: > run the attached script as > python buildall.py /opt/ecos/gcc411 > * > *see also > http://gcc.gnu.org/install/ > > Good luck!* > * >>> >>>> sh-elf/sh-elf/include >>>> Thread model: single >>>> gcc version 3.2.1 >>> >>> We found a bug in this version (probably the same one). I managed to >>> compile GCC 4.1.1 using the following sources >>> >>> binutils 2.16 >>> Newlib 1.14.0 (copy this to inside the GCC source directory) >>> Gcc 4.1.1 >>> >>> 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. >>> >>> binutils is compiled separately. Newlib is not strictly needed by >>> ecos but I found GCC wouldn't compile without it (use the >>> --with-newlib option in the configure). >>> >>> btw the compile time is measured in hours (about 4.5 on the PC I used) >>> >>> >>> -- >>> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos >>> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss >>> >>> >> > > -------------------------------------------------------------------------------- > Index: libstdc++-v3/configure > =================================================================== > --- libstdc++-v3/configure (revision 114326) > +++ libstdc++-v3/configure (working copy) > @@ -4576,6 +4576,8 @@ > ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS > conftest.$ac_ext $LIBS >&5' > ac_compiler_gnu=$ac_cv_c_compiler_gnu > > +gcc_no_link=yes > + > if test x$gcc_no_link = xyes; then > { { echo "$as_me:$LINENO: error: Link tests are not allowed after > GCC_NO_EXECUTABLES." >&5 > echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." > >&2;} > @@ -87646,6 +87648,8 @@ > fi > fi > > +gcc_no_link=no > + > # Check to see if 'gnu' can win. > if test $enable_symvers = gnu; then > # Check to see if libgcc_s exists, indicating that shared libgcc is > possible. > @@ -87700,6 +87704,7 @@ > echo "$as_me: failed program was:" >&5 > sed 's/^/| /' conftest.$ac_ext >&5 > > +gcc_no_link=no > glibcxx_shared_libgcc=no > fi > rm -f conftest.err conftest.$ac_objext \ > @@ -88575,6 +88580,8 @@ > echo "${ECHO_T}$glibcxx_cv_func_setenv_use" >&6 > if test x$glibcxx_cv_func_setenv_use = x"yes"; then > > +gcc_no_link=no > + > for ac_func in setenv > do > as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` > -------------------------------------------------------------------------------- > #!/usr/bin/python > > import os > import sys > > def do(cmd): > err = os.system(cmd) > if (err != 0): > sys.exit(err) > > if sys.platform != "cygwin": > print "This script is for a cygwin build environment" > sys.exit(-1) > > try: > outdir = sys.argv[1] > except: > print "Please specify output directory for built toolchain" > sys.exit(-1) > > startdir = os.getcwd() > > if True: > do("mkdir -p /tmp/build/binutils") > os.chdir("/tmp/build/binutils") > do("%s/binutils-2.16/configure --target=sh-elf --prefix=%s -v 2>&1 | tee > binconfig.out" % (startdir, outdir)) > do("make -w all install 2>&1 | tee binmake.out") > > #sys.exit(0) > > savepath = os.environ["PATH"] > os.environ["PATH"] = "%s/bin:%s" %(outdir, savepath) > do("mkdir -p /tmp/build/gcc") > os.chdir("/tmp/build/gcc") > do("%s/gcc_4_1_1/configure --target=sh-elf --prefix=%s --enable-languages=c,c++ > --with-gnu-as --with-gnu-ld --with-newlib --with-gxx-include-dir=%s/sh-elf/include > --with-ecos -v 2>&1 | tee configgcc.txt " %(startdir, outdir, outdir)) > do("make -w all install 2>&1 | tee makegcc.txt") > > > -------------------------------------------------------------------------------- > 4578a4579,4580 >> gcc_no_link=yes >> > 87648a87651,87652 >> gcc_no_link=no >> > 87702a87707 >> gcc_no_link=no > 88577a88583,88584 >> gcc_no_link=no >> > > -------------------------------------------------------------------------------- > -- > Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos > and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss