Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 378663 - sys-devel/gcc-4.4.5 Please drop CFLAGS="-g"
Summary: sys-devel/gcc-4.4.5 Please drop CFLAGS="-g"
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal minor
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-10 14:13 UTC by Agostino Sarubbo
Modified: 2011-08-12 02:10 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2011-08-10 14:13:44 UTC
simple past from build.log:

/tmp/portage/sys-devel/gcc-4.4.5/work/build/./gcc/xgcc -B/tmp/portage/sys-devel/gcc-4.4.5/work/build/./gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include -g -march=native -O2 -g0 -m32 -O2  -g -march=native -O2 -g0 -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wcast-qual -Wold-style-definition  -isystem ./include  -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED    -I. -I. -I../../.././gcc -I/tmp/portage/sys-devel/gcc-4.4.5/work/gcc-4.4.5/libgcc -I/tmp/portage/sys-devel/gcc-4.4.5/work/gcc-4.4.5/libgcc/. -I/tmp/portage/sys-devel/gcc-4.4.5/work/gcc-4.4.5/libgcc/../gcc -I/tmp/portage/sys-devel/gcc-4.4.5/work/gcc-4.4.5/libgcc/../include -I/tmp/portage/sys-devel/gcc-4.4.5/work/gcc-4.4.5/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS -DUSE_TLS -o _udiv_w_sdiv_s.o -MT _udiv_w_sdiv_s.o -MD -MP -MF _udiv_w_sdiv_s.dep -DSHARED -DL_udiv_w_sdiv -c /tmp/portage/sys-devel/gcc-4.4.5/work/gcc-4.4.5/libgcc/../gcc/libgcc2.c \

Unfortunately the last -g overwrites my -g0

amd64box ~ # emerge --info | grep CFLAGS
CFLAGS="-march=native -O2 -g0"

I believe that also major version should append -g
Comment 1 Ryan Hill (RETIRED) gentoo-dev 2011-08-11 03:53:36 UTC
(In reply to comment #0)
> simple past from build.log:
> 
> /tmp/portage/sys-devel/gcc-4.4.5/work/build/./gcc/xgcc
> -B/tmp/portage/sys-devel/gcc-4.4.5/work/build/./gcc/
> -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem
> /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include
> -g -march=native -O2 -g0 -m32 -O2  -g -march=native -O2 -g0 -DIN_GCC   -W -Wall
> -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wcast-qual
> -Wold-style-definition  -isystem ./include  -fPIC -g -DHAVE_GTHR_DEFAULT
> -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED    -I. -I. -I../../.././gcc
> -I/tmp/portage/sys-devel/gcc-4.4.5/work/gcc-4.4.5/libgcc
> -I/tmp/portage/sys-devel/gcc-4.4.5/work/gcc-4.4.5/libgcc/.
> -I/tmp/portage/sys-devel/gcc-4.4.5/work/gcc-4.4.5/libgcc/../gcc
> -I/tmp/portage/sys-devel/gcc-4.4.5/work/gcc-4.4.5/libgcc/../include
> -I/tmp/portage/sys-devel/gcc-4.4.5/work/gcc-4.4.5/libgcc/config/libbid
> -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS -DUSE_TLS -o _udiv_w_sdiv_s.o -MT
> _udiv_w_sdiv_s.o -MD -MP -MF _udiv_w_sdiv_s.dep -DSHARED -DL_udiv_w_sdiv -c
> /tmp/portage/sys-devel/gcc-4.4.5/work/gcc-4.4.5/libgcc/../gcc/libgcc2.c \
> 
> Unfortunately the last -g overwrites my -g0

That's by design.  The first boostrap gcc (xgcc) is built using upstream defaults.  We hit a lot of bugs otherwise.  If it makes you feel better it's just a minimal compiler that builds the stage 2 compiler and is then thrown away.

> I believe that also major version should append -g

I'm not sure what you mean here.
Comment 2 SpanKY gentoo-dev 2011-08-11 04:18:28 UTC
yes, -g0 is completely irrelevant once things get merged into ROOT.  none of the -g/-ggdb affects code generation ... just debug info that is added to the ELF and eventually stripped.

in fact, having -g0 in your CFLAGS instead of just -g is completely useless.
Comment 3 Ryan Hill (RETIRED) gentoo-dev 2011-08-11 04:50:33 UTC
Well almost useless ;)

tundra /usr/lib/debug # du -s
4.1G	.
4.1G	total

4.6's debug info is retardedly huge.  I've filled a 15G partition several times.
Comment 4 SpanKY gentoo-dev 2011-08-12 02:10:48 UTC
FEATURES=splitdebug doesnt count.  -g0+splitdebug makes 0 sense.