From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) by dpdk.org (Postfix) with ESMTP id 1F9AC235 for ; Fri, 30 Jun 2017 19:19:24 +0200 (CEST) Received: by mail-wm0-f47.google.com with SMTP id b184so52578150wme.1 for ; Fri, 30 Jun 2017 10:19:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=ueiaX16FIxneYdheM9HK85ScMyMfPHMkAbTW1B14bSk=; b=fHfL9FTW1Zap7jSGvLekRsLWGkKMB6Kbl2HNyTSjR4HyXNJFGeT8bsa/vEf+Jt2YQ3 utzR24+Pyp3L9GmvYNdvceJFuw3sF0BY5GAAD2xlBXWiLsmKAKTA/beA4bjTni4PJQ15 2iXnry+M8oXszO80/2cgfGCmGxQfMu9kcTaXW7liIYUuHetCQVwDXXr+Q2+U95xvTSoW C7ufXUURyarHMiuY3W2tdO/rblnWfvfLOuIRWkAlr6y0THQFWLOfNBfwqpbnOFWoOQfX Aov0VOhYYziVddGaHpzgm0NLFU2nzGiens6Kd+TNLZ651xxD+fXmIJUKVbs1kaMmsr6u QKaA== 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; bh=ueiaX16FIxneYdheM9HK85ScMyMfPHMkAbTW1B14bSk=; b=rcQzHqiqkeMo1qrnIQDrWzMPa7rHJhsgm1LuFKcgXT04kChNDQSy82q7fTHwcz7LEz TuxPFUNqFwGcarhIfIj+7gU0cGTveqEDKEEsJbd3nSR0MHlUAg30cDZQdpRDOovqznHR /afwTOxQJ7ekP7gU6pGy0VVZAXdMZohDE6Z0JuNcjXt1Ng93Pl9ufwvi5JluKM6K1mRC opgF54SowVPtTLj5BgbtDFz4sHYMItJR0AjZ6iygGxN8fRQgiFGkLr4tYP72Ua3Z5EqX wjdS690c85dK/guZxJqK9HT/J8ZWsrH4JK/xpGXNvNIoI+lvtjM4fWW3xx5TiE+Dw2MT A68g== X-Gm-Message-State: AKS2vOzmQg4/E45V5ICKMgr8r8qs6nriDGj3Z+hEfRGO6pSJslK5O7Hd t1KKu5iPbE8JCTJU X-Received: by 10.28.236.83 with SMTP id k80mr6951782wmh.52.1498843163833; Fri, 30 Jun 2017 10:19:23 -0700 (PDT) Received: from 6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id l12sm10100333wrc.46.2017.06.30.10.19.22 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 30 Jun 2017 10:19:23 -0700 (PDT) From: Adrien Mazarguil To: Ferruh Yigit Cc: Nelio Laranjeiro , dev@dpdk.org Date: Fri, 30 Jun 2017 19:19:08 +0200 Message-Id: <4bc47a8c50dc528f8061d95cdd0c0934e4e40b38.1498843072.git.adrien.mazarguil@6wind.com> X-Mailer: git-send-email 2.1.4 Subject: [dpdk-dev] [PATCH] net/mlx: update C compliance standard 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, 30 Jun 2017 17:19:24 -0000 This commit addresses a compilation issue against Glibc >= 2.25, which implements assert() through a nonstandard ({ }) construct. Such constructs can normally not be used without __extension__ keyword when -pedantic is enabled, as is the case when compiling mlx4 and mlx5 PMDs in debug mode. While assert.h checks for the compiler ability to support GNU extensions, Clang, unlike GCC, does not allow the above syntax when combining -std=gnu99 with -pedantic. Work around missing keyword by moving these PMDs to a stricter compliance standard without GNU extensions but properly checked by Glibc. Doing so is supported on the DPDK side since includes have been cleaned up. Signed-off-by: Adrien Mazarguil --- drivers/net/mlx4/Makefile | 2 +- drivers/net/mlx5/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx4/Makefile b/drivers/net/mlx4/Makefile index e873fb4..755c8a4 100644 --- a/drivers/net/mlx4/Makefile +++ b/drivers/net/mlx4/Makefile @@ -40,7 +40,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += mlx4_flow.c # Basic CFLAGS. CFLAGS += -O3 -CFLAGS += -std=gnu99 -Wall -Wextra +CFLAGS += -std=c11 -Wall -Wextra CFLAGS += -g CFLAGS += -I. CFLAGS += -D_BSD_SOURCE diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile index daf8013..8b8f6ea 100644 --- a/drivers/net/mlx5/Makefile +++ b/drivers/net/mlx5/Makefile @@ -52,7 +52,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += mlx5_flow.c # Basic CFLAGS. CFLAGS += -O3 -CFLAGS += -std=gnu99 -Wall -Wextra +CFLAGS += -std=c11 -Wall -Wextra CFLAGS += -g CFLAGS += -I. CFLAGS += -D_BSD_SOURCE -- 2.1.4