From: Ben Kaduk Date: Wed, 30 Jun 2010 04:40:09 +0000 (-0400) Subject: Disable red zones for amd64 FBSD kernel code X-Git-Tag: openafs-devel-1_5_75~37 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=3f5144b3edfca5187ce417da8929eea86c930ef0;p=packages%2Fo%2Fopenafs.git Disable red zones for amd64 FBSD kernel code The kernel has been compiled with -mno-red-zone since at least FreeBSD 5.0; when we compile libafs.ko with red zones enabled and interact with the red-zone-less kernel, we get occasional stack corruption, which manifests itself in a variety of unpleasant ways. The flags we pass to gcc for our module build currently differ substantially from those used during a kernel build (or modules built with the kernel); I hope to transition to a module build process involving bsd.kmod.mk in the relatively near future. Change-Id: I406e264c1f96e1d893b9d12b561f48a3cbfdf57c Reviewed-on: http://gerrit.openafs.org/2297 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- diff --git a/src/libafs/MakefileProto.FBSD.in b/src/libafs/MakefileProto.FBSD.in index cce28dc03..203513562 100644 --- a/src/libafs/MakefileProto.FBSD.in +++ b/src/libafs/MakefileProto.FBSD.in @@ -38,6 +38,8 @@ KSRC = @BSD_KERNEL_PATH@ KBLD = @BSD_KERNEL_BUILD@ KOPTS = -fPIC + +KOPTS += -mno-red-zone KDEFS=-Wall -nostdinc -I/usr/include -D_KERNEL -DKLD_MODULE \