Skip to content

Commit 2516512

Browse files
Ingo MolnarLinus Torvalds
Ingo Molnar
authored and
Linus Torvalds
committed
[PATCH] x86: add -freg-struct-return to CFLAGS
Jeremy Fitzhardinge suggested the use of -freg-struct-return, which does structure-returns (such as when using pte_t) in registers instead of on the stack. that is indeed so, and this option reduced the kernel size a bit: text data bss dec hex filename 4799506 543456 3760128 9103090 8ae6f2 vmlinux.before 4798117 543456 3760128 9101701 8ae185 vmlinux.after the resulting kernel booted fine on my testbox. Lets go for it. Signed-off-by: Ingo Molnar <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 38bed54 commit 2516512

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/i386/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ LDFLAGS_vmlinux := --emit-relocs
3131
endif
3232
CHECKFLAGS += -D__i386__
3333

34-
CFLAGS += -pipe -msoft-float -mregparm=3
34+
CFLAGS += -pipe -msoft-float -mregparm=3 -freg-struct-return
3535

3636
# prevent gcc from keeping the stack 16 byte aligned
3737
CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2)

0 commit comments

Comments
 (0)