diff options
author | Boris Gjenero <dreamlayers@rockbox.org> | 2011-12-09 15:33:59 +0000 |
---|---|---|
committer | Boris Gjenero <dreamlayers@rockbox.org> | 2011-12-09 15:33:59 +0000 |
commit | 59e71ee80c65426b2f569cc4c60936053cc9caa5 (patch) | |
tree | 0b4c61bbd10fbb1fd3c00a877f4a9df6338496e9 /firmware/include/gcc_extensions.h | |
parent | 9653ae364cc8b558c846d3391e3ef9eb843d2385 (diff) | |
download | rockbox-59e71ee80c65426b2f569cc4c60936053cc9caa5.tar.gz rockbox-59e71ee80c65426b2f569cc4c60936053cc9caa5.zip |
Introduce USED_ATTR wrapper for __attribute__((used)).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31188 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/include/gcc_extensions.h')
-rw-r--r-- | firmware/include/gcc_extensions.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/firmware/include/gcc_extensions.h b/firmware/include/gcc_extensions.h index 7109edaaf6..2735d6e7b6 100644 --- a/firmware/include/gcc_extensions.h +++ b/firmware/include/gcc_extensions.h | |||
@@ -57,4 +57,13 @@ | |||
57 | #define FORCE_INLINE inline | 57 | #define FORCE_INLINE inline |
58 | #endif | 58 | #endif |
59 | 59 | ||
60 | |||
61 | /* Version information from http://ohse.de/uwe/articles/gcc-attributes.html */ | ||
62 | #if defined(__GNUC__) && (__GNUC__ >= 4 || \ | ||
63 | (__GNUC__ >= 3 && __GNUC_MINOR__ >= 1)) | ||
64 | #define USED_ATTR __attribute__((used)) | ||
65 | #else | ||
66 | #define USED_ATTR | ||
67 | #endif | ||
68 | |||
60 | #endif /* _GCC_EXTENSIONS_H_ */ | 69 | #endif /* _GCC_EXTENSIONS_H_ */ |