Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 72196 - grub ebuild clears all cflags
Summary: grub ebuild clears all cflags
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 169325 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-11-23 00:15 UTC by basic
Modified: 2007-03-04 17:57 UTC (History)
1 user (show)

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 basic 2004-11-23 00:15:25 UTC
grub ebuild clears all cflags.
 Might be sensible to allow some flags through like -Os
maybe something like
export ALLOWED_FLAGS="-Os -pipe"
strip-flags


Reproducible: Always
Steps to Reproduce:
Comment 1 Carsten Lohrke (RETIRED) gentoo-dev 2004-11-23 05:00:15 UTC
from the ebuild: 

src_compile() {
        ### i686-specific code in the boot loader is a bad idea; disabling to ensure
        ### at least some compatibility if the hard drive is moved to an older or
        ### incompatible system.
        unset CFLAGS


A potentially slightly slower boot loader is better, than a broken one...
Comment 2 basic 2004-11-23 22:54:54 UTC
my reason is not speed it up, but just to make the boot loader image smaller, with gcc 3.3.4 I've had the boot loader images too large to fit in the boot sector. I needed the -Os to make it work. Could it allow at least -Os through? It's kinda annoying, as whenever I setup a new box, as I need to modify the ebuild.
Comment 3 Carsten Lohrke (RETIRED) gentoo-dev 2004-11-24 07:43:22 UTC
O.k., let's see what the maintainer thinks about it.
Comment 4 Robert Moss (RETIRED) gentoo-dev 2004-11-24 11:01:59 UTC
I'm probably going to say "first test 0.95.20040823 with the netboot flag disabled" followed by "no" at a guess. -Os lets some i686-specific stuff through. Remember, -Os isn't actually "optimize for size," it's "optimize as much as possible without increasing size." So the binaries should be no smaller and no larger than the unoptimized stuff.

Anyway, please test 0.95.20040823 and tell me whether you still need -Os. If you do I'll look at enabling very specific flags by default in order to reduce the binary size, but I'm not letting -Os through for a bootloader.
Comment 5 basic 2004-11-30 06:26:37 UTC
> I'm probably going to say "first test 0.95.20040823 with the netboot flag disabled" 
Tried that, no luck.

> followed by "no" at a guess.
:(

> -Os lets some i686-specific stuff through. Remember, -Os isn't actually "optimize for size," it's "optimize as much as possible without increasing size." So the binaries should be no smaller and no larger than the unoptimized stuff.
In theory yes, but...

> Anyway, please test 0.95.20040823 and tell me whether you still need -Os. If you do I'll look at enabling very specific flags by default in order to reduce the binary size, but I'm not letting -Os through for a bootloader.
Ok, I understand. I've tested that, no luck. What flags are you thinking of enabling? I'd like to test them myself :)
Comment 6 basic 2004-12-10 04:15:37 UTC
ok, I've had some time to take a look at the gcc man page, and try some gcc flags, no luck though. One question, are you saying that -Os -march=i386 would still result in i686 code?
Comment 7 SpanKY gentoo-dev 2005-08-19 16:58:19 UTC
added a USE=custom-cflags

which means expect no support if you use that :)
Comment 8 Jakub Moc (RETIRED) gentoo-dev 2007-03-04 17:57:16 UTC
*** Bug 169325 has been marked as a duplicate of this bug. ***