public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: "Gregg Levine" <gregg.drwho8@gmail.com>
To: "Dave Lawrence" <dlawrence@ad-holdings.co.uk>
Cc: "ariga masahiro" <ariga@link-lab.co.jp>, ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] Re: Wrongfully compiled code
Date: Fri, 18 Jan 2008 14:40:00 -0000	[thread overview]
Message-ID: <18d205ed0801180640r52b4b695p4e2e365b37bea97e@mail.gmail.com> (raw)
In-Reply-To: <47909868.8040905@ad-holdings.co.uk>

2008/1/18 Dave Lawrence <dlawrence@ad-holdings.co.uk>:
> 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
>
Hello!
Eh? The tools used by eCos, all of them, can be re-installed by using
the exact same installer that was used to start things off.

Just select the SH processor tool set and you are off. Of course
you'll need to add the "-f" setting to the commands used to run the
installer.

-- 
Gregg C Levine gregg.drwho8@gmail.com
"This signature was once found posting rude
 messages in English in the Moscow subway."

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

  reply	other threads:[~2008-01-18 14:40 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-07 23:59 [ECOS] " ariga masahiro
2008-01-08  0:05 ` Gary Thomas
2008-01-08  1:05   ` ariga masahiro
2008-01-17 19:21     ` [ECOS] " Dave Lawrence
2008-01-17 23:50       ` ariga masahiro
2008-01-18 12:16         ` Dave Lawrence
2008-01-18 14:40           ` Gregg Levine [this message]
2008-01-18 15:44             ` Dave Lawrence
2008-01-18 15:49               ` Gregg Levine
2008-01-18 16:09                 ` Dave Lawrence
2008-01-21  0:34           ` ariga masahiro
2008-02-04  1:49           ` ariga masahiro
2008-02-04 11:38             ` Dave Lawrence
2008-02-12  1:06               ` ariga masahiro
2008-02-12 10:55                 ` Dave Lawrence
2008-02-22  4:57   ` [ECOS] How to re-install newly compiled gnutools ariga masahiro
2008-02-22  7:15     ` ariga masahiro
2008-05-16  8:13       ` [ECOS] When or on what condition does "deschedule" happen? ariga masahiro
2008-05-16 15:26         ` Andrew Lunn
2008-05-19  5:32           ` ariga masahiro
2008-05-19 13:18             ` Andrew Lunn
2008-05-19 13:31               ` Gary Thomas
2008-05-20  1:26               ` ariga masahiro
2008-05-20 12:18                 ` Andrew Lunn
2008-05-23  7:38                   ` ariga masahiro
2008-05-23  9:35                     ` Nick Garnett
     [not found]                   ` <000601c8c165$406e0970$1c0110ac@ariga>
2008-05-29 18:23                     ` [ECOS] Re: In trouble of timer operations Andrew Lunn
2008-05-30  2:50                       ` ariga masahiro
2008-05-30  3:09                         ` Paul D. DeRocco
2008-05-30  4:11                           ` ariga masahiro
2008-05-30  4:43                             ` Paul D. DeRocco
2008-05-30  7:26                               ` ariga masahiro
2008-05-30  7:47                                 ` Paul D. DeRocco
2008-05-30  8:03                                   ` ariga masahiro
2008-05-30  8:07                                 ` Andrew Lunn
2008-06-04  5:25                                   ` ariga masahiro
2008-06-04 10:06                                     ` Paul D. DeRocco
2008-06-05  6:14                                       ` ariga masahiro
2008-06-05 17:39                                         ` Paul D. DeRocco
2008-05-30  6:35                             ` Andrew Lunn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18d205ed0801180640r52b4b695p4e2e365b37bea97e@mail.gmail.com \
    --to=gregg.drwho8@gmail.com \
    --cc=ariga@link-lab.co.jp \
    --cc=dlawrence@ad-holdings.co.uk \
    --cc=ecos-discuss@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).