From nobody Thu Jan 12 15:06:49 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nt7Dp0vPvz2r5Qd; Thu, 12 Jan 2023 15:06:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nt7Dp03kNz3Pcy; Thu, 12 Jan 2023 15:06:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673536010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5/3th4Zi2GdIy4G4fCezRv5C3t9u0iW+xh8GR9zyR5U=; b=HjA6+cxTMJWMEgxcP46GHUoFrdOq6lN2txsDJcaQG7b2vH7Aa/n5Ih5Sx9C9uABS1I4F3Z RVGwmk27unBEgrO5+gwgiPDRdMUaDBaLEvwXlwUexItSgCoc4Qs73zdAIOY/+vZTQpi6IE Ei8Atq7Gn2opOevJgMwz5aSSzKGw9zjM94GvKjbm/9PVKRMHPhQaHShEhj5vwlKhTId1Ga Tfg+gAqtZL3QPUjEyk9aL4YJNJrtjcQZf4yTA5qGcwtrexlDqHPcs20Z3fZ8jukI8V+SLJ jKAXFLkPSEGE16yP2hdI0Xb/9mX+n3/tzYhL8m3wCkhzXScT7U5AZsSrRh+i9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673536010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5/3th4Zi2GdIy4G4fCezRv5C3t9u0iW+xh8GR9zyR5U=; b=tnLELeNXfOwkaL1iwsRZhSWRc9EGkCChJ3I3zDrN9rv/JWVmmocxJlZF7het16P5Uhygzp WeJKBl3L+gWoNlTGEk2HvRw/vs1J1he/fAXgrvCjiOuZ0bQP+IJvXO8W4LBmfZvtsp41Jj XGXeCJQgGGV0Z1AtYZj26MykfExVSWq9zOcrNZkccF+F+lliOiXkLi9t/pNa3e1x05ngW1 60z3+ssCeRAgL5NRhZdLQUpAalvSSD8h48BD+UCeGbEZbV1Inf8WfjXz4ehumVIEtZ69Pj dwBbhoBhsU0t2sr0g5xyBDD0TO1MLqXBTRXwP9dcetghoo7paU+LZ+XS9/A2gw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673536010; a=rsa-sha256; cv=none; b=TfCi+sKLsz9jzqtILB7HpAEoEqvu/ESdmrFhkC/a9dbSGoIHa6u/V4DHKXxiFEossdOMWU K70n7tD9+dND4vMwq1JD7eybVTpEfrf21hzppr+PHGosPbDhpWGR5oNZmPEXhL7nmtlhSM YyAryuqpgVT2Q2HWSl7+TL1pPzvW24Li9dO2YK4CO/taDxxU5QCgLTPJEgyqIp5T6FALGL IhbjrkypU2dxUeVOSEMo/Fh9EFO3+xtXBubsaqfBcKxXRdvuNDfLpkjrlbjx9FAPkKeH3/ WhQ0hGSy9R/DLx7EhkcGlE1tcidbu8lR/ysRgIeQNWTgXFDbG4OgvGNA61cuAw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Nt7Dn62DpzX4j; Thu, 12 Jan 2023 15:06:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30CF6nf2036451; Thu, 12 Jan 2023 15:06:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30CF6npO036450; Thu, 12 Jan 2023 15:06:49 GMT (envelope-from git) Date: Thu, 12 Jan 2023 15:06:49 GMT Message-Id: <202301121506.30CF6npO036450@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: b926b6db37f3 - main - riscv: always include frame pointer List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b926b6db37f3195e83f9fd2751b7e0c6dcf8aaef Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=b926b6db37f3195e83f9fd2751b7e0c6dcf8aaef commit b926b6db37f3195e83f9fd2751b7e0c6dcf8aaef Author: Mitchell Horne AuthorDate: 2023-01-11 18:04:45 +0000 Commit: Mitchell Horne CommitDate: 2023-01-12 15:04:24 +0000 riscv: always include frame pointer Specifically it is missing in kernel modules, meaning a proper backtrace can't be constructed. Reviewed by: jhb MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D37657 --- sys/conf/Makefile.riscv | 2 +- sys/conf/kmod.mk | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/conf/Makefile.riscv b/sys/conf/Makefile.riscv index d4b1e6934ae8..35b2ca10a717 100644 --- a/sys/conf/Makefile.riscv +++ b/sys/conf/Makefile.riscv @@ -37,7 +37,7 @@ INCLUDES+= -I$S/contrib/libfdt -I$S/contrib/device-tree/include KERNEL_LMA?= 0x80200000 LDFLAGS+= --defsym='kernel_lma=${KERNEL_LMA}' -.if !empty(DDB_ENABLED) +.if !empty(DDB_ENABLED) || !empty(DTRACE_ENABLED) || !empty(HWPMC_ENABLED) CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls .endif diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index 89da3d4fc82e..9c681bad3c80 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -160,7 +160,8 @@ LDFLAGS+= --build-id=sha1 .endif CFLAGS+= ${DEBUG_FLAGS} -.if ${MACHINE_CPUARCH} == aarch64 || ${MACHINE_CPUARCH} == amd64 +.if ${MACHINE_CPUARCH} == aarch64 || ${MACHINE_CPUARCH} == amd64 || \ + ${MACHINE_CPUARCH} == riscv CFLAGS+= -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer .endif