[Intel-gfx] [PATCH i-g-t] build: Define _GNU_SOURCE in Makefile.am

Daniel Vetter daniel.vetter at ffwll.ch
Tue Sep 5 16:19:45 UTC 2017


In meson I want to just set this everywhere (no reason not to), and
doing so will allow us to clean up a few things.

But that means autofoo needs to follow suit.

v2: Rebase.

Reviewed-by: Eric Anholt <eric at anholt.net>
Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
---
 benchmarks/Makefile.am | 2 +-
 lib/Makefile.am        | 1 +
 lib/tests/Makefile.am  | 1 +
 tests/Makefile.am      | 1 +
 tools/Makefile.am      | 2 +-
 5 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/benchmarks/Makefile.am b/benchmarks/Makefile.am
index 767731f7d18f..5c2cd19d6b20 100644
--- a/benchmarks/Makefile.am
+++ b/benchmarks/Makefile.am
@@ -8,7 +8,7 @@ endif
 
 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/lib
 AM_CFLAGS = $(DRM_CFLAGS) $(CWARNFLAGS) $(CAIRO_CFLAGS) $(LIBUNWIND_CFLAGS) \
-	    $(WERROR_CFLAGS)
+	    $(WERROR_CFLAGS) -D_GNU_SOURCE
 LDADD = $(top_builddir)/lib/libintel_tools.la
 
 benchmarks_LTLIBRARIES = gem_exec_tracer.la
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 3ff14f66cdea..6509593db1c7 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -62,6 +62,7 @@ AM_CFLAGS = \
 	    $(VALGRIND_CFLAGS) \
 	    -DIGT_SRCDIR=\""$(abs_top_srcdir)/tests"\" \
 	    -DIGT_DATADIR=\""$(pkgdatadir)"\" \
+	    -D_GNU_SOURCE \
 	    -DIGT_LOG_DOMAIN=\""$(subst _,-,$*)"\" \
 	    -pthread
 
diff --git a/lib/tests/Makefile.am b/lib/tests/Makefile.am
index 5d14194ada12..63bbbe5907b4 100644
--- a/lib/tests/Makefile.am
+++ b/lib/tests/Makefile.am
@@ -12,6 +12,7 @@ AM_CFLAGS = $(DRM_CFLAGS) $(CWARNFLAGS) $(DEBUG_CFLAGS) \
 	-I$(srcdir)/.. \
 	-include "$(srcdir)/../../lib/check-ndebug.h" \
 	-DIGT_DATADIR=\""$(abs_srcdir)"\" \
+	-D_GNU_SOURCE
 	$(NULL)
 
 LDADD = ../libintel_tools.la $(PCIACCESS_LIBS) $(DRM_LIBS) $(LIBUNWIND_LIBS) $(TIMER_LIBS)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 726e2b277411..8c70f6f1aa35 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -76,6 +76,7 @@ AM_CFLAGS = $(DRM_CFLAGS) $(CWARNFLAGS) -Wno-unused-result $(DEBUG_CFLAGS)\
 	-include "$(srcdir)/../lib/check-ndebug.h" \
 	-DIGT_SRCDIR=\""$(abs_srcdir)"\" \
 	-DIGT_DATADIR=\""$(pkgdatadir)"\" \
+	-D_GNU_SOURCE \
 	$(LIBUNWIND_CFLAGS) $(WERROR_CFLAGS) \
 	$(NULL)
 
diff --git a/tools/Makefile.am b/tools/Makefile.am
index c40e75c73bef..2c7b57997447 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -18,7 +18,7 @@ SUBDIRS = null_state_gen registers
 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/lib
 AM_CFLAGS = $(DEBUG_CFLAGS) $(DRM_CFLAGS) $(PCIACCESS_CFLAGS) $(CWARNFLAGS) \
 	    $(CAIRO_CFLAGS) $(LIBUNWIND_CFLAGS) -DPKGDATADIR=\"$(pkgdatadir)\" \
-	    $(WERROR_CFLAGS)
+	    $(WERROR_CFLAGS) -D_GNU_SOURCE
 LDADD = $(top_builddir)/lib/libintel_tools.la
 AM_LDFLAGS = -Wl,--as-needed
 
-- 
2.14.1



More information about the Intel-gfx mailing list