From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) by dpdk.org (Postfix) with ESMTP id DE089262E for ; Mon, 26 Nov 2018 13:49:22 +0100 (CET) Received: by mail-wm1-f52.google.com with SMTP id z18so3422221wmc.4 for ; Mon, 26 Nov 2018 04:49:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kDm21SNFL8GV98d9YZuqkNJRzJEmHCIMMDlmqZ3LPJI=; b=OfROYTEYlsZnA9k6KmUH6HJB40DxMltr0HGw3RqGWeg27sE9FDy4V3uoMrxkvKI0uF yd9VU1cuKKUR+twmSsRGrgvIqE7u4oCWUsimNX4laf3PbTdG7g2uyWNF6DRTs1uGtht8 yKACTu1uRGjvy8t2+YjbKWdiCsqjz752hrSMHtdCZ4yDKQFtVpLGRrFlGIPv/Zi4g0oj ltxBUbSmTXIaeQMfUkbvS2eYUjQvN/JdrTuB0gtnFl6RXFXCXacdFBYwj6iju+0MsaLF bSyGyjRYZQpF/+cGdrwSD8ga4On9hM5gkHiMnXxPP18QgtI3qAF0waWjZROQMawicbpa hhwA== X-Gm-Message-State: AGRZ1gJ9EiFhxqeF3A17Q3leQnM0p+0bYoCTBLVXN5vhnZ7bGL1lcgOp RTOJZ0YdzteQ5SStiqqVz+FspFx/ X-Google-Smtp-Source: AFSGD/VRz6o/3SQYvSNJ4saZ1ZxeZTNAEt7nVXHf0VtubArXNZuLYLbuWGVQUiSAk+nHF/uqzHZftg== X-Received: by 2002:a7b:c443:: with SMTP id l3mr24602182wmi.74.1543236562353; Mon, 26 Nov 2018 04:49:22 -0800 (PST) Received: from localhost ([2a01:4b00:f419:6f00:8361:8946:ba2b:d556]) by smtp.gmail.com with ESMTPSA id j199sm1323248wmf.13.2018.11.26.04.49.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 26 Nov 2018 04:49:21 -0800 (PST) From: Luca Boccassi To: Thomas Monjalon Cc: dpdk stable Date: Mon, 26 Nov 2018 12:49:12 +0000 Message-Id: <20181126124916.16240-1-bluca@debian.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181119122538.14207-1-bluca@debian.org> References: <20181119122538.14207-1-bluca@debian.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'eal: fix build with -O1' has been queued to LTS release 16.11.9 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: Mon, 26 Nov 2018 12:49:23 -0000 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 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 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 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 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