[U-Boot-Users] RE: u-boot compile failure with gcc-3.4.x and fix.

Or perhaps a gcc header like the kernel is needed and the value changed to __attributed_used__ .
-------- * These definitions are for GCC v3.x. */ #include <linux/compiler-gcc.h>
#if __GNUC_MINOR__ >= 1 # define inline __inline__ __attribute__((always_inline)) # define __inline__ __inline__ __attribute__((always_inline)) # define __inline __inline__ __attribute__((always_inline)) #endif
#if __GNUC_MINOR__ > 0 # define __deprecated __attribute__((deprecated)) #endif
#if __GNUC_MINOR__ >= 3 # define __attribute_used__ __attribute__((__used__)) #else # define __attribute_used__ __attribute__((__unused__)) #endif
#define __attribute_pure__ __attribute__((pure)) #define __attribute_const__ __attribute__((__const__))
#if __GNUC_MINOR__ >= 1 #define noinline __attribute__((noinline)) #endif
-----Original Message----- From: Woodruff, Richard Sent: Thursday, June 10, 2004 2:59 PM To: u-boot-users@lists.sourceforge.net Subject: u-boot compile failure with gcc-3.4.x and fix.
Hello,
I'm noticing that the examples directory fails to compile with
gcc-3.4.0.
The _exports.h symbols are not making it into stubs.o .
I found that the compile works if you:
Change: static void __attribute__((unused)) dummy(void) to: void __attribute__((unused)) dummy(void)
This would seem to be a new optimization or bug. I would expect that unused should make it stick around, even if it is not used locally.
The kernel uses this same construct in a few places mostly in debug
code
and drivers I don't' use...
Regards,
Richard W.
participants (1)
-
Woodruff, Richard