sys/boot: Disable -fstack-protector for now.
authorSascha Wildner <saw@online.de>
Thu, 31 Aug 2017 19:10:09 +0000 (21:10 +0200)
committerSascha Wildner <saw@online.de>
Thu, 31 Aug 2017 19:10:09 +0000 (21:10 +0200)
The rest of world builds fine with -fstack-protector*

lib/libstand/Makefile
sys/boot/dloader/Makefile
sys/boot/efi/boot1/Makefile
sys/boot/efi/libefi/Makefile
sys/boot/efi/loader/arch/x86_64/Makefile.inc
sys/boot/pc64/Makefile.inc

index 3b43b28..94c2199 100644 (file)
@@ -23,6 +23,9 @@ LIBC_SRC=     ${LIBSTAND_SRC}/../libc
 # Mostly OK, some of the libc imports are a bit noisy
 CFLAGS+=       -ffreestanding
 
+# Disable stack protector
+CFLAGS+=       -fno-stack-protector
+
 .if (${CFLAGS:M-flto} && ${CCVER:Mgcc*})
 CFLAGS+=       -fno-builtin    # LTO exposes too much stuff
 .endif
index 5e9da61..70fc8fb 100644 (file)
@@ -6,6 +6,9 @@ SRCS=   subs.c cmds.c
 
 WORLD_CCOPTLEVEL=      1       # Force -O1, -O2 implodes
 
+# Disable stack protector
+CFLAGS+=       -fno-stack-protector
+
 # For i386, dloader32/Makefile takes care of the extra CFLAGS
 .if ${MACHINE_ARCH} != "i386"
 CFLAGS+=       -fPIC -mno-red-zone
index 2682283..1ca65e8 100644 (file)
@@ -16,6 +16,10 @@ CFLAGS+=     -I${.CURDIR}/../../../contrib/dev/acpica/source/include
 CFLAGS+=       -I${.CURDIR}/../../../contrib/edk2/Include
 CFLAGS+=       -I${.CURDIR}/../../..
 CFLAGS+=       -DEFI_UFS_BOOT
+
+# Disable stack protector
+CFLAGS+=       -fno-stack-protector
+
 .ifdef(EFI_DEBUG)
 CFLAGS+=       -DEFI_DEBUG
 .endif
index c5ade87..262c754 100644 (file)
@@ -18,6 +18,9 @@ CFLAGS+= -I${.CURDIR}/../../../../lib/libstand
 # Pick up the bootstrap header for some interface items
 CFLAGS+= -I${.CURDIR}/../../common
 
+# Disable stack protector
+CFLAGS+= -fno-stack-protector
+
 # Handle FreeBSD specific %b and %D printf format specifiers
 CFLAGS+= ${FORMAT_EXTENSIONS}
 CFLAGS+= -DTERM_EMU
index a41e2ee..e3a6677 100644 (file)
@@ -9,6 +9,9 @@ SRCS+=  amd64_tramp.S \
 SRCS+= nullconsole.c \
        comconsole.c
 
+# Disable stack protector
+CFLAGS+=       -fno-stack-protector
+
 CFLAGS+=       -fPIC
 CFLAGS+=       -I${.CURDIR}/../../../contrib/edk2/Include
 LDFLAGS+=      -Wl,-znocombreloc
index 53202c8..e7b90f6 100644 (file)
@@ -3,6 +3,9 @@ __pc64__:
 
 .MAKEFLAGS:  MACHINE_ARCH=i386 MACHINE=i386 REALLY_X86_64=true
 
+# Disable stack protector
+CFLAGS+=               -fno-stack-protector
+
 CFLAGS+=               -m32
 LDFLAGS+=              -m elf_i386
 COMPILER_LDFLAGS+=     -Wl,-m,elf_i386