Skip to content

Commit 4bba4c4

Browse files
committed
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>
1 parent 1c28a05 commit 4bba4c4

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

‎tools/include/linux/compiler.h‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
#ifndef _TOOLS_LINUX_COMPILER_H_
33
#define _TOOLS_LINUX_COMPILER_H_
44

5-
#ifdef __GNUC__
6-
#include <linux/compiler-gcc.h>
7-
#endif
5+
#include <linux/compiler_types.h>
86

97
#ifndef __compiletime_error
108
# define __compiletime_error(message)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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 */

0 commit comments

Comments
 (0)