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.
Created attachment 27503 [details, diff] Patch against grub-0.94-r1-ebuild to remove filter-flags -fstack-protector and add filter-ldflags -pie
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.