[gentoo-dev] Re: check-reqs* vs CFLAGS=-g

2013-08-05 Thread Ryan Hill
On Thu, 1 Aug 2013 13:33:48 +0200
Michał Górny  wrote:

> What can we do to improve this? I'm not really happy to have LLVM
> ebuild analyze CFLAGS to set proper space constraints. Maybe we should
> make check-reqs-r1 automatically bump the constraints by some
> statistical multiplier when it detects -g?

The problem with that is there is no way to determine how much larger a -g
build will be.  It varies widely across GCC versions (eg. when var-tracking was
added the size of debug info exploded, in some cases up to an order of
magnitude), and different -g/-ggdb levels.  All you can really do is warn people
they may run out of space if they're using debugging options.


-- 
Ryan Hillpsn: dirtyepic_sk
   gcc-porting/toolchain/wxwidgets @ gentoo.org

47C3 6D62 4864 0E49 8E9E  7F92 ED38 BD49 957A 8463


signature.asc
Description: PGP signature


[gentoo-dev] Re: check-reqs* vs CFLAGS=-g

2013-08-05 Thread Ryan Hill
On Fri, 2 Aug 2013 13:47:10 +0100
Diego Elio Pettenò  wrote:

> On Fri, Aug 2, 2013 at 1:08 PM, Andreas K. Huettel
> wrote:
> 
> > I thought -O0 was generally discouraged, even for debugging?!
> 
> 
> As Michał said, it all depends on what you want to debug. I would say that
> for 90% of issues you *do not* want to use -O0. Your code might not even
> compile (libav for instance used to rely heavily in the DCE pass being
> executed, GCC disables DCE at -O0), and even if it, you're now given a
> different program altogether, so if you're looking for a crash, it might
> magically disappear (memory areas get cleared out at -O0 but they might be
> re-used without clearing at any other -O level).

If you're feeling adventurous you could try -Og -g with gcc 4.8.


-- 
Ryan Hillpsn: dirtyepic_sk
   gcc-porting/toolchain/wxwidgets @ gentoo.org

47C3 6D62 4864 0E49 8E9E  7F92 ED38 BD49 957A 8463


signature.asc
Description: PGP signature


Re: [gentoo-dev] Re: check-reqs* vs CFLAGS=-g

2013-08-02 Thread Diego Elio Pettenò
Unlikely you screwed up, -O0 makes bigger code than -O2 almost in every
case; then -g annotates it. I'm expecting -ggdb to take some few GBs more.

It'll be the same if not worse with almost all software, -g3 would make it
even worse.


Diego Elio Pettenò — Flameeyes
flamee...@flameeyes.eu — http://blog.flameeyes.eu/


On Fri, Aug 2, 2013 at 9:05 AM, Michał Górny  wrote:

> Dnia 2013-08-02, o godz. 02:07:18
> Duncan <1i5t5.dun...@cox.net> napisał(a):
>
> > Michał Górny posted on Thu, 01 Aug 2013 13:33:48 +0200 as excerpted:
> >
> > > LLVM has peek build space consumption around:
> > >
> > > - 400-550M without clang (depending on targets),
> > > - 950-1200M with clang,
> > > - 16G with clang & USE=debug (assertions, checks).
> >
> > Ouch!
> >
> > Thanks for the heads-up.  I didn't realize -g/debug added THAT much!  For
> > sure I'll have to keep that in mind if I ever decide to build llvm with
> > debug... and the general rule in mind for building anything else with
> > debug.
>
> Just to make it clear, USE=debug doesn't imply -g. It gets 16G with
> -O2. Curious enough, -O0 -g gave me 14G but maybe I screwed something
> up :).
>
> --
> Best regards,
> Michał Górny
>


Re: [gentoo-dev] Re: check-reqs* vs CFLAGS=-g

2013-08-02 Thread Michał Górny
Dnia 2013-08-02, o godz. 02:07:18
Duncan <1i5t5.dun...@cox.net> napisał(a):

> Michał Górny posted on Thu, 01 Aug 2013 13:33:48 +0200 as excerpted:
> 
> > LLVM has peek build space consumption around:
> > 
> > - 400-550M without clang (depending on targets),
> > - 950-1200M with clang,
> > - 16G with clang & USE=debug (assertions, checks).
> 
> Ouch!
> 
> Thanks for the heads-up.  I didn't realize -g/debug added THAT much!  For 
> sure I'll have to keep that in mind if I ever decide to build llvm with 
> debug... and the general rule in mind for building anything else with 
> debug.

Just to make it clear, USE=debug doesn't imply -g. It gets 16G with
-O2. Curious enough, -O0 -g gave me 14G but maybe I screwed something
up :).

-- 
Best regards,
Michał Górny


signature.asc
Description: PGP signature


[gentoo-dev] Re: check-reqs* vs CFLAGS=-g

2013-08-01 Thread Duncan
Michał Górny posted on Thu, 01 Aug 2013 13:33:48 +0200 as excerpted:

> LLVM has peek build space consumption around:
> 
> - 400-550M without clang (depending on targets),
> - 950-1200M with clang,
> - 16G with clang & USE=debug (assertions, checks).

Ouch!

Thanks for the heads-up.  I didn't realize -g/debug added THAT much!  For 
sure I'll have to keep that in mind if I ever decide to build llvm with 
debug... and the general rule in mind for building anything else with 
debug.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman