From 4bba4c4bb09ad4a2b70836725e08439c86d8f9e4 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Fri, 18 Dec 2020 09:59:05 -0300 Subject: [PATCH] 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 Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo --- tools/include/linux/compiler.h | 4 +--- tools/include/linux/compiler_types.h | 10 ++++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 tools/include/linux/compiler_types.h diff --git a/tools/include/linux/compiler.h b/tools/include/linux/compiler.h index d22a974372c0e..ff872dc2637c5 100644 --- a/tools/include/linux/compiler.h +++ b/tools/include/linux/compiler.h @@ -2,9 +2,7 @@ #ifndef _TOOLS_LINUX_COMPILER_H_ #define _TOOLS_LINUX_COMPILER_H_ -#ifdef __GNUC__ -#include -#endif +#include #ifndef __compiletime_error # define __compiletime_error(message) diff --git a/tools/include/linux/compiler_types.h b/tools/include/linux/compiler_types.h new file mode 100644 index 0000000000000..31fc2caa758a0 --- /dev/null +++ b/tools/include/linux/compiler_types.h @@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __LINUX_COMPILER_TYPES_H +#define __LINUX_COMPILER_TYPES_H + +/* Compiler specific macros. */ +#ifdef __GNUC__ +#include +#endif + +#endif /* __LINUX_COMPILER_TYPES_H */ -- 2.39.5