Commit f5aa089a authored by Linus Torvalds's avatar Linus Torvalds

Wrap <linux/compiler.h> inside '#ifndef __ASSEMBLY__'

None of the compatibility defines make sense for assembly
files, and gcc has trouble with vararg macros when using
"-traditional" (which is used for asm), to the point of
ICE'ing.
parent 0e0c5521
#ifndef __LINUX_COMPILER_H #ifndef __LINUX_COMPILER_H
#define __LINUX_COMPILER_H #define __LINUX_COMPILER_H
#ifndef __ASSEMBLY__
#ifdef __CHECKER__ #ifdef __CHECKER__
# define __user __attribute__((noderef, address_space(1))) # define __user __attribute__((noderef, address_space(1)))
# define __kernel /* default address space */ # define __kernel /* default address space */
...@@ -22,7 +24,6 @@ extern void __chk_io_ptr(void __iomem *); ...@@ -22,7 +24,6 @@ extern void __chk_io_ptr(void __iomem *);
#ifdef __KERNEL__ #ifdef __KERNEL__
#ifndef __ASSEMBLY__
#if __GNUC__ > 3 #if __GNUC__ > 3
# include <linux/compiler-gcc+.h> /* catch-all for GCC 4, 5, etc. */ # include <linux/compiler-gcc+.h> /* catch-all for GCC 4, 5, etc. */
#elif __GNUC__ == 3 #elif __GNUC__ == 3
...@@ -32,7 +33,6 @@ extern void __chk_io_ptr(void __iomem *); ...@@ -32,7 +33,6 @@ extern void __chk_io_ptr(void __iomem *);
#else #else
# error Sorry, your compiler is too old/not recognized. # error Sorry, your compiler is too old/not recognized.
#endif #endif
#endif
/* Intel compiler defines __GNUC__. So we will overwrite implementations /* Intel compiler defines __GNUC__. So we will overwrite implementations
* coming from above header files here * coming from above header files here
...@@ -62,6 +62,8 @@ extern void __chk_io_ptr(void __iomem *); ...@@ -62,6 +62,8 @@ extern void __chk_io_ptr(void __iomem *);
(typeof(ptr)) (__ptr + (off)); }) (typeof(ptr)) (__ptr + (off)); })
#endif #endif
#endif /* __ASSEMBLY__ */
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment