The m_syswrap subsystem is Valgrind's model of how the kernel behaves
with respect to syscalls.  It is detailed and comprehensive but does
not offer a way to deal with minor deviations in behaviour from the
vanilla kernel sources, either due to running a hacked kernel or
running a vanilla kernel with a custom kernel module loaded.

This commit adds a flexible way to handle such cases without polluting
the vanilla handler syswrap-*.c files or their supporting vki_*.h
header files.  For each OS, a syswrap-OS-variants.c file is added,
containing wrappers for variants of OS.  A new command line flag
--kernel-variants= carries a comma separated list of variant names
that apply to the current run.  There are no other changes.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4873 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/Makefile.am b/coregrind/Makefile.am
index 25ff527..c032136 100644
--- a/coregrind/Makefile.am
+++ b/coregrind/Makefile.am
@@ -86,6 +86,7 @@
 	m_syswrap/priv_types_n_macros.h \
 	m_syswrap/priv_syswrap-generic.h \
 	m_syswrap/priv_syswrap-linux.h \
+	m_syswrap/priv_syswrap-linux-variants.h \
 	m_syswrap/priv_syswrap-main.h
 
 BUILT_SOURCES = 
@@ -150,6 +151,7 @@
 	m_syswrap/syscall-@VG_PLATFORM@.S \
 	m_syswrap/syswrap-generic.c \
 	m_syswrap/syswrap-@VG_OS@.c \
+	m_syswrap/syswrap-@VG_OS@-variants.c \
 	m_syswrap/syswrap-@VG_PLATFORM@.c \
 	m_syswrap/syswrap-main.c