mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 15:11:16 +00:00
compiler-gcc4: conditionalize #error on __KERNEL__
Impact: Fix for exported headers We only want to error out on specific gcc versions if we are actually building the kernel, so conditionalize the #if...#error on __KERNEL__. Based on a patchset by Arnd Bergmann <arnd@arndb.de>. Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
3a471cbc08
commit
8cd2c29dd5
1 changed files with 4 additions and 2 deletions
|
@ -3,8 +3,10 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* GCC 4.1.[01] miscompiles __weak */
|
/* GCC 4.1.[01] miscompiles __weak */
|
||||||
#if __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ <= 1
|
#ifdef __KERNEL__
|
||||||
|
# if __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ <= 1
|
||||||
# error Your version of gcc miscompiles the __weak directive
|
# error Your version of gcc miscompiles the __weak directive
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define __used __attribute__((__used__))
|
#define __used __attribute__((__used__))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue