Skip to content

Commit

Permalink
Revert "[PATCH] x86: Drop cc-options call for all options supported i…
Browse files Browse the repository at this point in the history
…n gcc 3.2+"

This reverts commit c8fdd24.

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>
  • Loading branch information
Linus Torvalds committed May 18, 2007
1 parent b42895d commit b465223
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ endif
include $(srctree)/arch/$(ARCH)/Makefile

ifdef CONFIG_FRAME_POINTER
CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
CFLAGS += -fno-omit-frame-pointer $(call cc-option,-fno-optimize-sibling-calls,)
else
CFLAGS += -fomit-frame-pointer
endif
Expand Down
2 changes: 1 addition & 1 deletion arch/i386/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ CHECKFLAGS += -D__i386__
CFLAGS += -pipe -msoft-float -mregparm=3 -freg-struct-return

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

# CPU-specific tuning. Anything which can be shared with UML should go here.
include $(srctree)/arch/i386/Makefile.cpu
Expand Down

0 comments on commit b465223

Please sign in to comment.