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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: gdb and older cygwins


> -----Original Message-----
> From: gdb-owner On Behalf Of Fabian Cenedese
> Sent: 26 August 2004 15:58

> >> > PS: The other solution would be to fix the 2.95.3 source 
> about this
> >> > CRLF bug. I looked into the gcc list but couldn't find 
> >> simple patches,
> >> > I guess it needs a bigger change. If anyone has some hints 
> >> about it...
> >
> >  My first hint is this:  never use WinZIP to unpack a 
> tarball in a cygwin
> >environment, because it does the wrong thing with soft-links 
> and it mangles
> >all the line endings.  Use "tar xfv" instead.
> >
> > [Did I guess correctly how you managed to get your gcc 
> sources mangled?]
> 
> It depends. I use cygwin only to compile gcc/gdb+co. The 
> intended platform
> to use them is Windows with cygwin.dll, not the whole Cygwin 
> system. So
> the source files which gcc will need to cope with ARE Windows 
> text files.

  You have two misunderstandings here:

#1.  The cygwin dll is all you need to be using Cygwin; it's the dll that
provides the posix environment, it's the dll that handles
textmode-vs-binmode and line endian-ness issues.  Windows-plus-cygwin-dll
equals cygwin equals Unix style line-ends.

#2.  It doesn't matter what platform you want to compile on.  The gcc
sources come with Unix-style LF line ends.  They are NOT Windows text files
unless *you* have altered them.  If they now have CRs in them, it was *you*
who put them there, when you didn't need to do so, and if you hadn't done
so, it would have compiled fine under 2.95.3

> The source files for gcc and gdb of course I didn't unpack 
> with Winzip,
> and if it's only because it doesn't understand tar/gz/bzip2 :)

  It didn't understand bzip2 last time I checked, but it had no trouble
whatsoever with either tar, gz, or .tar.gz.  In fact some versions (v8
upward IIRC) even have an option to decide whether to mangle line-ends or
not specifically when unpacking a tar file.


> As I will use gcc and gdb from Windows (and not in Cygwin) I guess
> this is no option for me.

  As I point out above, if the cygwin dll is involved, you *are* in Cygwin;
what you are running is *not* a native windows app and will follow Cygwin's
preferences for line-end style.

    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....


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