From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 87C30A034F for ; Thu, 25 Feb 2021 19:23:32 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DC818160840; Thu, 25 Feb 2021 19:23:31 +0100 (CET) Received: from new4-smtp.messagingengine.com (new4-smtp.messagingengine.com [66.111.4.230]) by mails.dpdk.org (Postfix) with ESMTP id 5F8A040692; Thu, 25 Feb 2021 19:23:29 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailnew.nyi.internal (Postfix) with ESMTP id B6FB65803FB; Thu, 25 Feb 2021 13:23:28 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Thu, 25 Feb 2021 13:23:28 -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=fm3; bh=W3ALfs3j1TRCU 9ilCAGpjy7o5d4eKyZHmI5XGblAqKI=; b=jxTs9uyQ9kOedF6KIqityt8hXucqO EeeeTig40jK1rb9HiLBH2AMKPknBNRvHa4tGJmWFGGEO+VG5ra+Qsx2QLlKiRmV/ adbJ+T4Vft1lMwy6W+3ld/aJn6EXVR67/4ftpz+eve5xTgJ7pujHX3lTgDhyN3Ra QLQ6+Yp3fQ8JkUqDGqfclDwcYnaZI9Y4zxBSknxAW6qZD48JaAbCivbZld9WEJut SQRkLuwvsFKzLkHrETmpKipaKfLbrDKZrXDQHXYkhH2NrhS0WDIjxaqLjRj1uk1k gkJX8l/J66f85r7/QAt8VsGxvsUVUXTo07kSG46Co8ZpLDyswyXOT5xjg== 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= fm2; bh=W3ALfs3j1TRCU9ilCAGpjy7o5d4eKyZHmI5XGblAqKI=; b=l+uFrPMK nZ4NpTkx7+PvaGJfFpcPg1W5SCHeC9pTPZH2Je7drB//hCfAJ4kdtvJzVHxIbfs7 MCOtyWwgRrZVTjq19luDTSzz6QVR2MzgX+wbRWG4M4uogzkBxirBHy/MPwQLFyYC e/qgo8hMJUpyflhTa3tFDc11fiI/Gy5PyXUIB6/nirmkjsHbu1uTG7RF7TTqABeu Yyq8Pu/P1WdWOkONG9XJaVBdamQimEJ9iWmhwtuZDNgxwPU0eibXf/EE07V7iytH djPnJPPsi4cMwY4FJ0e28XlK7i0AdEdGPOsrMVGKMoUWAI9JctkwoiAzago3FDdS CUN4iUbsGX/zOg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrkeelgdduudegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepvdehgfeivdejgedtveehfefhteelfefgieevgfffveefjeegtdfg uedthedtgeevnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghruf hiiigvpedvnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl ohhnrdhnvght 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 CCAB424005C; Thu, 25 Feb 2021 13:23:26 -0500 (EST) From: Thomas Monjalon To: dev@dpdk.org Cc: ncopa@alpinelinux.org, stable@dpdk.org, Bruce Richardson , Hemant Agrawal , Sachin Saxena , Jakub Grajciar , Matan Azrad , Shahaf Shuler , Viacheslav Ovsiienko , Cristian Dumitrescu , John McNamara , Maxime Coquelin , Chenbo Xia , Anatoly Burakov , Konstantin Ananyev , Marcin Smoczynski Date: Thu, 25 Feb 2021 19:22:37 +0100 Message-Id: <20210225182250.1149592-5-thomas@monjalon.net> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210225182250.1149592-1-thomas@monjalon.net> References: <20190313170657.16688-1-ncopa@alpinelinux.org> <20210225182250.1149592-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH v5 04/17] build: define _GNU_SOURCE globally X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" There was an intent to define _GNU_SOURCE globally, but it was not set in pkg-config for external applications. The internal definition in config/meson.build is kept, and one is added in buildtools/pkg-config/meson.build for external apps. All other specific definitions of _GNU_SOURCE are removed. Fixes: 5d7b673d5fd6 ("mk: build with _GNU_SOURCE defined by default") Fixes: 28188cee2aa0 ("build: enable BSD features visibility for FreeBSD") Cc: stable@dpdk.org Signed-off-by: Thomas Monjalon --- app/test/meson.build | 2 -- buildtools/pkg-config/meson.build | 1 + drivers/bus/fslmc/qbman/include/compat.h | 3 --- drivers/common/dpaax/compat.h | 4 ---- drivers/common/dpaax/meson.build | 1 - drivers/net/memif/rte_eth_memif.h | 4 ---- drivers/net/mlx5/linux/mlx5_socket.c | 4 ---- examples/ip_pipeline/Makefile | 2 +- examples/performance-thread/l3fwd-thread/main.c | 4 ---- examples/performance-thread/pthread_shim/Makefile | 1 - examples/pipeline/Makefile | 2 +- examples/vhost_blk/vhost_blk.c | 4 ---- 12 files changed, 3 insertions(+), 29 deletions(-) diff --git a/app/test/meson.build b/app/test/meson.build index 099895fc87..76eaaea457 100644 --- a/app/test/meson.build +++ b/app/test/meson.build @@ -398,8 +398,6 @@ if cc.has_argument('-Wno-format-truncation') cflags += '-Wno-format-truncation' endif -# specify -D_GNU_SOURCE unconditionally -cflags += '-D_GNU_SOURCE' # Strict-aliasing rules are violated by uint8_t[] to context size casts. cflags += '-fno-strict-aliasing' diff --git a/buildtools/pkg-config/meson.build b/buildtools/pkg-config/meson.build index 39a8fd1c8e..d3f3edaa2f 100644 --- a/buildtools/pkg-config/meson.build +++ b/buildtools/pkg-config/meson.build @@ -3,6 +3,7 @@ pkg = import('pkgconfig') pkg_extra_cflags = ['-include', 'rte_config.h'] + machine_args +pkg_extra_cflags += '-D_GNU_SOURCE' if is_freebsd pkg_extra_cflags += ['-D__BSD_VISIBLE'] endif diff --git a/drivers/bus/fslmc/qbman/include/compat.h b/drivers/bus/fslmc/qbman/include/compat.h index 1ddd69e127..a4471a80af 100644 --- a/drivers/bus/fslmc/qbman/include/compat.h +++ b/drivers/bus/fslmc/qbman/include/compat.h @@ -8,9 +8,6 @@ #ifndef HEADER_COMPAT_H #define HEADER_COMPAT_H -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#endif #include #include #include diff --git a/drivers/common/dpaax/compat.h b/drivers/common/dpaax/compat.h index 1a5f36e99e..c69e76ab96 100644 --- a/drivers/common/dpaax/compat.h +++ b/drivers/common/dpaax/compat.h @@ -10,10 +10,6 @@ #define __COMPAT_H #include - -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#endif #include #include #include diff --git a/drivers/common/dpaax/meson.build b/drivers/common/dpaax/meson.build index 4535482701..b7f177a62e 100644 --- a/drivers/common/dpaax/meson.build +++ b/drivers/common/dpaax/meson.build @@ -10,7 +10,6 @@ sources = files('dpaax_iova_table.c', 'dpaa_of.c', 'caamflib.c') includes += include_directories('caamflib') -cflags += ['-D_GNU_SOURCE'] if cc.has_argument('-Wno-cast-qual') cflags += '-Wno-cast-qual' endif diff --git a/drivers/net/memif/rte_eth_memif.h b/drivers/net/memif/rte_eth_memif.h index 24321d3a39..2038bda742 100644 --- a/drivers/net/memif/rte_eth_memif.h +++ b/drivers/net/memif/rte_eth_memif.h @@ -5,10 +5,6 @@ #ifndef _RTE_ETH_MEMIF_H_ #define _RTE_ETH_MEMIF_H_ -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#endif /* GNU_SOURCE */ - #include #include diff --git a/drivers/net/mlx5/linux/mlx5_socket.c b/drivers/net/mlx5/linux/mlx5_socket.c index 1938453980..b1f41bc102 100644 --- a/drivers/net/mlx5/linux/mlx5_socket.c +++ b/drivers/net/mlx5/linux/mlx5_socket.c @@ -2,10 +2,6 @@ * Copyright 2019 Mellanox Technologies, Ltd */ -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#endif - #include #include #include diff --git a/examples/ip_pipeline/Makefile b/examples/ip_pipeline/Makefile index 96f492a5ea..7933ad7519 100644 --- a/examples/ip_pipeline/Makefile +++ b/examples/ip_pipeline/Makefile @@ -47,7 +47,7 @@ $(error "Cannot generate statically-linked binaries with this version of pkg-con endif endif -CFLAGS += -I. -DALLOW_EXPERIMENTAL_API -D_GNU_SOURCE +CFLAGS += -I. -DALLOW_EXPERIMENTAL_API OBJS := $(patsubst %.c,build/%.o,$(SRCS-y)) diff --git a/examples/performance-thread/l3fwd-thread/main.c b/examples/performance-thread/l3fwd-thread/main.c index 4d82fb82ef..10bd33d767 100644 --- a/examples/performance-thread/l3fwd-thread/main.c +++ b/examples/performance-thread/l3fwd-thread/main.c @@ -2,10 +2,6 @@ * Copyright(c) 2010-2016 Intel Corporation */ -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#endif - #include #include #include diff --git a/examples/performance-thread/pthread_shim/Makefile b/examples/performance-thread/pthread_shim/Makefile index 5aa401dc49..a1f4557cd4 100644 --- a/examples/performance-thread/pthread_shim/Makefile +++ b/examples/performance-thread/pthread_shim/Makefile @@ -18,7 +18,6 @@ endif endif CFLAGS += -DALLOW_EXPERIMENTAL_API -CFLAGS += -D_GNU_SOURCE LDFLAGS += "-Wl,--copy-dt-needed-entries" # Build using pkg-config variables if possible diff --git a/examples/pipeline/Makefile b/examples/pipeline/Makefile index fcba51fd4d..92caf4aeb2 100644 --- a/examples/pipeline/Makefile +++ b/examples/pipeline/Makefile @@ -38,7 +38,7 @@ $(error "Cannot generate statically-linked binaries with this version of pkg-con endif endif -CFLAGS += -I. -DALLOW_EXPERIMENTAL_API -D_GNU_SOURCE +CFLAGS += -I. -DALLOW_EXPERIMENTAL_API OBJS := $(patsubst %.c,build/%.o,$(SRCS-y)) diff --git a/examples/vhost_blk/vhost_blk.c b/examples/vhost_blk/vhost_blk.c index 7ea60863da..e9361267a6 100644 --- a/examples/vhost_blk/vhost_blk.c +++ b/examples/vhost_blk/vhost_blk.c @@ -2,12 +2,8 @@ * Copyright(c) 2010-2019 Intel Corporation */ -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#endif #include #include - #include #include #include -- 2.30.1