summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Lynch <nathan_lynch@mentor.com>2017-04-25 17:33:55 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-05-11 16:59:18 +0100
commit79189ea3b27898ec7d40ea9c88371743f79793c4 (patch)
tree9cd3918283868570df053738454b6452d30878d9
parent95ee4896608074232cbc8126d4ee0208c2fe6afa (diff)
downloadpoky-79189ea3b27898ec7d40ea9c88371743f79793c4.tar.gz
lttng-modules: work around GCC 7 changes
Avoid using LTTng's BUILD_RUNTIME_BUG_ON macro, as it appears to run into a similar problem as Linux experienced with __builtin_constant_p and dead code elimination. (From OE-Core rev: 22af48a50d40d6872adaa4f6b0bf144ef5781c1c) Signed-off-by: Nathan Lynch <nathan_lynch@mentor.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/BUILD_RUNTIME_BUG_ON-vs-gcc7.patch43
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules_2.9.1.bb3
2 files changed, 45 insertions, 1 deletions
diff --git a/meta/recipes-kernel/lttng/lttng-modules/BUILD_RUNTIME_BUG_ON-vs-gcc7.patch b/meta/recipes-kernel/lttng/lttng-modules/BUILD_RUNTIME_BUG_ON-vs-gcc7.patch
new file mode 100644
index 0000000000..76063607a8
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-modules/BUILD_RUNTIME_BUG_ON-vs-gcc7.patch
@@ -0,0 +1,43 @@
1From ab07574ef90fa510f293c37897d577066a88fe0d Mon Sep 17 00:00:00 2001
2From: Nathan Lynch <nathan_lynch@mentor.com>
3Date: Tue, 25 Apr 2017 16:26:57 -0500
4Subject: [PATCH] BUILD_RUNTIME_BUG_ON vs gcc7
5
6Avoid using LTTng's BUILD_RUNTIME_BUG_ON macro, as it appears to run
7into a similar problem as Linux experienced with ilog2.
8
9See:
10https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=474c90156c8dcc2fa815e6716cc9394d7930cb9c
11https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785
12
13Upstream-Status: Pending
14Signed-off-by: Nathan Lynch <nathan_lynch@mentor.com>
15---
16 lib/align.h | 4 ++--
17 1 file changed, 2 insertions(+), 2 deletions(-)
18
19diff --git a/lib/align.h b/lib/align.h
20index 5b91ae87410b..5e134cd485fe 100644
21--- a/lib/align.h
22+++ b/lib/align.h
23@@ -48,7 +48,7 @@
24 */
25 #define offset_align(align_drift, alignment) \
26 ({ \
27- BUILD_RUNTIME_BUG_ON((alignment) == 0 \
28+ BUG_ON((alignment) == 0 \
29 || ((alignment) & ((alignment) - 1))); \
30 (((alignment) - (align_drift)) & ((alignment) - 1)); \
31 })
32@@ -63,7 +63,7 @@
33 */
34 #define offset_align_floor(align_drift, alignment) \
35 ({ \
36- BUILD_RUNTIME_BUG_ON((alignment) == 0 \
37+ BUG_ON((alignment) == 0 \
38 || ((alignment) & ((alignment) - 1))); \
39 (((align_drift) - (alignment)) & ((alignment) - 1)); \
40 })
41--
422.9.3
43
diff --git a/meta/recipes-kernel/lttng/lttng-modules_2.9.1.bb b/meta/recipes-kernel/lttng/lttng-modules_2.9.1.bb
index abff79d06f..b48f9cff9a 100644
--- a/meta/recipes-kernel/lttng/lttng-modules_2.9.1.bb
+++ b/meta/recipes-kernel/lttng/lttng-modules_2.9.1.bb
@@ -11,7 +11,8 @@ inherit module
11COMPATIBLE_HOST = '(x86_64|i.86|powerpc|aarch64|mips|nios2|arm).*-linux' 11COMPATIBLE_HOST = '(x86_64|i.86|powerpc|aarch64|mips|nios2|arm).*-linux'
12 12
13SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \ 13SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \
14 file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch" 14 file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \
15 file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch"
15 16
16SRC_URI[md5sum] = "5a16bca52233cc2bdff572b1120a88f6" 17SRC_URI[md5sum] = "5a16bca52233cc2bdff572b1120a88f6"
17SRC_URI[sha256sum] = "62078fe3254ca65969db4b72e59042cd797dbf2740848f8f82384877ae460d54" 18SRC_URI[sha256sum] = "62078fe3254ca65969db4b72e59042cd797dbf2740848f8f82384877ae460d54"