This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: eCos cross-compiler on Cygwin


>-----Original Message-----
>From: Arne Knutsen [mailto:arkn@world-online.no]
>Sent: 12 March 2001 18:00


>I'm trying to build the tools for cross-compiling from Cygwin for i386
>targets.
>
>I'm using Cygwin on Win 2000 Pro
>Downloaded and installed the following sources:
>binutils-2.10.1, gcc-2.95.2 and insight-5.0.
>
>Building binutils works OK.
>When trying to make gcc, I get the following errors:
>
>In file included from /src/gcc/gcc-2.95.2/gcc/libgcc2.c:48:
>include/stddef.h:1: Invalid token in expression
>make[1]: *** [libgcc2.a] Error 1
>make[1]: Leaving directory `/tmp/build/gcc/gcc'
>make: *** [all-gcc] Error 2
>make: Leaving directory `/tmp/build/gcc'
>
>Inspection of stddef.h doesn't show any obvious errors.
>
>Any idea what maybe wrong ?

  It's got DOS style CR-LF line ends instead of Unix style LFs.  When
building Gcc under Cygwin, this is a very common problem; in theory
it shouldn't happen if you provide the gcc source files and the cross
include headers in directories mounted in textmode, but it still does.

  The quickest solution is to let your build proceed until it crashes
out (as above), then changedir into $builddir/gcc/gcc/include, and use
the find command to convert all the line ends to unix style, like this:

 find . -type f -print -exec dos2unix \{\} \;

If you don't have a suitable dos2unix, put these lines into a file
called dos2unix in your /bin directory:

  #!/bin/sh
  cp $1 $1.dos && tr -d '\015' <$1.dos >$1 && rm $1.dos

and make it runnable by executing

  chmod ugo+x /bin/dos2unix

     hth,
       DaveK
-- 
 All your base are belong to us!


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]