diff options
author | Lucas De Marchi <lucas.demarchi@intel.com> | 2018-07-24 15:20:23 -0700 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2018-07-25 15:48:18 -0700 |
commit | 31ea7dd5e66d8ff3acf093de79a2890a2cbec045 (patch) | |
tree | 54a684209893b998eabbe5ca2e2bc7bd310672d6 | |
parent | fe908a01012c9daafafb3410b9407725ca9d4f21 (diff) |
build: provide include for missing syscalls
Add directory with README file to allow missing syscalls to be defined.
The syscalls themselves will be provided in follow up patches.
v2: add support to autotools
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: Antonio Argenziano <antonio.argenziano@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
-rw-r--r-- | benchmarks/Makefile.am | 3 | ||||
-rw-r--r-- | debugger/Makefile.am | 3 | ||||
-rw-r--r-- | lib/Makefile.am | 3 | ||||
-rw-r--r-- | lib/stubs/syscalls/README | 6 | ||||
-rw-r--r-- | lib/tests/Makefile.am | 1 | ||||
-rw-r--r-- | meson.build | 2 | ||||
-rw-r--r-- | overlay/Makefile.am | 3 | ||||
-rw-r--r-- | tests/Makefile.am | 1 | ||||
-rw-r--r-- | tools/Makefile.am | 3 | ||||
-rw-r--r-- | tools/null_state_gen/Makefile.am | 3 |
10 files changed, 21 insertions, 7 deletions
diff --git a/benchmarks/Makefile.am b/benchmarks/Makefile.am index 055e4c3aa..979b94905 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 ceaab6f8b..e3a084d2c 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 ab9eefe66..6251bdb85 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 000000000..f05b9a6f7 --- /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 fb433d693..ad585b779 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 5a931565e..221188280 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 0f553b7ce..4cf82dc67 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 ba307b220..8712eb169 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 a0b016ddd..e7de4d902 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 d1dc83ab5..d4aa3d442 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 |