summaryrefslogtreecommitdiff
path: root/recipes/linux/linux-colinux-2.4.28/linux-2.4.24-attribute-used.patch
blob: 2b7678e97a6b82a04dabaeb5ae80adfbe1251778 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37

#
# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
#

--- linux-2.4.27/include/asm-arm/setup.h~linux-2.4.24-attribute-used	2003-08-25 07:44:43.000000000 -0400
+++ linux-2.4.27/include/asm-arm/setup.h	2004-11-27 15:32:34.003354160 -0500
@@ -236,7 +236,7 @@
 	int (*parse)(const struct tag *);
 };
 
-#define __tag __attribute__((unused, __section__(".taglist")))
+#define __tag __attribute_used__ __attribute__((__section__(".taglist")))
 #define __tagtable(tag, fn) \
 static struct tagtable __tagtable_##fn __tag = { tag, fn }
 
--- linux-2.4.27/include/linux/compiler.h~linux-2.4.24-attribute-used	2004-08-07 19:26:06.000000000 -0400
+++ linux-2.4.27/include/linux/compiler.h	2004-11-27 15:32:34.008353400 -0500
@@ -38,4 +38,18 @@
 /* no checker support, so we unconditionally define this as (null) */
 #define __user
 
+#if __GNUC__ > 3
+#define __attribute_used__     __attribute__((__used__))
+#elif __GNUC__ == 3
+#if  __GNUC_MINOR__ >= 3
+# define __attribute_used__    __attribute__((__used__))
+#else
+# define __attribute_used__    __attribute__((__unused__))
+#endif /* __GNUC_MINOR__ >= 3 */
+#elif __GNUC__ == 2
+#define __attribute_used__     __attribute__((__unused__))
+#else
+#define __attribute_used__     /* not implemented */
+#endif /* __GNUC__ */
+
 #endif /* __LINUX_COMPILER_H */