[gcc/devel/omp/gcc-16] '#define _GNU_SOURCE' in 'libgomp/plugin/plugin-gcn.c'

Sandra Loosemore via Gcc-cvs <[email protected]>
Newsgroups gmane.comp.gcc.cvs
Message-ID <[email protected]>
https://gcc.gnu.org/g:720bc7e307b05b170b6076cf5e7190ff4ddb630f

commit 720bc7e307b05b170b6076cf5e7190ff4ddb630f
Author: Thomas Schwinge <[email protected]>
Date:   Thu May 21 18:54:08 2026 +0200

    '#define _GNU_SOURCE' in 'libgomp/plugin/plugin-gcn.c'
    
    '#define _GNU_SOURCE' in 'libgomp/plugin/plugin-gcn.c', like all other
    libgomp source files do, instead of via the 'Makefile'.  Minor fix-up for
    Subversion r278138 (Git commit 237957cc2c1818f30207f02747a880bd1cd28d0b)
    "GCN Libgomp Plugin" (..., which, back then, likely had inherited that
    from the HSA libgomp plugin).
    
            libgomp/
            * plugin/plugin-gcn.c: '#define _GNU_SOURCE'.
            * plugin/Makefrag.am (libgomp_plugin_gcn_la_CPPFLAGS): Don't add
            '-D_GNU_SOURCE'.
            * Makefile.in: Regenerate.
    
    (cherry picked from commit fce912811617043fb2107034aa0751f6a531aae8)

Diff:
---
 libgomp/Makefile.in         | 4 +---
 libgomp/plugin/Makefrag.am  | 3 +--
 libgomp/plugin/plugin-gcn.c | 1 +
 3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/libgomp/Makefile.in b/libgomp/Makefile.in
index 07827630e8c4..99ec575e3d59 100644
--- a/libgomp/Makefile.in
+++ b/libgomp/Makefile.in
@@ -589,9 +589,7 @@ libgomp_la_SOURCES = alloc.c atomic.c barrier.c critical.c env.c \
 @PLUGIN_GCN_TRUE@libgomp_plugin_gcn_la_SOURCES = plugin/plugin-gcn.c simple-allocator.c \
 @PLUGIN_GCN_TRUE@				plugin/mutex.c
 
-@PLUGIN_GCN_TRUE@libgomp_plugin_gcn_la_CPPFLAGS = $(AM_CPPFLAGS) \
-@PLUGIN_GCN_TRUE@	-D_GNU_SOURCE
-
+@PLUGIN_GCN_TRUE@libgomp_plugin_gcn_la_CPPFLAGS = $(AM_CPPFLAGS)
 @PLUGIN_GCN_TRUE@libgomp_plugin_gcn_la_LDFLAGS = $(libgomp_plugin_gcn_version_info) \
 @PLUGIN_GCN_TRUE@	$(lt_host_flags)
 
diff --git a/libgomp/plugin/Makefrag.am b/libgomp/plugin/Makefrag.am
index c5476c38586e..a25ccaf5e259 100644
--- a/libgomp/plugin/Makefrag.am
+++ b/libgomp/plugin/Makefrag.am
@@ -59,8 +59,7 @@ libgomp_plugin_gcn_version_info = -version-info $(libtool_VERSION)
 toolexeclib_LTLIBRARIES += libgomp-plugin-gcn.la
 libgomp_plugin_gcn_la_SOURCES = plugin/plugin-gcn.c simple-allocator.c \
 				plugin/mutex.c
-libgomp_plugin_gcn_la_CPPFLAGS = $(AM_CPPFLAGS) \
-	-D_GNU_SOURCE
+libgomp_plugin_gcn_la_CPPFLAGS = $(AM_CPPFLAGS)
 libgomp_plugin_gcn_la_LDFLAGS = $(libgomp_plugin_gcn_version_info) \
 	$(lt_host_flags)
 libgomp_plugin_gcn_la_LIBADD = libgomp.la
diff --git a/libgomp/plugin/plugin-gcn.c b/libgomp/plugin/plugin-gcn.c
index e14a21a1f3aa..d4061e4b781e 100644
--- a/libgomp/plugin/plugin-gcn.c
+++ b/libgomp/plugin/plugin-gcn.c
@@ -28,6 +28,7 @@
 
 /* {{{ Includes and defines  */
 
+#define _GNU_SOURCE
 #include "config.h"
 #include "symcat.h"
 #include <stdio.h>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.