summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authormaxv <maxv@NetBSD.org>2018-02-23 09:00:55 +0000
committermaxv <maxv@NetBSD.org>2018-02-23 09:00:55 +0000
commit76beaea9c2d9da3ff2e58cef16fee0e89fdac62c (patch)
tree6c6c819df81bbea2930e84d91471c484e210f5a7 /sys/arch
parent0402a52cfa39900d0097fcad5c58f7b51c4d27ca (diff)
Add -fno-shrink-wrap, to force GCC to push the frames at the very beginning
of the functions. Otherwise DDB is unable to display a correct stack trace if a fault occurred in a function before the frame was pushed. Discussed on tech-kern@, flag suggested by Krister Walfridsson. Should fix PR/52560.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/amd64/conf/Makefile.amd644
-rw-r--r--sys/arch/i386/conf/Makefile.i3864
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/amd64/conf/Makefile.amd64 b/sys/arch/amd64/conf/Makefile.amd64
index ddf1bdb64bb..c6a9fa9e0e2 100644
--- a/sys/arch/amd64/conf/Makefile.amd64
+++ b/sys/arch/amd64/conf/Makefile.amd64
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.amd64,v 1.64 2017/11/15 18:02:37 maxv Exp $
+# $NetBSD: Makefile.amd64,v 1.65 2018/02/23 09:00:56 maxv Exp $
# Makefile for NetBSD
#
@@ -35,7 +35,7 @@ GENASSYM_CONF= ${AMD64}/amd64/genassym.cf
##
DEFCOPTS= -O2 -fno-omit-frame-pointer
CPPFLAGS+= -Damd64 -Dx86_64
-CFLAGS+= -mcmodel=kernel
+CFLAGS+= -mcmodel=kernel -fno-shrink-wrap
# -mno-sse implies -mno-sse2 (etc), explicitly disable avx to be extra sure
CFLAGS+= -mno-red-zone -mno-mmx -mno-sse -mno-avx
# make absolutely sure we don't get x87 registers used as well
diff --git a/sys/arch/i386/conf/Makefile.i386 b/sys/arch/i386/conf/Makefile.i386
index ab0f8cd1365..262bec23dbc 100644
--- a/sys/arch/i386/conf/Makefile.i386
+++ b/sys/arch/i386/conf/Makefile.i386
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.i386,v 1.187 2017/12/10 14:29:47 christos Exp $
+# $NetBSD: Makefile.i386,v 1.188 2018/02/23 09:00:55 maxv Exp $
# Makefile for NetBSD
#
@@ -35,7 +35,7 @@ GENASSYM_CONF= ${I386}/i386/genassym.cf
##
DEFCOPTS= -O2 -fno-omit-frame-pointer
CPPFLAGS+= -Di386
-CFLAGS+= -msoft-float
+CFLAGS+= -msoft-float -fno-shrink-wrap
## no-sse implies no-sse2 but not no-avx
CFLAGS+= -mno-mmx -mno-sse -mno-avx