On Sat, 2 Feb 2008, Felix Fietkau wrote: > Robert P. J. Day wrote: > > i'm perusing the generic-2.6.24 linux patches in the svn checkout, > > and i'm curious about patch 004-extra_optimization.patch: > > > > ===== > > --- linux-2.6.23-rc6.orig/Makefile 2007-09-21 16:23:55.000000000 +0800 > > +++ linux-2.6.23-rc6/Makefile 2007-09-21 16:23:56.000000000 +0800 > > @@ -508,6 +508,9 @@ > > NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) > > -print-file-name=include) > > CHECKFLAGS += $(NOSTDINC_FLAGS) > > > > +# improve gcc optimization > > +CFLAGS += $(call cc-option,-funit-at-a-time,) > > + > > # warn about C99 declaration after statement > > CFLAGS += $(call cc-option,-Wdeclaration-after-statement,) > > ===== > > > > i'm used to openwrt patches that fix actual issues, but the above is > > apparently only for an optimization. is it necessary for openwrt? is > > there a reason that it isn't in the kernel Makefile itself? > > > > i guess i'm just curious about patches that appear optional in some > > sense. thanks.
> It is not strictly necessary, but it allows gcc to expand the scope > of inlining analysis to generate better code. I don't know if that's > something for upstream inclusion. under the circumstances, then, i'd be tempted to make that a user-selectable menuconfig option. for purity, i typically prefer to not mess with the stock source for any package unless there's a compelling reason -- as in, to fix actual breakage. for something like the above, i don't see that kind of compelling reason to deviate from the norm. better, i think, to make that optimization optional if that's possible, and let users make up their own minds. rday -- ======================================================================== Robert P. J. Day Linux Consulting, Training and Annoying Kernel Pedantry Waterloo, Ontario, CANADA Home page: http://crashcourse.ca Fedora Cookbook: http://crashcourse.ca/wiki/index.php/Fedora_Cookbook ======================================================================== _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel