Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Thu, 15 Jul 2004 14:03:00 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: HOWTO build debug version of the cygwin dll with no optimisation? Message-ID: <20040715180300.GE10464@trixie.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20040715143741 DOT GD9941 AT trixie DOT casa DOT cgf DOT cx> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i On Thu, Jul 15, 2004 at 04:14:05PM +0100, Dave Korn wrote: >> -----Original Message----- >> From: cygwin-owner On Behalf Of Christopher Faylor >> Sent: 15 July 2004 15:38 > >> On Thu, Jul 15, 2004 at 03:32:14PM +0100, Dave Korn wrote: >> >> -----Original Message----- >> >> From: cygwin-owner On Behalf Of Christopher Faylor >> >> Sent: 15 July 2004 02:00 >> > >> >> >> "CFLAGS_FOR_BUILD=" "CFLAGS_FOR_TARGET=-O2 -g -O0" >> >> "LDFLAGS=" >> >> > ^^^^^^^^^^^^^^^^^ >> >> > That's it :-) >> >> > >> >> >Try `make CFLAGS=-g CFLAGS_FOR_TARGET=-g'. That will >> >> compile everything >> >> >w/o optimization >> >> >> >>Or, once you've gotten supporting libraries built, just build in the >> >>winsup/cygwin directory with CFLAGS=-g. It's a lot faster to just >> >>build cygwin from the cygwin subdirectory. >> > >> >Good point. I tend to do "make all-bfd all-target-winsup" at the >> >top-level, but that of course still drags in all the cygserver and >> >utils stuff that I don't need. >> >> Wow. The first response to my observation was a "good point"? > > I call 'em like I see 'em! > >> That is surprising. I fully expected to get a "Oh, I tried that once >> and it didn't work for me" from somebody. > > Well, I haven't actually tried it myself. Is setting just CFLAGS enough >when you're in the lower-level directory? Hmm. It should be. I do my configury in the winsup directory, though, so I don't get all of the CC overrides from the top level. I think setting CFLAGS should still be enough, though. >> Anyway, FWIW, the only time I build cygwin from the top level is when >> I'm generating snapshots. Otherwise, I live in the cygwin >> (and occasionally the newlib) directory. > >Matter of fact, I knew it already, or rather had all the clues I >needed.... I used to (a few years back) very regularly be in the habit >of cd'ing into the gcc subdir and doing "make all" there for gcc >builds; when all you want is a cross-compiler, you might as well save >the time of building cross- and host- libiberty et al. Then I got a >faster computer, and fell out of the habit! But, yeh, this is a general >principle with all the software that shares top-level autoconf; once >you've configured it you can just cd into the relevant lower-level dir >and do a "make all", to just get the particular thing you want built. Yep. I try to do the same thing with gcc when I am working on gcc and gas when I'm working on gas, etc. You run the risk of not correctly rebuilding sibling libraries and such after a CVS update though, of course. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/