From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 4A0FB1B518 for ; Fri, 30 Nov 2018 00:16:01 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from yskoh@mellanox.com) with ESMTPS (AES256-SHA encrypted); 30 Nov 2018 01:21:54 +0200 Received: from scfae-sc-2.mti.labs.mlnx (scfae-sc-2.mti.labs.mlnx [10.101.0.96]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id wATNCW92032075; Fri, 30 Nov 2018 01:15:59 +0200 From: Yongseok Koh To: Thomas Monjalon Cc: dpdk stable Date: Thu, 29 Nov 2018 15:11:56 -0800 Message-Id: <20181129231202.30436-122-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181129231202.30436-1-yskoh@mellanox.com> References: <20181129231202.30436-1-yskoh@mellanox.com> Subject: [dpdk-stable] patch 'eal: fix build with -O1' has been queued to LTS release 17.11.5 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Nov 2018 23:16:01 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.5 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/01/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. Yongseok --- >>From 4d81c106393da4a865435733db753f8a4ae97f98 Mon Sep 17 00:00:00 2001 From: Thomas Monjalon 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 --- 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 63bf6b612..f24cbe6e2 100644 --- a/lib/librte_eal/common/include/rte_common.h +++ b/lib/librte_eal/common/include/rte_common.h @@ -241,16 +241,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.11.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-29 15:01:50.531743574 -0800 +++ 0122-eal-fix-build-with-O1.patch 2018-11-29 15:01:45.319959000 -0800 @@ -1,8 +1,10 @@ -From e357e8ebd99c9c394a276fdffd37f13005cb1c63 Mon Sep 17 00:00:00 2001 +From 4d81c106393da4a865435733db753f8a4ae97f98 Mon Sep 17 00:00:00 2001 From: Thomas Monjalon 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@dpdk.org Signed-off-by: Thomas Monjalon --- @@ -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 63bf6b612..f24cbe6e2 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) +@@ -241,16 +241,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.11.0