diff options
author | Andrew Turner <andrew@FreeBSD.org> | 2021-01-12 14:18:59 +0000 |
---|---|---|
committer | Andrew Turner <andrew@FreeBSD.org> | 2021-01-13 16:36:52 +0000 |
commit | 594389d1de647cbda3cb36f06c06d3f73b190e82 (patch) | |
tree | ff90257f3ec568ade96afc07ad0a94bb5b0d1329 | |
parent | f9d85a082181a4eeec4200e42c3ffc1ac85f571c (diff) | |
download | src-594389d1de647cbda3cb36f06c06d3f73b190e82.tar.gz src-594389d1de647cbda3cb36f06c06d3f73b190e82.zip |
Create a stack frame when needed in the arm64 kernel
When building the arm64 kernel for use with dtrace or hwpmc we need
to include a stack frame so they can extract a stack trace.
As with amd64 also build a stack frame in modules.
Sponsored by: Innovate UK
-rw-r--r-- | sys/conf/Makefile.arm64 | 2 | ||||
-rw-r--r-- | sys/conf/kmod.mk | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/conf/Makefile.arm64 b/sys/conf/Makefile.arm64 index 1f5760021f3e..d48826197dbd 100644 --- a/sys/conf/Makefile.arm64 +++ b/sys/conf/Makefile.arm64 @@ -45,7 +45,7 @@ SYSTEM_LD= \ KERNEL_EXTRA+= ${KERNEL_KO}.bin KERNEL_EXTRA_INSTALL+= ${KERNEL_KO}.bin -.if !empty(DDB_ENABLED) +.if !empty(DDB_ENABLED) || !empty(DTR_ENABLED) || !empty(HWPMC_ENABLED) CFLAGS += -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer .endif diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index b7ba121925ea..c245f447cefb 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -146,7 +146,7 @@ LDFLAGS+= --build-id=sha1 .endif CFLAGS+= ${DEBUG_FLAGS} -.if ${MACHINE_CPUARCH} == amd64 +.if ${MACHINE_CPUARCH} == aarch64 || ${MACHINE_CPUARCH} == amd64 CFLAGS+= -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer .endif |