]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/linux/linux-wrt-2.4.20/linux-2.4.24-attribute-used.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / linux / linux-wrt-2.4.20 / linux-2.4.24-attribute-used.patch
1
2 #
3 # Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
4 #
5
6 --- linux-2.4.20/include/asm-arm/setup.h~linux-2.4.24-attribute-used    2001-10-25 16:53:55.000000000 -0400
7 +++ linux-2.4.20/include/asm-arm/setup.h        2005-01-07 03:34:41.753675352 -0500
8 @@ -229,7 +229,7 @@
9         int (*parse)(const struct tag *);
10  };
11  
12 -#define __tag __attribute__((unused, __section__(".taglist")))
13 +#define __tag __attribute_used__ __attribute__((__section__(".taglist")))
14  #define __tagtable(tag, fn) \
15  static struct tagtable __tagtable_##fn __tag = { tag, fn }
16  
17 --- linux-2.4.20/include/linux/compiler.h~linux-2.4.24-attribute-used   2001-09-18 17:12:45.000000000 -0400
18 +++ linux-2.4.20/include/linux/compiler.h       2005-01-07 03:34:41.754675200 -0500
19 @@ -13,4 +13,18 @@
20  #define likely(x)      __builtin_expect((x),1)
21  #define unlikely(x)    __builtin_expect((x),0)
22  
23 +#if __GNUC__ > 3
24 +#define __attribute_used__     __attribute__((__used__))
25 +#elif __GNUC__ == 3
26 +#if  __GNUC_MINOR__ >= 3
27 +# define __attribute_used__    __attribute__((__used__))
28 +#else
29 +# define __attribute_used__    __attribute__((__unused__))
30 +#endif /* __GNUC_MINOR__ >= 3 */
31 +#elif __GNUC__ == 2
32 +#define __attribute_used__     __attribute__((__unused__))
33 +#else
34 +#define __attribute_used__     /* not implemented */
35 +#endif /* __GNUC__ */
36 +
37  #endif /* __LINUX_COMPILER_H */
38 --- linux-2.4.20/include/linux/init.h~linux-2.4.24-attribute-used       2001-12-21 12:42:03.000000000 -0500
39 +++ linux-2.4.20/include/linux/init.h   2005-01-07 03:35:29.816368712 -0500
40 @@ -2,6 +2,7 @@
41  #define _LINUX_INIT_H
42  
43  #include <linux/config.h>
44 +#include <linux/compiler.h>
45  
46  /* These macros are used to mark some functions or 
47   * initialized data (doesn't apply to uninitialized data)
48 @@ -51,7 +52,7 @@
49  extern initcall_t __initcall_start, __initcall_end;
50  
51  #define __initcall(fn)                                                         \
52 -       static initcall_t __initcall_##fn __init_call = fn
53 +       static initcall_t __initcall_##fn __attribute_used__ __init_call = fn
54  #define __exitcall(fn)                                                         \
55         static exitcall_t __exitcall_##fn __exit_call = fn
56  
57 @@ -67,7 +68,7 @@
58  
59  #define __setup(str, fn)                                                               \
60         static char __setup_str_##fn[] __initdata = str;                                \
61 -       static struct kernel_param __setup_##fn __attribute__((unused)) __initsetup = { __setup_str_##fn, fn }
62 +       static struct kernel_param __setup_##fn __attribute_used__ __initsetup = { __setup_str_##fn, fn }
63  
64  #endif /* __ASSEMBLY__ */
65  
66 @@ -76,12 +77,12 @@
67   * or exit time.
68   */
69  #define __init         __attribute__ ((__section__ (".text.init")))
70 -#define __exit         __attribute__ ((unused, __section__(".text.exit")))
71 +#define __exit         __attribute_used__ __attribute__ ((__section__(".text.exit")))
72  #define __initdata     __attribute__ ((__section__ (".data.init")))
73 -#define __exitdata     __attribute__ ((unused, __section__ (".data.exit")))
74 -#define __initsetup    __attribute__ ((unused,__section__ (".setup.init")))
75 -#define __init_call    __attribute__ ((unused,__section__ (".initcall.init")))
76 -#define __exit_call    __attribute__ ((unused,__section__ (".exitcall.exit")))
77 +#define __exitdata     __attribute_used__ __attribute__ ((__section__ (".data.exit")))
78 +#define __initsetup    __attribute_used__ __attribute__ ((__section__ (".setup.init")))
79 +#define __init_call    __attribute_used__ __attribute__ ((__section__ (".initcall.init")))
80 +#define __exit_call    __attribute_used__ __attribute__ ((__section__ (".exitcall.exit")))
81  
82  /* For assembly routines */
83  #define __INIT         .section        ".text.init","ax"
84 --- linux-2.4.20/include/linux/module.h~linux-2.4.24-attribute-used     2002-08-02 20:39:45.000000000 -0400
85 +++ linux-2.4.20/include/linux/module.h 2005-01-07 03:34:41.755675048 -0500
86 @@ -8,6 +8,7 @@
87  #define _LINUX_MODULE_H
88  
89  #include <linux/config.h>
90 +#include <linux/compiler.h>
91  #include <linux/spinlock.h>
92  #include <linux/list.h>
93  
94 @@ -254,9 +255,9 @@
95   */
96  #define MODULE_GENERIC_TABLE(gtype,name)       \
97  static const unsigned long __module_##gtype##_size \
98 -  __attribute__ ((unused)) = sizeof(struct gtype##_id); \
99 +  __attribute_used__ = sizeof(struct gtype##_id); \
100  static const struct gtype##_id * __module_##gtype##_table \
101 -  __attribute__ ((unused)) = name
102 +  __attribute_used__ = name
103  
104  /*
105   * The following license idents are currently accepted as indicating free
106 @@ -284,7 +285,7 @@
107   */
108   
109  #define MODULE_LICENSE(license)        \
110 -static const char __module_license[] __attribute__((section(".modinfo"))) =   \
111 +static const char __module_license[] __attribute_used__ __attribute__((section(".modinfo"))) =   \
112  "license=" license
113  
114  /* Define the module variable, and usage macros.  */
115 @@ -296,10 +297,10 @@
116  #define MOD_IN_USE             __MOD_IN_USE(THIS_MODULE)
117  
118  #include <linux/version.h>
119 -static const char __module_kernel_version[] __attribute__((section(".modinfo"))) =
120 +static const char __module_kernel_version[] __attribute_used__ __attribute__((section(".modinfo"))) =
121  "kernel_version=" UTS_RELEASE;
122  #ifdef MODVERSIONS
123 -static const char __module_using_checksums[] __attribute__((section(".modinfo"))) =
124 +static const char __module_using_checksums[] __attribute_used__ __attribute__((section(".modinfo"))) =
125  "using_checksums=1";
126  #endif
127  
128 @@ -319,7 +320,7 @@
129   */
130  #define MODULE_GENERIC_TABLE(gtype,name) \
131  static const struct gtype##_id * __module_##gtype##_table \
132 -  __attribute__ ((unused, __section__(".data.exit"))) = name
133 +  __attribute_used__ __attribute__ ((__section__(".data.exit"))) = name
134  
135  #ifndef __GENKSYMS__
136