ia64/xen-unstable

changeset 2467:8d1bc9a571e0

bitkeeper revision 1.1159.1.145 (4140e840rdAgNzGs4H22eopT-ononA)

Fix Xen for recent GCC.
author kaf24@freefall.cl.cam.ac.uk
date Thu Sep 09 23:33:20 2004 +0000 (2004-09-09)
parents db0119e98043
children 7415ba387aaf
files xen/include/acpi/platform/acgcc.h xen/include/xen/compiler.h xen/include/xen/init.h
line diff
     1.1 --- a/xen/include/acpi/platform/acgcc.h	Thu Sep 09 01:20:13 2004 +0000
     1.2 +++ b/xen/include/acpi/platform/acgcc.h	Thu Sep 09 23:33:20 2004 +0000
     1.3 @@ -54,6 +54,6 @@
     1.4   * to to tell the compiler warning in a per-variable manner that a variable
     1.5   * is unused.
     1.6   */
     1.7 -#define ACPI_UNUSED_VAR __attribute__ ((unused))
     1.8 +#define ACPI_UNUSED_VAR __attribute_used__
     1.9  
    1.10  #endif /* __ACGCC_H__ */
     2.1 --- a/xen/include/xen/compiler.h	Thu Sep 09 01:20:13 2004 +0000
     2.2 +++ b/xen/include/xen/compiler.h	Thu Sep 09 23:33:20 2004 +0000
     2.3 @@ -13,4 +13,10 @@
     2.4  #define likely(x)	__builtin_expect((x),1)
     2.5  #define unlikely(x)	__builtin_expect((x),0)
     2.6  
     2.7 +#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
     2.8 +#define __attribute_used__ __attribute__((__used__))
     2.9 +#else
    2.10 +#define __attribute_used__ __attribute__((__unused__))
    2.11 +#endif
    2.12 +
    2.13  #endif /* __LINUX_COMPILER_H */
     3.1 --- a/xen/include/xen/init.h	Thu Sep 09 01:20:13 2004 +0000
     3.2 +++ b/xen/include/xen/init.h	Thu Sep 09 23:33:20 2004 +0000
     3.3 @@ -67,7 +67,7 @@ extern struct kernel_param __setup_start
     3.4  
     3.5  #define __setup(str, fn)								\
     3.6  	static char __setup_str_##fn[] __initdata = str;				\
     3.7 -	static struct kernel_param __setup_##fn __attribute__((unused)) __initsetup = { __setup_str_##fn, fn }
     3.8 +	static struct kernel_param __setup_##fn __attribute_used__ __initsetup = { __setup_str_##fn, fn }
     3.9  
    3.10  #endif /* __ASSEMBLY__ */
    3.11  
    3.12 @@ -76,12 +76,12 @@ extern struct kernel_param __setup_start
    3.13   * or exit time.
    3.14   */
    3.15  #define __init		__attribute__ ((__section__ (".text.init")))
    3.16 -#define __exit		__attribute__ ((unused, __section__(".text.exit")))
    3.17 +#define __exit		__attribute_used__ __attribute__ ((__section__(".text.exit")))
    3.18  #define __initdata	__attribute__ ((__section__ (".data.init")))
    3.19 -#define __exitdata	__attribute__ ((unused, __section__ (".data.exit")))
    3.20 -#define __initsetup	__attribute__ ((unused,__section__ (".setup.init")))
    3.21 -#define __init_call	__attribute__ ((unused,__section__ (".initcall.init")))
    3.22 -#define __exit_call	__attribute__ ((unused,__section__ (".exitcall.exit")))
    3.23 +#define __exitdata	__attribute_used__ __attribute__ ((__section__ (".data.exit")))
    3.24 +#define __initsetup	__attribute_used__ __attribute__ ((__section__ (".setup.init")))
    3.25 +#define __init_call	__attribute_used__ __attribute__ ((__section__ (".initcall.init")))
    3.26 +#define __exit_call	__attribute_used__ __attribute__ ((__section__ (".exitcall.exit")))
    3.27  
    3.28  /* For assembly routines */
    3.29  #define __INIT		.section	".text.init","ax"