Re: HOWTO build debug version of the cygwin dll with no optimisation?

2004-07-15 Thread Christopher Faylor
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/



RE: HOWTO build debug version of the cygwin dll with no optimisation?

2004-07-15 Thread Dave Korn
> -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?  I might have thought you had to
override the CXX and LD flags as well.  But I'd want to try it before
committing myself to an opinion... :)

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

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


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



Re: HOWTO build debug version of the cygwin dll with no optimisation?

2004-07-15 Thread Christopher Faylor
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"?

That is surprising.  I fully expected to get a "Oh, I tried that once
and it didn't work for me" from somebody.

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.

cgf

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



RE: HOWTO build debug version of the cygwin dll with no optimisation?

2004-07-15 Thread Dave Korn
> -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.

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


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



Re: HOWTO build debug version of the cygwin dll with no optimisation?

2004-07-14 Thread Christopher Faylor
On Wed, Jul 14, 2004 at 08:48:36PM +0200, Corinna Vinschen wrote:
>On Jul 14 18:43, Dave Korn wrote:
>>   Ok, it doesn't mention how to do this in the user guide.  It doesn't say
>> how to do this in the FAQ.  It doesn't say how to do it on the website's
>> how-to-contribute page.  It doesn't say how to do this in the sources.  I've
>> searched at google.  I've searched at the list archive.  And the GNU
>> standard method (CFLAGS='-g -O0' ../src/configure) doesn't work.
>> 
>>   I found a post on the mailing list that suggests that you have to set
>> *three* environment variables, CFLAGS, CXXFLAGS, and LDFLAGS.
>> 
>>   I tried it and it didn't quite work properly.  My build logs are full of
>> stuff like...
>> 
>> make "AR_FLAGS=rc"   "CC_FOR_BUILD=gcc"  "CFLAGS=-O2 -g -O0"
>> "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.

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



Re: HOWTO build debug version of the cygwin dll with no optimisation?

2004-07-14 Thread Corinna Vinschen
On Jul 14 18:43, Dave Korn wrote:
>   Ok, it doesn't mention how to do this in the user guide.  It doesn't say
> how to do this in the FAQ.  It doesn't say how to do it on the website's
> how-to-contribute page.  It doesn't say how to do this in the sources.  I've
> searched at google.  I've searched at the list archive.  And the GNU
> standard method (CFLAGS='-g -O0' ../src/configure) doesn't work.
> 
>   I found a post on the mailing list that suggests that you have to set
> *three* environment variables, CFLAGS, CXXFLAGS, and LDFLAGS.
> 
>   I tried it and it didn't quite work properly.  My build logs are full of
> stuff like...
> 
> make "AR_FLAGS=rc""CC_FOR_BUILD=gcc"  "CFLAGS=-O2 -g -O0"
> "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

Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Co-Project Leader  mailto:[EMAIL PROTECTED]
Red Hat, Inc.

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



HOWTO build debug version of the cygwin dll with no optimisation?

2004-07-14 Thread Dave Korn


  Ok, it doesn't mention how to do this in the user guide.  It doesn't say
how to do this in the FAQ.  It doesn't say how to do it on the website's
how-to-contribute page.  It doesn't say how to do this in the sources.  I've
searched at google.  I've searched at the list archive.  And the GNU
standard method (CFLAGS='-g -O0' ../src/configure) doesn't work.

  I found a post on the mailing list that suggests that you have to set
*three* environment variables, CFLAGS, CXXFLAGS, and LDFLAGS.

  I tried it and it didn't quite work properly.  My build logs are full of
stuff like...

make "AR_FLAGS=rc"  "CC_FOR_BUILD=gcc"  "CFLAGS=-O2 -g -O0"
"CFLAGS_FOR_BUILD=" "CFLAGS_FOR_TARGET=-O2 -g -O0"  "LDFLAGS="
"LIBCFLAGS=-O2 -g -O0"  "LIBCFLAGS_FOR_TARGET=-O2 -g -O0"   "MAKE=make"
"MAKEINFO=makeinfo --split-size=500 "   "PICFLAG="
"PICFLAG_FOR_TARGET="   "SHELL=/bin/sh" "EXPECT=expect"
"RUNTEST=runtest"   "RUNTESTFLAGS="
"exec_prefix=/usr/build/install""infodir=/usr/build/install/info"
"libdir=/usr/build/install/lib" "prefix=/usr/build/install"
"tooldir=/usr/build/install/i686-pc-cygwin"
"top_toollibdir=/usr/build/install/i686-pc-cygwin/lib"  "AR=ar"
"AS=as" "CC=gcc -L/usr/build/obj/i686-pc-cygwin/winsup
-L/usr/build/obj/i686-pc-cygwin/winsup/cygwin
-L/usr/build/obj/i686-pc-cygwin/winsup/w32api/lib -isystem
/usr/build/src/winsup/include -isystem /usr/build/src/winsup/cygwin/include
-isystem /usr/build/src/winsup/w32api/include
-B/usr/build/obj/i686-pc-cygwin/newlib/ -isystem
/usr/build/obj/i686-pc-cygwin/newlib/targ-include -isystem
/usr/build/src/newlib/libc/include -L/usr/build/obj/ld"
"LD=/usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/../../../../i686-pc-cygwin/bin/ld.
exe""LIBCFLAGS=-O2 -g -O0"  "NM=nm" "PICFLAG="
"RANLIB=ranlib" "DESTDIR=" all-recursive

...where you'll see that my flags have been combined with -O2 from somewhere
else.  Now this may well work, as the -O0 is after the -O2 on the command
line, and probably overrides it, but it seems a little risky in general, and
I suspect this isn't the correct way to do it, since the optimisation
settings seem to be held elsewhere and combined with the CFLAGS at a late
stage, and it's that somewhere-else that I really ought to be setting.

  So my questions are:  How is this supposed to be done, where is it
actually documented, and why not?

  Or have I just missed something in my searches?

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


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