From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 22C64A0559; Mon, 16 Mar 2020 15:27:53 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 952FA1BE51; Mon, 16 Mar 2020 15:27:52 +0100 (CET) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 263862BF9 for ; Mon, 16 Mar 2020 15:27:51 +0100 (CET) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 619ED5C02CF; Mon, 16 Mar 2020 10:27:50 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Mon, 16 Mar 2020 10:27:50 -0400 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:content-type; s=mesmtp; bh=2O/Am6sl19qhcWlpO1sub76j7mBs8JMFAr0ckh+bo+c=; b=JUXvy/gk0960 Lft5sOgOpm4Tme4Tt3Fqf2kgK6/3KYeilcMbJ0IUX/bEcvInzfXNm0pjulgUJV6U PWf/s1uTB1ztCwXZQUAzWVihDgJfHBBhwRYLTYz6egL16z8GQHiLSMTuG5q6h3nZ 2+OxhU7M2jwSJTFwE/bjRCU9sPY8YhY= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :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=fm2; bh=2O/Am6sl19qhcWlpO1sub76j7mBs8JMFAr0ckh+bo +c=; b=lBRzqzM7srf554GFRL7iPNdtFkutUD1inaQdjEbsper3Y9RWg5bJrlwnD q/Hu0ENRZ0HY0lmUfZeADM2mJwrRKfkHNWl0Ti228JgtqBwWljmixpWqMSwZ5Aej miHdEP9JAN65gYHTY2lP5w19uTlRtWAm7Lz0P8T7cXnMEgoSat/XVLbGPSua61SC 6ZCF3CM0tJJ7Q6vZ1Fu9szGZ/ig8b0AeRlm8OlzFTFL+kwJHA8pWMB6S9KdpZnDg mTmK+6A3WNzDznY5q37N85EmcglAif1rnnSLf06n8iMzOAi52QZ1mh959CEG+ja+ mKJh3E9G5DUShNxeJHYKD5LFfbELw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrudeffedgieegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecuff homhgrihhnpeguphgukhdrohhrghenucfkphepjeejrddufeegrddvtdefrddukeegnecu vehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrg hssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 9685430618B7; Mon, 16 Mar 2020 10:27:49 -0400 (EDT) From: Thomas Monjalon To: Dmitry Kozlyuk Cc: dev@dpdk.org, Olivier Matz Date: Mon, 16 Mar 2020 15:27:48 +0100 Message-ID: <3322628.eFTFzoEnKi@xps> In-Reply-To: <20200314023826.699ab6c0@Sovereign> References: <20200218000229.86621-1-dmitry.kozliuk@gmail.com> <3094952.KgjxqYA5nG@xps> <20200314023826.699ab6c0@Sovereign> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v4 1/7] eal: introduce portable format attribute 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 14/03/2020 00:38, Dmitry Kozlyuk: > > I suggest this change (I can send a patch fixing the issue in other .h files): > > > > +/* > > + * RTE_TOOLCHAIN_GCC is true if the target is built with GCC, > > + * while a host application (like pmdinfogen) may have another compiler. > > + * RTE_CC_IS_GNU is true if the file is compiled with GCC, > > + * no matter it is a target or host application. > > + */ > > +#if defined __GNUC__ && !defined __clang__ && !defined __INTEL_COMPILER > > +#define RTE_CC_IS_GNU > > +#endif > > + > > +#ifdef RTE_CC_IS_GNU > > -/** Define GCC_VERSION **/ > > -#ifdef RTE_TOOLCHAIN_GCC > > #define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + \ > > __GNUC_PATCHLEVEL__) > > #endif > > @@ -96,7 +105,7 @@ typedef uint16_t unaligned_uint16_t; > > * even if the underlying stdio implementation is ANSI-compliant, > > * so this must be overridden. > > */ > > -#if defined(RTE_TOOLCHAIN_GCC) > > +#ifdef RTE_CC_IS_GNU > > #define __rte_format_printf(format_index, first_arg) \ > > __attribute__((format(gnu_printf, format_index, first_arg))) > > #else > > The code you propose LGTM itself. If you think it's a better solution than > the one proposed below, I see no problem going with it. > > What I wonder is whether pmdinfogen should include the problematic code in the > first place. The errors come from declarations in rte_debug.h, No the error comes from rte_common.h included by pmdinfogen.c Please review this patch: https://patches.dpdk.org/patch/66702/