[dpdk-stable] patch 'build: remove redundant _GNU_SOURCE definitions' has been queued to stable release 20.11.2

Xueming Li xuemingl at nvidia.com
Mon May 10 18:00:18 CEST 2021


Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/9c3bb2603c1c964ce8fa3740e9d39ac0cf3ff4ce

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 9c3bb2603c1c964ce8fa3740e9d39ac0cf3ff4ce Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas at monjalon.net>
Date: Thu, 25 Feb 2021 09:45:06 +0100
Subject: [PATCH] build: remove redundant _GNU_SOURCE definitions
Cc: Luca Boccassi <bluca at debian.org>

[ upstream commit e0ae50c6876e899540f6116f8b4f5e5e3dec445f ]

The feature macro _GNU_SOURCE is defined globally,
but there was some remaining useless settings.

The internal definition in config/meson.build is kept,
all other internal definitions of _GNU_SOURCE are removed,
except in examples, which can be built as external applications.
Note: external applications do not inherit of _GNU_SOURCE.

Fixes: 5d7b673d5fd6 ("mk: build with _GNU_SOURCE defined by default")
Fixes: 28188cee2aa0 ("build: enable BSD features visibility for FreeBSD")
Fixes: e6cdc54cc0ef ("net/mlx5: add socket server for external tools")

Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
Acked-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
Acked-by: David Marchand <david.marchand at redhat.com>
---
 app/test/meson.build                     | 2 --
 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 ----
 6 files changed, 18 deletions(-)

diff --git a/app/test/meson.build b/app/test/meson.build
index 3fdd22de7e..49fbb5e18e 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -396,8 +396,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/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 <stdio.h>
 #include <stdint.h>
 #include <stdlib.h>
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 <sched.h>
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
 #include <stdint.h>
 #include <stdlib.h>
 #include <stddef.h>
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 765a7e5998..7e5c15341e 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 <sys/queue.h>
 
 #include <rte_ethdev_driver.h>
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 <sys/types.h>
 #include <sys/socket.h>
 #include <sys/un.h>
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:28.443423200 +0800
+++ 0070-build-remove-redundant-_GNU_SOURCE-definitions.patch	2021-05-10 23:59:26.430000000 +0800
@@ -1 +1 @@
-From e0ae50c6876e899540f6116f8b4f5e5e3dec445f Mon Sep 17 00:00:00 2001
+From 9c3bb2603c1c964ce8fa3740e9d39ac0cf3ff4ce Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca at debian.org>
+
+[ upstream commit e0ae50c6876e899540f6116f8b4f5e5e3dec445f ]
@@ -17 +19,0 @@
-Cc: stable at dpdk.org
@@ -32 +34 @@
-index 099895fc87..76eaaea457 100644
+index 3fdd22de7e..49fbb5e18e 100644
@@ -35 +37 @@
-@@ -398,8 +398,6 @@ if cc.has_argument('-Wno-format-truncation')
+@@ -396,8 +396,6 @@ if cc.has_argument('-Wno-format-truncation')
@@ -86 +88 @@
-index 24321d3a39..2038bda742 100644
+index 765a7e5998..7e5c15341e 100644
@@ -99 +101 @@
- #include <ethdev_driver.h>
+ #include <rte_ethdev_driver.h>


More information about the stable mailing list