From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3963 invoked by alias); 18 Jan 2008 12:16:15 -0000 Received: (qmail 3949 invoked by uid 22791); 18 Jan 2008 12:16:14 -0000 X-Spam-Check-By: sourceware.org Received: from talbot.electric.net (HELO talbot.electric.net) (72.35.23.19) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 18 Jan 2008 12:15:46 +0000 Received: from 1JFq8K-0002MJ-TU by talbot.electric.net with emc1-ok (Exim 4.67) (envelope-from ) id 1JFq8N-0002NF-UE; Fri, 18 Jan 2008 04:15:43 -0800 Received: by emcmailer; Fri, 18 Jan 2008 04:15:43 -0800 Received: from [217.34.45.110] (helo=[192.168.113.127]) by talbot.electric.net with esmtpa (Exim 4.67) (envelope-from ) id 1JFq8K-0002MJ-TU; Fri, 18 Jan 2008 04:15:41 -0800 Message-ID: <47909868.8040905@ad-holdings.co.uk> Date: Fri, 18 Jan 2008 12:16:00 -0000 From: Dave Lawrence User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: ariga masahiro CC: ecos-discuss@sources.redhat.com References: <001001c85189$461611c0$1c0110ac@ariga> <4782BE28.8030706@mlbassoc.com> <002d01c85192$6fe45850$1c0110ac@ariga> <000501c85963$91046d80$1c0110ac@ariga> In-Reply-To: <000501c85963$91046d80$1c0110ac@ariga> Content-Type: multipart/mixed; boundary="------------030600070705010007010204" X-Outbound-IP: 217.34.45.110 X-Env-From: dlawrence@ad-holdings.co.uk X-Virus-Status: Scanned by VirusSMART (c) X-PolicySMART: 1213 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/msg00101.txt.bz2 --------------030600070705010007010204 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 2650 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 >> >> > --------------030600070705010007010204 Content-Type: text/plain; name="configure.patch" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="configure.patch" Content-length: 1639 SW5kZXg6IGxpYnN0ZGMrKy12My9jb25maWd1cmUNCj09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT0NCi0tLSBsaWJzdGRjKystdjMvY29uZmlndXJlCShyZXZpc2lv biAxMTQzMjYpDQorKysgbGlic3RkYysrLXYzL2NvbmZpZ3VyZQkod29ya2lu ZyBjb3B5KQ0KQEAgLTQ1NzYsNiArNDU3Niw4IEBADQogYWNfbGluaz0nJEND IC1vIGNvbmZ0ZXN0JGFjX2V4ZWV4dCAkQ0ZMQUdTICRDUFBGTEFHUyAkTERG TEFHUyBjb25mdGVzdC4kYWNfZXh0ICRMSUJTID4mNScKIGFjX2NvbXBpbGVy X2dudT0kYWNfY3ZfY19jb21waWxlcl9nbnUKIAorZ2NjX25vX2xpbms9eWVz CisKICAgICAgaWYgdGVzdCB4JGdjY19ub19saW5rID0geHllczsgdGhlbgog ICB7IHsgZWNobyAiJGFzX21lOiRMSU5FTk86IGVycm9yOiBMaW5rIHRlc3Rz IGFyZSBub3QgYWxsb3dlZCBhZnRlciBHQ0NfTk9fRVhFQ1VUQUJMRVMuIiA+ JjUKIGVjaG8gIiRhc19tZTogZXJyb3I6IExpbmsgdGVzdHMgYXJlIG5vdCBh bGxvd2VkIGFmdGVyIEdDQ19OT19FWEVDVVRBQkxFUy4iID4mMjt9CkBAIC04 NzY0Niw2ICs4NzY0OCw4IEBADQogICBmaQogZmkKIAorZ2NjX25vX2xpbms9 bm8KKwogIyBDaGVjayB0byBzZWUgaWYgJ2dudScgY2FuIHdpbi4KIGlmIHRl c3QgJGVuYWJsZV9zeW12ZXJzID0gZ251OyB0aGVuCiAgICMgQ2hlY2sgdG8g c2VlIGlmIGxpYmdjY19zIGV4aXN0cywgaW5kaWNhdGluZyB0aGF0IHNoYXJl ZCBsaWJnY2MgaXMgcG9zc2libGUuCkBAIC04NzcwMCw2ICs4NzcwNCw3IEBA DQogICBlY2hvICIkYXNfbWU6IGZhaWxlZCBwcm9ncmFtIHdhczoiID4mNQog c2VkICdzL14vfCAvJyBjb25mdGVzdC4kYWNfZXh0ID4mNQogCitnY2Nfbm9f bGluaz1ubwogZ2xpYmN4eF9zaGFyZWRfbGliZ2NjPW5vCiBmaQogcm0gLWYg Y29uZnRlc3QuZXJyIGNvbmZ0ZXN0LiRhY19vYmpleHQgXApAQCAtODg1NzUs NiArODg1ODAsOCBAQA0KIGVjaG8gIiR7RUNIT19UfSRnbGliY3h4X2N2X2Z1 bmNfc2V0ZW52X3VzZSIgPiY2CiAgIGlmIHRlc3QgeCRnbGliY3h4X2N2X2Z1 bmNfc2V0ZW52X3VzZSA9IHgieWVzIjsgdGhlbgogCitnY2Nfbm9fbGluaz1u bworCiBmb3IgYWNfZnVuYyBpbiBzZXRlbnYKIGRvCiBhc19hY192YXI9YGVj aG8gImFjX2N2X2Z1bmNfJGFjX2Z1bmMiIHwgJGFzX3RyX3NoYAo= --------------030600070705010007010204 Content-Type: text/plain; name="buildall.py" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="buildall.py" Content-length: 1022 #!/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") --------------030600070705010007010204 Content-Type: text/plain; name="patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch" Content-length: 142 4578a4579,4580 > gcc_no_link=yes > 87648a87651,87652 > gcc_no_link=no > 87702a87707 > gcc_no_link=no 88577a88583,88584 > gcc_no_link=no > --------------030600070705010007010204 Content-Type: text/plain; charset=us-ascii Content-length: 148 -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss --------------030600070705010007010204--