summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--benchmarks/Makefile.am3
-rw-r--r--debugger/Makefile.am3
-rw-r--r--lib/Makefile.am3
-rw-r--r--lib/stubs/syscalls/README6
-rw-r--r--lib/tests/Makefile.am1
-rw-r--r--meson.build2
-rw-r--r--overlay/Makefile.am3
-rw-r--r--tests/Makefile.am1
-rw-r--r--tools/Makefile.am3
-rw-r--r--tools/null_state_gen/Makefile.am3
10 files changed, 21 insertions, 7 deletions
diff --git a/benchmarks/Makefile.am b/benchmarks/Makefile.am
index 055e4c3a..979b9490 100644
--- a/benchmarks/Makefile.am
+++ b/benchmarks/Makefile.am
@@ -11,7 +11,8 @@ endif
AM_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_srcdir)/include/drm-uapi \
- -I$(top_srcdir)/lib
+ -I$(top_srcdir)/lib \
+ -I$(top_srcdir)/lib/stubs/syscalls
AM_CFLAGS = -I$(top_srcdir)/include/drm-uapi \
$(DRM_CFLAGS) $(CWARNFLAGS) $(CAIRO_CFLAGS) $(LIBUNWIND_CFLAGS) \
diff --git a/debugger/Makefile.am b/debugger/Makefile.am
index ceaab6f8..e3a084d2 100644
--- a/debugger/Makefile.am
+++ b/debugger/Makefile.am
@@ -7,7 +7,8 @@ noinst_PROGRAMS = debug_rdata
AM_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_srcdir)/lib \
- -I$(top_srcdir)/include/drm-uapi
+ -I$(top_srcdir)/include/drm-uapi \
+ -I$(top_srcdir)/lib/stubs/syscalls
AM_CFLAGS = \
$(DRM_CFLAGS) \
diff --git a/lib/Makefile.am b/lib/Makefile.am
index ab9eefe6..6251bdb8 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -52,7 +52,8 @@ endif
AM_CPPFLAGS = \
-I$(top_srcdir)/include/drm-uapi \
- -I$(top_srcdir)
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/lib/stubs/syscalls
AM_CFLAGS = \
$(CWARNFLAGS) \
diff --git a/lib/stubs/syscalls/README b/lib/stubs/syscalls/README
new file mode 100644
index 00000000..f05b9a6f
--- /dev/null
+++ b/lib/stubs/syscalls/README
@@ -0,0 +1,6 @@
+This directory contains stub implementations for syscalls missing from libc.
+This provides a way to build IGT on an old system, but it will not run
+correctly if the kernel is missing the functionality provided. In order to
+add a new definition, follow the same directory hierarchy as the standard
+location in which the header is defined so we don't have to clutter the
+codebase to support old systems.
diff --git a/lib/tests/Makefile.am b/lib/tests/Makefile.am
index fb433d69..ad585b77 100644
--- a/lib/tests/Makefile.am
+++ b/lib/tests/Makefile.am
@@ -11,6 +11,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/include/drm-uapi \
-I$(srcdir)/../.. \
-I$(srcdir)/.. \
+ -I$(top_srcdir)/lib/stubs/syscalls \
-include "$(srcdir)/../../lib/check-ndebug.h" \
-DIGT_DATADIR=\""$(abs_srcdir)"\" \
-D_GNU_SOURCE
diff --git a/meson.build b/meson.build
index 5a931565..22118828 100644
--- a/meson.build
+++ b/meson.build
@@ -64,7 +64,7 @@ _tests_required = build_tests == 'true'
build_info = []
-inc = include_directories('include/drm-uapi', 'lib', '.')
+inc = include_directories('include/drm-uapi', 'lib', 'lib/stubs/syscalls', '.')
inc_for_gtkdoc = include_directories('lib')
diff --git a/overlay/Makefile.am b/overlay/Makefile.am
index 0f553b7c..4cf82dc6 100644
--- a/overlay/Makefile.am
+++ b/overlay/Makefile.am
@@ -7,7 +7,8 @@ endif
tracepoint_format.h: tracepoint_format.leg
$(LEG) -o $@ $<
-AM_CPPFLAGS = -I. -I$(top_srcdir)/include/drm-uapi
+AM_CPPFLAGS = -I. -I$(top_srcdir)/include/drm-uapi \
+ -I$(top_srcdir)/lib/stubs/syscalls
AM_CFLAGS = $(DRM_CFLAGS) $(PCIACCESS_CFLAGS) $(CWARNFLAGS) \
$(CAIRO_CFLAGS) $(OVERLAY_CFLAGS) $(WERROR_CFLAGS) -I$(srcdir)/../lib
LDADD = $(DRM_LIBS) $(PCIACCESS_LIBS) $(CAIRO_LIBS) $(OVERLAY_LIBS) $(top_builddir)/lib/libigt_perf.la
diff --git a/tests/Makefile.am b/tests/Makefile.am
index ba307b22..8712eb16 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -88,6 +88,7 @@ AM_CFLAGS = $(CWARNFLAGS) -Wno-unused-result $(DEBUG_CFLAGS)\
-I$(top_srcdir)/include/drm-uapi \
-I$(srcdir)/.. \
-I$(srcdir)/../lib \
+ -I$(top_srcdir)/lib/stubs/syscalls \
-include "$(srcdir)/../lib/check-ndebug.h" \
-DIGT_SRCDIR=\""$(abs_srcdir)"\" \
-DIGT_DATADIR=\""$(pkgdatadir)"\" \
diff --git a/tools/Makefile.am b/tools/Makefile.am
index a0b016dd..e7de4d90 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -13,7 +13,8 @@ intel_dp_compliance_LDADD = $(top_builddir)/lib/libintel_tools.la
SUBDIRS = null_state_gen registers
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include/drm-uapi -I$(top_srcdir)/lib
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include/drm-uapi -I$(top_srcdir)/lib \
+ -I$(top_srcdir)/lib/stubs/syscalls
AM_CFLAGS = $(DEBUG_CFLAGS) $(DRM_CFLAGS) $(PCIACCESS_CFLAGS) $(CWARNFLAGS) \
$(CAIRO_CFLAGS) $(LIBUNWIND_CFLAGS) -DIGT_DATADIR=\"$(pkgdatadir)\" \
$(WERROR_CFLAGS) -D_GNU_SOURCE
diff --git a/tools/null_state_gen/Makefile.am b/tools/null_state_gen/Makefile.am
index d1dc83ab..d4aa3d44 100644
--- a/tools/null_state_gen/Makefile.am
+++ b/tools/null_state_gen/Makefile.am
@@ -1,5 +1,6 @@
GPU_TOOLS_PATH := $(top_srcdir)
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include/drm-uapi
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include/drm-uapi \
+ -I$(top_srcdir)/lib/stubs/syscalls
AM_CFLAGS = $(DEBUG_CFLAGS) $(CWARNFLAGS)
noinst_PROGRAMS = intel_null_state_gen