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 53307A04FA; Wed, 5 Feb 2020 18:07:40 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 35CAC1C2F4; Wed, 5 Feb 2020 18:07:40 +0100 (CET) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 09FCE1C2F4 for ; Wed, 5 Feb 2020 18:07:39 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 568E321B42; Wed, 5 Feb 2020 12:07:38 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 05 Feb 2020 12:07:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=mesmtp; bh=uj2cza2ZL0GN78tU7yU4mV7 RBe/KzMKWDSQkyVlIaR4=; b=NsykCxNxOUyWkhj3JEOqD+KHzXMFj0DwgWvltEG 6bT30Hamlzdf1nJ3waOFyRrmxv7qcLGReACbm+xGa/lWByRz8fsC2Uck+pnM8JZZ WJDcrw08031XIrzzgMo/ZOz1at3VQCOZWFdh6uVHBiXrCtT4XBj6k9P+azcx6cnU djzM= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=uj2cza2ZL0GN78tU7 yU4mV7RBe/KzMKWDSQkyVlIaR4=; b=EIh0Qao+zWAIZWH3UuZlg6Tr3IG/bmb7/ mB0L2mFmYOQrgLLrbe44mlew497qrxwpIr8FY2SUAEBqxHh55hsPm4b8S8cYMvk4 elWWx+SdzRMR0eRmZtp5XCLeomlziukl5tEjuoMK3tq6OLlzUrGIh6/MEQZ2qH88 G5t+FEPuEW3hYPNLgCi+Hw/HJnc7e33Da7FNWJNsFnFfbXLRG2J4AtQOl2JKf6mJ m7lr6bkLSPk4ljQlMoWGM561BDsIH5jfPNYFxt/ohiS0bLXe5lymn5TWKdmNR1AS VoyOL2ScYlQKVQtHGVprfYQNnSBEkFHbfsErE1TYRVnCcd6nN3/PA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrhedugdelfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffoggfgsedtkeertdertd dtnecuhfhrohhmpefvhhhomhgrshcuofhonhhjrghlohhnuceothhhohhmrghssehmohhn jhgrlhhonhdrnhgvtheqnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhush htvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhho nhhjrghlohhnrdhnvght 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 AC3CE30600DC; Wed, 5 Feb 2020 12:07:37 -0500 (EST) From: Thomas Monjalon To: dev@dpdk.org Cc: bruce.richardson@intel.com Date: Wed, 5 Feb 2020 18:07:23 +0100 Message-Id: <20200205170723.3347232-1-thomas@monjalon.net> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] buildtools: allow pedantic empty pmdinfo 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" If a driver has no info generated by pmdinfogen, and if this driver is compiled as pedantic, then an failure would occur: drivers/rte_common_mlx5.pmd.c:1: error: ISO C forbids an empty translation unit [-Werror=pedantic] Such error is triggered with the new mlx5 common directory. In order to allow an "empty driver info" compiled in pedantic mode, the script generating .pmd.c file is modified to add a static string unconditionnaly. The minimal generated code is: static __attribute__((unused)) const char *generator = "/path/to/dpdk/buildtools/gen-pmdinfo-cfile.sh"; Signed-off-by: Thomas Monjalon --- buildtools/gen-pmdinfo-cfile.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/buildtools/gen-pmdinfo-cfile.sh b/buildtools/gen-pmdinfo-cfile.sh index 0b6dc2ce4f..43059cf364 100755 --- a/buildtools/gen-pmdinfo-cfile.sh +++ b/buildtools/gen-pmdinfo-cfile.sh @@ -6,7 +6,8 @@ arfile=$1 output=$2 pmdinfogen=$3 -echo > $output +# The generated file must not be empty if compiled in pedantic mode +echo 'static __attribute__((unused)) const char *generator = "'$0'";' > $output for ofile in `ar t $arfile` ; do ar p $arfile $ofile | $pmdinfogen - - >> $output 2> /dev/null done -- 2.25.0