Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Revert "[PATCH] x86: Drop cc-options call for all options supported in gcc 3.2+"

This reverts commit c8fdd247255a3a027cd9f66dcf93e6847d1d2f85.

It turns out the kernel was correct, and the gcc complaint was a gcc
bug. The preferred stack boundary is expressed not in bytes, but in the
the log2() of the preferred boundary, so "-mpreferred-stack-boundary=2"
is in fact exactly what we want, but a gcc that is compiled for x86-64
will consider it an error (because the 64-bit calling sequence says that
the stack should be 16-byte aligned) even if we are then using "-m32" to
generate 32-bit code.

Noted-by: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Cc: Jan Hubicka <jh@suse.cz>
Acked-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

+2 -2
+1 -1
Makefile
··· 491 491 include $(srctree)/arch/$(ARCH)/Makefile 492 492 493 493 ifdef CONFIG_FRAME_POINTER 494 - CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls 494 + CFLAGS += -fno-omit-frame-pointer $(call cc-option,-fno-optimize-sibling-calls,) 495 495 else 496 496 CFLAGS += -fomit-frame-pointer 497 497 endif
+1 -1
arch/i386/Makefile
··· 34 34 CFLAGS += -pipe -msoft-float -mregparm=3 -freg-struct-return 35 35 36 36 # prevent gcc from keeping the stack 16 byte aligned 37 - CFLAGS += -mpreferred-stack-boundary=4 37 + CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2) 38 38 39 39 # CPU-specific tuning. Anything which can be shared with UML should go here. 40 40 include $(srctree)/arch/i386/Makefile.cpu