summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libstand/Makefile2
-rw-r--r--sys/boot/amd64/Makefile.inc2
-rw-r--r--sys/boot/efi/libefi/Makefile2
-rw-r--r--sys/boot/ficl/Makefile3
4 files changed, 6 insertions, 3 deletions
diff --git a/lib/libstand/Makefile b/lib/libstand/Makefile
index 359fa4a..7c253c8 100644
--- a/lib/libstand/Makefile
+++ b/lib/libstand/Makefile
@@ -27,7 +27,7 @@ CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
CFLAGS.gcc+= -mpreferred-stack-boundary=2
.endif
.if ${MACHINE_CPUARCH} == "amd64"
-CFLAGS+= -fPIC
+CFLAGS+= -fPIC -mno-red-zone
.endif
.if ${MACHINE} == "pc98"
CFLAGS+= -Os
diff --git a/sys/boot/amd64/Makefile.inc b/sys/boot/amd64/Makefile.inc
index ee96a42..7b10385 100644
--- a/sys/boot/amd64/Makefile.inc
+++ b/sys/boot/amd64/Makefile.inc
@@ -5,7 +5,7 @@
BINDIR?= /boot
# See conf/kern.mk for the correct set of these
-CFLAGS+= -ffreestanding
+CFLAGS+= -ffreestanding -mno-red-zone
CFLAGS+= -mno-mmx -mno-sse -mno-aes -mno-avx -msoft-float
LDFLAGS+= -nostdlib
diff --git a/sys/boot/efi/libefi/Makefile b/sys/boot/efi/libefi/Makefile
index 3edeb22..bd753cf 100644
--- a/sys/boot/efi/libefi/Makefile
+++ b/sys/boot/efi/libefi/Makefile
@@ -9,7 +9,7 @@ SRCS= delay.c efi_console.c efinet.c efipart.c errno.c handles.c \
SRCS+= nullconsole.c comconsole.c
.if ${MACHINE_ARCH} == "amd64"
-CFLAGS+= -fPIC
+CFLAGS+= -fPIC -mno-red-zone
.endif
CFLAGS+= -I${.CURDIR}/../include
CFLAGS+= -I${.CURDIR}/../include/${MACHINE_CPUARCH}
diff --git a/sys/boot/ficl/Makefile b/sys/boot/ficl/Makefile
index 6fad54f..dffdab0 100644
--- a/sys/boot/ficl/Makefile
+++ b/sys/boot/ficl/Makefile
@@ -19,6 +19,9 @@ CFLAGS+= -ffreestanding
CFLAGS+= -march=i386
CFLAGS.gcc+= -mpreferred-stack-boundary=2
.endif
+.if ${MACHINE_CPUARCH} == "amd64"
+CFLAGS+= -mno-red-zone
+.endif
.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
.endif
OpenPOWER on IntegriCloud