[lkml]   [2004]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: [ANNOUNCE] 2.6.0-tiny1 tree for small systems
Hi Matt,

On Wed, Dec 31, 2003 at 07:46:55PM -0600, Matt Mackall wrote:
> Ok, I added the ability to override the arch-default CFLAGS, but sadly
> I'm unable to reproduce your space savings here with gcc 3.3.2. The
> default -march=i586 seems to produce the smallest code for me.

Same results here. I was a bit stumped at first, but finally found the reason :
by changing CFLAGS, both you and me have implictly removed '-falign-functions=0',
which is what grows up the kernel image ! I really don't understand what happens
in the kernel, because on many other programs, i386 gives me smaller progs than
i586 for -Os optimization, and -falign-functions=0 is *always* smaller. In the
kernel, i386, i586 an c3 are identical, but -falign-functions=0 is bigger by
50 kB :

-Os -mpreferred-stack-boundary=2 -march=c3 -falign-functions=0 -falign-loops=0 -falign-jumps=0 :

text data bss dec hex filename
1306682 111227 50896 1468805 166985 vmlinux

-Os -mpreferred-stack-boundary=2 -march=c3 -falign-loops=0 -falign-jumps=0 :

text data bss dec hex filename
1256604 111227 50896 1418727 15a5e7 vmlinux

I have tested several values and found that the second compilation above is equivalent
to the default gcc setting of -falign-functions=1. And using 1 instead of 0 in
-falign-{loops,jumps,labels} makes not difference at all. So I would suggest
adding -falign-functions=1 everywhere.

BTW, I slightly changed your patch to be able to specify several options. I did
it the dirty way because I don't know how to split the string into several words :

--- ./arch/i386/Makefile Sat Jan 3 15:10:26 2004
+++ a./rch/i386/Makefile Sat Jan 3 15:43:12 2004
@@ -27,7 +27,7 @@
align := $(subst -functions=0,,$(call check_gcc,-falign-functions=0,-malign-functions=0))

-cflags-y += $(CONFIG_TINY_CFLAGS_VAL)
+cflags-y += $(shell echo $(CONFIG_TINY_CFLAGS_VAL))
cflags-$(CONFIG_M386) += -march=i386
cflags-$(CONFIG_M486) += -march=i486

Other than that, I've compiled 2.6.1-rc1-tiny1. It's slightly smaller than 2.6.0-tiny1
and CONFIG_CPU_SUP_* otherwise it would not link. I can give you the error reports
and .config in case you're interested.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:59    [W:0.060 / U:1.800 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site