]> git.proxmox.com Git - zfsonlinux.git/blob - zfs-patches/0007-Make-fno-inline-compile-option-more-accessible.patch
revert potentially buggy zap_add change
[zfsonlinux.git] / zfs-patches / 0007-Make-fno-inline-compile-option-more-accessible.patch
1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Prakash Surya <prakash.surya@delphix.com>
3 Date: Fri, 15 Sep 2017 11:47:11 -0700
4 Subject: [PATCH] Make "-fno-inline" compile option more accessible
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 When functions are inlined, it can make the system much more difficult
10 to instrument using tools such as ftrace, BPF, crash, etc. Thus, to aid
11 development and increase the system's observability, when the
12 "--enable-debuginfo" flag is specified, the "-fno-inline" compilation
13 option will be used for both userspace and kernel modules.
14
15 Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
16 Signed-off-by: Prakash Surya <prakash.surya@delphix.com>
17 Closes #6605
18 (cherry picked from commit f1236ebf35d1531db75ac8a57b23e8fe48d6b780)
19 Signed-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
24 diff --git a/config/zfs-build.m4 b/config/zfs-build.m4
25 index 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 --
42 2.14.2
43