From: "ariga masahiro" <ariga@link-lab.co.jp>
To: "Dave Lawrence" <dlawrence@ad-holdings.co.uk>
Cc: <ecos-discuss@sources.redhat.com>
Subject: Re: [ECOS] Re: Wrongfully compiled code
Date: Mon, 04 Feb 2008 01:49:00 -0000 [thread overview]
Message-ID: <001801c866d0$0ce9aa90$1c0110ac@ariga> (raw)
In-Reply-To: <47909868.8040905@ad-holdings.co.uk>
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 <stdio.h>... yes
checking for ISO C99 support in <stdlib.h>... no
checking for ISO C99 support in <wchar.h>... 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
next prev parent reply other threads:[~2008-02-04 1:49 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
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 [this message]
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='001801c866d0$0ce9aa90$1c0110ac@ariga' \
--to=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).