[oe-commits] [openembedded-core] 40/50: lttng-modules: work around GCC 7 changes

git at git.openembedded.org git at git.openembedded.org
Fri Apr 28 08:23:58 UTC 2017


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 30404fedcdb0e6e8b9fea7fe77908333603d9a12
Author: Nathan Lynch <nathan_lynch at mentor.com>
AuthorDate: Tue Apr 25 17:33:55 2017 -0500

    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.
    
    Signed-off-by: Nathan Lynch <nathan_lynch at mentor.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 .../BUILD_RUNTIME_BUG_ON-vs-gcc7.patch             | 43 ++++++++++++++++++++++
 meta/recipes-kernel/lttng/lttng-modules_2.9.1.bb   |  3 +-
 2 files changed, 45 insertions(+), 1 deletion(-)

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 0000000..7606360
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-modules/BUILD_RUNTIME_BUG_ON-vs-gcc7.patch
@@ -0,0 +1,43 @@
+From ab07574ef90fa510f293c37897d577066a88fe0d Mon Sep 17 00:00:00 2001
+From: Nathan Lynch <nathan_lynch at mentor.com>
+Date: Tue, 25 Apr 2017 16:26:57 -0500
+Subject: [PATCH] BUILD_RUNTIME_BUG_ON vs gcc7
+
+Avoid using LTTng's BUILD_RUNTIME_BUG_ON macro, as it appears to run
+into a similar problem as Linux experienced with ilog2.
+
+See:
+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=474c90156c8dcc2fa815e6716cc9394d7930cb9c
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785
+
+Upstream-Status: Pending
+Signed-off-by: Nathan Lynch <nathan_lynch at mentor.com>
+---
+ lib/align.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/align.h b/lib/align.h
+index 5b91ae87410b..5e134cd485fe 100644
+--- a/lib/align.h
++++ b/lib/align.h
+@@ -48,7 +48,7 @@
+  */
+ #define offset_align(align_drift, alignment)				       \
+ 	({								       \
+-		BUILD_RUNTIME_BUG_ON((alignment) == 0			       \
++		BUG_ON((alignment) == 0					       \
+ 				   || ((alignment) & ((alignment) - 1)));      \
+ 		(((alignment) - (align_drift)) & ((alignment) - 1));	       \
+ 	})
+@@ -63,7 +63,7 @@
+  */
+ #define offset_align_floor(align_drift, alignment)			       \
+ 	({								       \
+-		BUILD_RUNTIME_BUG_ON((alignment) == 0			       \
++		BUG_ON((alignment) == 0					       \
+ 				   || ((alignment) & ((alignment) - 1)));      \
+ 		(((align_drift) - (alignment)) & ((alignment) - 1));	       \
+ 	})
+-- 
+2.9.3
+
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 abff79d..b48f9cf 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
 COMPATIBLE_HOST = '(x86_64|i.86|powerpc|aarch64|mips|nios2|arm).*-linux'
 
 SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \
-           file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch"
+           file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \
+           file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch"
 
 SRC_URI[md5sum] = "5a16bca52233cc2bdff572b1120a88f6"
 SRC_URI[sha256sum] = "62078fe3254ca65969db4b72e59042cd797dbf2740848f8f82384877ae460d54"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list