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