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>tirimbino
parent
aa93685afb
commit
565cbdc2fe
@ -0,0 +1,12 @@ |
||||
#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 |
Loading…
Reference in new issue