From e08f244935ea860ab493f965b5a3b06c6a06bb73 Mon Sep 17 00:00:00 2001 From: Joerg Sonnenberger Date: Wed, 20 Apr 2005 20:27:04 +0000 Subject: [PATCH] Un-disable stack protector. I take responsibility for all problems this adds, which are not actual bugs. --- lib/libstand/Makefile | 3 +-- sys/boot/ficl/Makefile | 5 ++--- sys/boot/i386/Makefile.inc | 3 +-- sys/boot/pc32/Makefile.inc | 3 +-- sys/conf/Makefile.i386 | 5 +---- 5 files changed, 6 insertions(+), 13 deletions(-) diff --git a/lib/libstand/Makefile b/lib/libstand/Makefile index d844b96430..eea2e7cea9 100644 --- a/lib/libstand/Makefile +++ b/lib/libstand/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/lib/libstand/Makefile,v 1.14.2.10 2002/07/22 14:21:50 ru Exp $ -# $DragonFly: src/lib/libstand/Makefile,v 1.8 2005/04/06 03:36:27 dillon Exp $ +# $DragonFly: src/lib/libstand/Makefile,v 1.9 2005/04/20 20:27:04 joerg Exp $ # # Originally from $NetBSD: Makefile,v 1.21 1997/10/26 22:08:38 lukem Exp $ # @@ -15,7 +15,6 @@ INCS= stand.h MAN= libstand.3 # Mostly OK, some of the libc imports are a bit noisy -CFLAGS+= -fno-stack-protector CFLAGS+= -Wall -ffreestanding .if ${MACHINE_ARCH} == "amd64" diff --git a/sys/boot/ficl/Makefile b/sys/boot/ficl/Makefile index a02fcb0a62..a4c35339d6 100644 --- a/sys/boot/ficl/Makefile +++ b/sys/boot/ficl/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/sys/boot/ficl/Makefile,v 1.35 2003/06/30 19:08:49 ru Exp $ -# $DragonFly: src/sys/boot/ficl/Makefile,v 1.6 2005/04/05 22:36:29 dillon Exp $ +# $DragonFly: src/sys/boot/ficl/Makefile,v 1.7 2005/04/20 20:27:04 joerg Exp $ # .if ${MACHINE_ARCH} == "amd64" .MAKEFLAGS: MACHINE_ARCH=i386 MACHINE=i386 REALLY_AMD64=true @@ -10,12 +10,11 @@ BASE_SRCS= dict.c ficl.c fileaccess.c float.c loader.c math64.c \ prefix.c search.c stack.c tools.c vm.c words.c SRCS= ${BASE_SRCS} sysdep.c softcore.c -#OBJS+= stack_protector.o +OBJS+= stack_protector.o stack_protector.o: ../../libkern/stack_protector.c CLEANFILES= softcore.c testmain testmain.o -CFLAGS+= -fno-stack-protector CFLAGS+= -ffreestanding .if ${MACHINE_ARCH} == "i386" CFLAGS+= -mpreferred-stack-boundary=2 diff --git a/sys/boot/i386/Makefile.inc b/sys/boot/i386/Makefile.inc index d40c183a3f..4e2fe568b0 100644 --- a/sys/boot/i386/Makefile.inc +++ b/sys/boot/i386/Makefile.inc @@ -1,11 +1,10 @@ # Common defines for all of /sys/boot/i386/ # # $FreeBSD: src/sys/boot/i386/Makefile.inc,v 1.4 2003/06/26 03:51:57 peter Exp $ -# $DragonFly: src/sys/boot/i386/Attic/Makefile.inc,v 1.6 2005/04/05 22:36:31 dillon Exp $ +# $DragonFly: src/sys/boot/i386/Attic/Makefile.inc,v 1.7 2005/04/20 20:27:04 joerg Exp $ LOADER_ADDRESS?= 0x200000 CFLAGS+= -ffreestanding -mpreferred-stack-boundary=2 -CFLAGS+= -fno-stack-protector .if ${MACHINE_ARCH} == "amd64" .MAKEFLAGS: MACHINE_ARCH=i386 MACHINE=i386 REALLY_AMD64=true diff --git a/sys/boot/pc32/Makefile.inc b/sys/boot/pc32/Makefile.inc index 987fd093ea..d57f457157 100644 --- a/sys/boot/pc32/Makefile.inc +++ b/sys/boot/pc32/Makefile.inc @@ -1,11 +1,10 @@ # Common defines for all of /sys/boot/i386/ # # $FreeBSD: src/sys/boot/i386/Makefile.inc,v 1.4 2003/06/26 03:51:57 peter Exp $ -# $DragonFly: src/sys/boot/pc32/Makefile.inc,v 1.6 2005/04/05 22:36:31 dillon Exp $ +# $DragonFly: src/sys/boot/pc32/Makefile.inc,v 1.7 2005/04/20 20:27:04 joerg Exp $ LOADER_ADDRESS?= 0x200000 CFLAGS+= -ffreestanding -mpreferred-stack-boundary=2 -CFLAGS+= -fno-stack-protector .if ${MACHINE_ARCH} == "amd64" .MAKEFLAGS: MACHINE_ARCH=i386 MACHINE=i386 REALLY_AMD64=true diff --git a/sys/conf/Makefile.i386 b/sys/conf/Makefile.i386 index eb4611bff6..7295194531 100644 --- a/sys/conf/Makefile.i386 +++ b/sys/conf/Makefile.i386 @@ -2,7 +2,7 @@ # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 # $FreeBSD: src/sys/conf/Makefile.i386,v 1.179.2.16 2002/11/18 11:26:49 ru Exp $ -# $DragonFly: src/sys/conf/Attic/Makefile.i386,v 1.19 2005/04/05 22:36:33 dillon Exp $ +# $DragonFly: src/sys/conf/Attic/Makefile.i386,v 1.20 2005/04/20 20:27:04 joerg Exp $ # # Makefile for DragonFly BSD # @@ -46,9 +46,6 @@ COPTFLAGS?=-O -pipe .if !defined(NO_CPU_COPTFLAGS) COPTFLAGS+= ${_CPUCFLAGS} .endif -# don't risk using the stack protector hacks for the kernel -# -COPTFLAGS+= -fno-stack-protector # don't use -I- so we can use proper source-relative locality for local # includes INCLUDES= -nostdinc -I. -I$S -- 2.11.4.GIT