[dpdk-stable] patch 'eal: fix build with -O1' has been queued to LTS release 16.11.9
Luca Boccassi
bluca at debian.org
Mon Nov 26 13:49:12 CET 2018
Hi,
FYI, your patch has been queued to LTS release 16.11.9
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/28/18. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.
Thanks.
Luca Boccassi
---
>From 2be17bba620f8d20f63f9dab2a116640a1eebc0f Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas at monjalon.net>
Date: Fri, 16 Nov 2018 17:58:50 +0100
Subject: [PATCH] eal: fix build with -O1
[ upstream commit e357e8ebd99c9c394a276fdffd37f13005cb1c63 ]
In case of optimized compilation, RTE_BUILD_BUG_ON use an external
variable which is neither defined, nor used.
It seems not optimized out in case of OPDL compiled with clang -O1:
opdl_ring.c: undefined reference to `RTE_BUILD_BUG_ON_detected_error'
clang-6.0: fatal error: linker command failed with exit code 1
Fixes: af75078fece3 ("first public release")
Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
---
lib/librte_eal/common/include/rte_common.h | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/lib/librte_eal/common/include/rte_common.h b/lib/librte_eal/common/include/rte_common.h
index 9ae584717..f17926f3d 100644
--- a/lib/librte_eal/common/include/rte_common.h
+++ b/lib/librte_eal/common/include/rte_common.h
@@ -200,16 +200,7 @@ rte_is_aligned(void *ptr, unsigned align)
/**
* Triggers an error at compilation time if the condition is true.
*/
-#ifndef __OPTIMIZE__
#define RTE_BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)]))
-#else
-extern int RTE_BUILD_BUG_ON_detected_error;
-#define RTE_BUILD_BUG_ON(condition) do { \
- ((void)sizeof(char[1 - 2*!!(condition)])); \
- if (condition) \
- RTE_BUILD_BUG_ON_detected_error = 1; \
-} while(0)
-#endif
/*********** Macros to work with powers of 2 ********/
--
2.19.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2018-11-26 12:45:13.629585357 +0000
+++ 0001-eal-fix-build-with-O1.patch 2018-11-26 12:45:13.603202331 +0000
@@ -1,8 +1,10 @@
-From e357e8ebd99c9c394a276fdffd37f13005cb1c63 Mon Sep 17 00:00:00 2001
+From 2be17bba620f8d20f63f9dab2a116640a1eebc0f Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas at monjalon.net>
Date: Fri, 16 Nov 2018 17:58:50 +0100
Subject: [PATCH] eal: fix build with -O1
+[ upstream commit e357e8ebd99c9c394a276fdffd37f13005cb1c63 ]
+
In case of optimized compilation, RTE_BUILD_BUG_ON use an external
variable which is neither defined, nor used.
It seems not optimized out in case of OPDL compiled with clang -O1:
@@ -10,7 +12,6 @@
clang-6.0: fatal error: linker command failed with exit code 1
Fixes: af75078fece3 ("first public release")
-Cc: stable at dpdk.org
Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
---
@@ -18,10 +19,10 @@
1 file changed, 9 deletions(-)
diff --git a/lib/librte_eal/common/include/rte_common.h b/lib/librte_eal/common/include/rte_common.h
-index d115b175c..66cdf60b2 100644
+index 9ae584717..f17926f3d 100644
--- a/lib/librte_eal/common/include/rte_common.h
+++ b/lib/librte_eal/common/include/rte_common.h
-@@ -270,16 +270,7 @@ rte_is_aligned(void *ptr, unsigned align)
+@@ -200,16 +200,7 @@ rte_is_aligned(void *ptr, unsigned align)
/**
* Triggers an error at compilation time if the condition is true.
*/
@@ -36,8 +37,8 @@
-} while(0)
-#endif
- /**
- * Combines 32b inputs most significant set bits into the least
+ /*********** Macros to work with powers of 2 ********/
+
--
2.19.2
More information about the stable
mailing list