igt-dev.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t v2 1/2] build: provide include for missing syscalls
Date: Tue, 24 Jul 2018 17:04:44 -0700	[thread overview]
Message-ID: <20180725000444.GC16907@intel.com> (raw)
In-Reply-To: <20180724222024.8181-2-lucas.demarchi@intel.com>

On Tue, Jul 24, 2018 at 03:20:23PM -0700, Lucas De Marchi wrote:
> 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>

> ---
>  benchmarks/Makefile.am           | 3 ++-
>  debugger/Makefile.am             | 3 ++-
>  lib/Makefile.am                  | 3 ++-
>  lib/stubs/syscalls/README        | 6 ++++++
>  lib/tests/Makefile.am            | 1 +
>  meson.build                      | 2 +-
>  overlay/Makefile.am              | 3 ++-
>  tests/Makefile.am                | 1 +
>  tools/Makefile.am                | 3 ++-
>  tools/null_state_gen/Makefile.am | 3 ++-
>  10 files changed, 21 insertions(+), 7 deletions(-)
>  create mode 100644 lib/stubs/syscalls/README
> 
> 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
> -- 
> 2.17.1
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2018-07-25  0:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-24 22:20 [igt-dev] [PATCH i-g-t v2 0/2] Fix i-g-t on old systems Lucas De Marchi
2018-07-24 22:20 ` [igt-dev] [PATCH i-g-t v2 1/2] build: provide include for missing syscalls Lucas De Marchi
2018-07-25  0:04   ` Rodrigo Vivi [this message]
2018-08-02 10:19   ` Tvrtko Ursulin
2018-07-24 22:20 ` [igt-dev] [PATCH i-g-t v2 2/2] build: provide stub implementation for memfd_create Lucas De Marchi
2018-07-25  0:04   ` Rodrigo Vivi
2018-07-25 16:46   ` Antonio Argenziano
2018-07-25 19:57     ` De Marchi, Lucas
2018-07-25 21:28       ` Antonio Argenziano
2018-07-25 22:56         ` Rodrigo Vivi
2018-08-02 10:18   ` Tvrtko Ursulin
2018-07-24 23:32 ` [igt-dev] ✓ Fi.CI.BAT: success for Fix i-g-t on old systems (rev2) Patchwork
2018-07-25  1:25 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180725000444.GC16907@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).