Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tools headers: Get tools's linux/compiler.h closer to the kernel's

We're cherry picking stuff from the kernel to allow for the other
headers that we keep in sync via tools/perf/check-headers.sh to work,
so introduce linux/compiler_types.h and from there get the compiler
specific stuff.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

+11 -3
+1 -3
tools/include/linux/compiler.h
··· 2 2 #ifndef _TOOLS_LINUX_COMPILER_H_ 3 3 #define _TOOLS_LINUX_COMPILER_H_ 4 4 5 - #ifdef __GNUC__ 6 - #include <linux/compiler-gcc.h> 7 - #endif 5 + #include <linux/compiler_types.h> 8 6 9 7 #ifndef __compiletime_error 10 8 # define __compiletime_error(message)
+10
tools/include/linux/compiler_types.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + #ifndef __LINUX_COMPILER_TYPES_H 3 + #define __LINUX_COMPILER_TYPES_H 4 + 5 + /* Compiler specific macros. */ 6 + #ifdef __GNUC__ 7 + #include <linux/compiler-gcc.h> 8 + #endif 9 + 10 + #endif /* __LINUX_COMPILER_TYPES_H */