[PATCH] Add -mno-red-zone to CFLAGS for x86-64

Jan Kiszka
2014-07-04T11:47:02Z

This is required in order to use the stack in inline assembly (like
pushf; pop reg) without clashing with the compiler's stack assignment.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

Seen with old gcc 4.5.1.

config/config-x86_64.mak | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/config/config-x86_64.mak b/config/config-x86_64.mak
index d69252f..06b2581 100644
--- a/config/config-x86_64.mak
+++ b/config/config-x86_64.mak
@@ -1,7 +1,7 @@
cstart.o = $(TEST_DIR)/cstart64.o
bits = 64
ldarch = elf64-x86-64
-CFLAGS += -D__x86_64__
+CFLAGS += -D__x86_64__ -mno-red-zone

tests = $(TEST_DIR)/access.flat $(TEST_DIR)/apic.flat \
$(TEST_DIR)/emulator.flat $(TEST_DIR)/idt_test.flat \
--
1.8.1.1.298.ge7eed54