Building Cygwin hosted Linux toolchain
wangwen
wangwen@coretac.com
Wed Aug 23 19:08:00 GMT 2000
Hi,
ÃÂ
When I build Cygwin hosted Linux toolschain
according to your instructions at http://www.xraylith.wisc.edu/~khan/software/gnu-win32/cygwin-to-linux-cross-howto.txt ,ÃÂ I encountedÃÂ difficulties.ÃÂ
ÃÂ
Following are my steps:
======Preliminaries
1....
a.
b.Update the dev tools.To gcc-2.95 I got fromÃÂ ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/cygwin/gcc-2.95/gcc-2.95-cygb20.tar.gz .
ÃÂ
2.glibc-2.0.7 headers and libraries. I take this from my Linux (RH6.1)
box.ÃÂ 2a.
2b. Start gathering includes and libs: ÃÂ ÃÂ ÃÂ $ mkdir
/tmp/linux-runtime ÃÂ ÃÂ ÃÂ $ (cd /usr; tar --dereference -cf -
include) | \ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ (cd /tmp/linux-runtime; tar -xf -
) ÃÂ ÃÂ ÃÂ $ ( cd /; tar -cf - lib/lib* lib/crt*) |
\ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ (cd /tmp/linux-runtime; tar -xf - ) ********here have error. In /lib there are no crt*. But in
/usr/lib there are crt*. So IÃÂ changed the commandÃÂ as
following:
ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ $
( cd /usr ; tar -cf - lib/lib* lib/crt*) |
\ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ (cd /tmp/linux-runtime; tar -xf -
)
2c...
2d...
2e...
3. Get GCC-2.95
ftp://egcs.cygnus.com/pub/egcs/releases/gcc-2.95/gcc-2.95.tar.bz2
4. Get Binutils :Binutils 2.10
ÃÂ ÃÂ ÃÂ InÃÂ
ftp://ftp.varesearch.com/pub/support/hjl/binutils/beta/binutils-2.9.5.0.4.tar.bz2 ÃÂ there are no such file. I get Binutils 2.10-tar.bz2.
5. Patches to the
compiler
ÃÂ
===========Pre
ÃÂ
1. I have installed Cygwin "full" distribution and updated the devÃÂ
tools fromÃÂ your site. At this point, I ÃÂ run ``gcc -v'', itÃÂ
report "Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/2.95.2/specs gcc
version 2.95.2 19991024 (release-2)"
*****
At this step, even I didn't updated the dev tools when I run "gccÃÂ
-v", it reported the same as above.
******
2. You've transferred the linux-runtime.tar.gz file to the Cygwin
box.
3. I have done the rest of "preliminaries".
4.....
5.....
6.....
ÃÂ
=========Build
ÃÂ $ mkdir -p
/usr/local/src/BUILD/binutils-2.9.5.0.4 ***********
ÃÂ $ mkdir -p
/usr/local/src/BUILD/binutils-10
*********** ÃÂ $ cd
/usr/local/src/BUILD/binutils-2.9.5.0.4
***********
ÃÂ $ cd
/usr/local/src/BUILD/binutils-2.10
*********** ÃÂ $ CONFIG_SHELL=bash bash
/usr/local/src/binutils-2.9.5.0.4/configure \ ÃÂ ÃÂ ÃÂ
--prefix=/usr/local/cross-tools --target=$target -v ***********
ÃÂ $ CONFIG_SHELL=bash bash /usr/local/src/binutils-10/configure
\ ÃÂ ÃÂ ÃÂ --prefix=/usr/local/cross-tools
--target=i686-pc-linux-gnu -v
***********
ÃÂ
$ make > make.log 2>&1
There are no error reports.
$ make install > install.log 2>&1
$ export PATH=$PATH:/usr/local/cross-tools/bin
ÃÂ
$ mkdir -p /usr/local/src/BUILD/gcc-2.95 $ cd
/usr/local/src/BUILD/gcc-2.95
$ CONFIG_SHELL=bash bash /usr/local/src/gcc-2.95/configure
\ ÃÂ ÃÂ ÃÂ --enable-languages=c,c++,f77,objc
\ ÃÂ ÃÂ ÃÂ --prefix=/usr/local/cross-tools
--target=i686-pc-linux-gnu --enable-shared
ÃÂ
**************
In this step, it failed. The screen display following message:
administrator@YUETAN
/usr/local/src/BUILD/gcc-2.95 $ CONFIG_SHELL=bash bash
/usr/local/src/gcc-2.95/configure \ >ÃÂ ÃÂ ÃÂ ÃÂ
--enable-languages=c,c++,objc \ > --prefix=/usr/local/cross-tools
--target=i686-pc-linux-gnuÃÂ --enable-shared Configuring for a
i686-pc-cygwin32 host. Created "Makefile" in /usr/local/src/BUILD/gcc-2.95
using "mh-frag" and "mt-frag " ./config.status is unchanged Configuring
libiberty... /usr/local/src/gcc-2.95/libiberty/configure: line 184: syntax
error near unexpec ted token
` ' /usr/local/src/gcc-2.95/libiberty/configure: line 184: `' Configure
in /usr/local/src/BUILD/gcc-2.95/libiberty failed, exiting.
ÃÂ
When I edit configure in the directory
/usr/local/src/gcc-2.95/libiberty, there are no ' in the line
184ÃÂ ÃÂ at all. The line 184 is "
--enable-FEATURE[=ARG]ÃÂ include FEATURE [ARG=yes] "
**************
ÃÂ
what is wrong
?! All replies appreciated...
Best regards
WenWang
More information about the Gcc-help
mailing list