selftests: use -isystem instead of -I to include headers
authorMuhammad Usama Anjum <usama.anjum@collabora.com>
Wed, 16 Feb 2022 04:32:35 +0000 (15:32 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 17 Feb 2022 03:47:04 +0000 (14:47 +1100)
commit9320eb79d984b9e513423407a1e7f197166304b8
tree37cf4173bf4ae1d3fe6cb5c12af9ff9bc85abd4c
parent94edc8a3482e640f263b0223ebdccbe2745381f9
selftests: use -isystem instead of -I to include headers

Selftests need kernel headers and glibc for compilation.  In compilation
of selftests, uapi headers from kernel source are used instead of default
ones while glibc has already been compiled with different header files
installed in the operating system.  So there can be redefinition warnings
from compiler.  These warnings can be suppressed by using -isystem to
include the uapi headers.

Link: https://lkml.kernel.org/r/20220214160756.3543590-1-usama.anjum@collabora.com
Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
tools/testing/selftests/Makefile