Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 44905 - grub: filtering -fstack-protector doesn't help size issues, but filtering -pie does
Summary: grub: filtering -fstack-protector doesn't help size issues, but filtering -pi...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Hardened Gentoo
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-16 17:10 UTC by Christian Rubbert
Modified: 2004-03-17 11:25 UTC (History)
0 users

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


Attachments
Patch against grub-0.94-r1-ebuild to remove filter-flags -fstack-protector and add filter-ldflags -pie (grub-0.94-r1.ebuild-ceed.diff,341 bytes, patch)
2004-03-16 17:11 UTC, Christian Rubbert
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Rubbert 2004-03-16 17:10:52 UTC
When compiling grub-0.94 with

CFLAGS="-march=athlon-mp -O2 -pipe -fPIC -fstack-protector"
LDFLAGS="${LDFLAGS} -pie"

the grub stages become rather big:

cdimage root # du -sh /usr/lib/grub       
2.3G    /usr/lib/grub

Filtering -fstack-protector as in grub-0.94-r1.ebuild didn't help bring the size down, but removing -pie from LDFLAGS while leaving CFLAGS alone did the trick:

cdimage grub # du -sh /usr/lib/grub
992K    /usr/lib/grub

See attached patch.
Comment 1 Christian Rubbert 2004-03-16 17:11:53 UTC
Created attachment 27503 [details, diff]
Patch against grub-0.94-r1-ebuild to remove filter-flags -fstack-protector and add filter-ldflags -pie
Comment 2 solar (RETIRED) gentoo-dev 2004-03-17 11:25:11 UTC
wtf is grub doing creating 2.3G of data that's just insane.

filter-ldflags -pie added to grub ~arch

I'm not so sure about the removal of the filter-flags of 
-fstack-protector The ebuild unsets CFLAGS by default which would make
it now show up for you but if a user were using say hgcc then we might
run into addressing problems and missing symbols.  This should all be
documented in our bugzilla system some place.

I'm going to go ahead and change the resolution to FIXED here.
Reopen if you think otherwise.