]> git.proxmox.com Git - zfsonlinux.git/blame - zfs-patches/0007-Make-fno-inline-compile-option-more-accessible.patch
update ZFS submodule to debian/0.7.9-2
[zfsonlinux.git] / zfs-patches / 0007-Make-fno-inline-compile-option-more-accessible.patch
CommitLineData
75b07eca
FG
1From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2From: Prakash Surya <prakash.surya@delphix.com>
3Date: Fri, 15 Sep 2017 11:47:11 -0700
4Subject: [PATCH] Make "-fno-inline" compile option more accessible
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9When functions are inlined, it can make the system much more difficult
10to instrument using tools such as ftrace, BPF, crash, etc. Thus, to aid
11development and increase the system's observability, when the
12"--enable-debuginfo" flag is specified, the "-fno-inline" compilation
13option will be used for both userspace and kernel modules.
14
15Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
16Signed-off-by: Prakash Surya <prakash.surya@delphix.com>
17Closes #6605
18(cherry picked from commit f1236ebf35d1531db75ac8a57b23e8fe48d6b780)
19Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
20---
21 config/zfs-build.m4 | 3 ++-
22 1 file changed, 2 insertions(+), 1 deletion(-)
23
24diff --git a/config/zfs-build.m4 b/config/zfs-build.m4
25index b84658a64..c695a882e 100644
26--- a/config/zfs-build.m4
27+++ b/config/zfs-build.m4
28@@ -45,10 +45,11 @@ AC_DEFUN([ZFS_AC_DEBUG], [
29
30 AC_DEFUN([ZFS_AC_DEBUGINFO_KERNEL], [
31 KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS CONFIG_DEBUG_INFO=y"
32+ KERNELCPPFLAGS="${KERNELCPPFLAGS} -fno-inline"
33 ])
34
35 AC_DEFUN([ZFS_AC_DEBUGINFO_USER], [
36- DEBUG_CFLAGS="$DEBUG_CFLAGS -g"
37+ DEBUG_CFLAGS="${DEBUG_CFLAGS} -g -fno-inline"
38 ])
39
40 AC_DEFUN([ZFS_AC_DEBUGINFO], [
41--
422.14.2
43