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 <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
KBLD = @BSD_KERNEL_BUILD@
<amd64_fbsd_70 amd64_fbsd_71 amd64_fbsd_80 amd64_fbsd_81 amd64_fbsd_90>
KOPTS = -fPIC
+<amd64>
+KOPTS += -mno-red-zone
<all>
KDEFS=-Wall -nostdinc -I/usr/include -D_KERNEL -DKLD_MODULE \