From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id D82904CB3; Fri, 16 Nov 2018 17:59:06 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 5AE2D21D63; Fri, 16 Nov 2018 11:59:06 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Fri, 16 Nov 2018 11:59:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=mesmtp; bh=m5hcfuoiG7 JnTDNuK2vzx8gdJmBgjPQQUYP2zeotaaw=; b=cHCCX/4FQdOdzwmbPCNc5w77SD FfHMapwZGLce9DVDmg/Is5Sn+AMomUJIrtuUXqkU4RtuR86UhfOt64cwzH0KWe+E z0jGQ05Q1N+L8fqshoZWpQAzDRU5wSAf1NcUZpDg0e9fmiOxuuFqnq5bgDDbVPhN cOSs5zGx1fHBgDwec= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=m5hcfuoiG7JnTDNuK2vzx8gdJmBgjPQQUYP2zeotaaw=; b=rDPi12JC DUI2F70CHKCTN1y7QZnWihhWsR7/HHTDU2Y26cyOSef55nD0mg41vWADsmMPgtsp EwNN9lDCMKlzXz2rXWNDB/MWz2O19BZHcCQzsKhBB1kZjEBzrCrz6WVrfKXpCvkq VEz8urh7V7lM5ZjN5Gvu4dblQsNeM+BG8f7imrWmyopAaXxXF/oNmhmGfpttdT1u 7YP1UrKaRJUsR3hs5BrgI3+fGYyniVnaaAQo7jeJSxoUznAvSrh7YxYUl9P0JGIK mBdns6FftT3VtUAtLlxYBGaGz+0KvxB+uqQPs9agi4qUUmgvxX8BC995E0q+6iTW Wx5bAB9Krvw5LQ== X-ME-Sender: X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 9D024102E0; Fri, 16 Nov 2018 11:59:05 -0500 (EST) From: Thomas Monjalon To: dev@dpdk.org Cc: stable@dpdk.org Date: Fri, 16 Nov 2018 17:58:50 +0100 Message-Id: <20181116165854.24017-2-thomas@monjalon.net> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181116165854.24017-1-thomas@monjalon.net> References: <20181116165854.24017-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 1/5] eal: fix build with -O1 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2018 16:59:07 -0000 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") Cc: stable@dpdk.org 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 87f0f6302..57acb8485 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) /** * 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 /** * Combines 32b inputs most significant set bits into the least -- 2.19.0