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 ?