565cbdc2fe
Add a compiler-clang.h file to add specific macros needed for compiling the kernel with clang. Initially the only override required is the macro for silencing the compiler for a purposefully uninintialized variable. Author: Mark Charlebois <charlebm@gmail.com> Signed-off-by: Mark Charlebois <charlebm@gmail.com> Signed-off-by: Behan Webster <behanw@converseincode.com>
12 lines
320 B
C
12 lines
320 B
C
#ifndef __LINUX_COMPILER_H
|
|
#error "Please don't include <linux/compiler-clang.h> directly, include <linux/compiler.h> instead."
|
|
#endif
|
|
|
|
/* Some compiler specific definitions are overwritten here
|
|
* for Clang compiler
|
|
*/
|
|
|
|
#ifdef uninitialized_var
|
|
#undef uninitialized_var
|
|
#define uninitialized_var(x) x = *(&(x))
|
|
#endif
|