Error Compiling crossGCC For Arm

David Korn dkorn@pixelpower.com
Fri Jan 12 02:56:00 GMT 2001


>Hi, all

  Hi, Yeong,

>I am compiling the crossGCC for ARM processor, and I have
>the following problem using the generated application "genattr"
>during make. The error message is shown below.
>
>The environment that I am using is:
>1. Windows 98
>2. Cygwin 1.1.7
>3. binutils-2.10 successfully compiled and installed for arm-elf
>4. gcc 2.95.2 successfully configured for arm-elf

>make[2]: Leaving directory `/tmp/build/gcc/gcc/intl'
>./genattr /src/gcc/gcc-2.95.2/gcc/config/arm/arm.md > tmp-attr.h
>Expected character (.  Found character 
>.  At file position: 293
>Following characters are:

  Look at the way that error message has gotten mangled.  Look at the way
it says 'Found character' on one line and has the full stop on the next.
We can deduce that the character it found that it wasn't expecting is
a carriage return!  So it must be a problem of DOS CRLF being found when
Unix LF was expected.  This happens a lot under Cygwin, for the obvious
reason!  It must be the case that your source code has DOS CRLFs; this
can easily happen when you unpack archives on a PC, particularly if you
use winzip and don't know about the "Don't convert TAR file line endings"
option.

  There are two ways to fix this.  One is to run a dos2unix command on
every single file in your source tree - something like this should work:

cd <srcdir>; find . -type f -exec chmod a+w \{\} && dos2unix \{\} \;

where dos2unix (if you don't have such a command) is a shell script:

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

but an even faster solution is to provide a new mount for your source
directory in text mode and use that in your configure command instead - 
i.e. 

mkdir /gcc-src && mount -s -t `cygpath -w <srcdir>` /gcc-src

and then do

cd <objdir>; /gcc-src/configure <your configure options go here>

     hth,
        DaveK
-- 
The Boulder Pledge: "Under no circumstances will I ever purchase anything 
offered to me as the result of an unsolicited email message. Nor will I 
forward chain letters, petitions, mass mailings, or virus warnings to large 
numbers of others. This is my contribution to the survival of the online
community." 


**********************************************************************
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



More information about the crossgcc mailing list