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 @@ #define FORCE_INLINE inline #endif + +/* Version information from http://ohse.de/uwe/articles/gcc-attributes.html */ +#if defined(__GNUC__) && (__GNUC__ >= 4 || \ + (__GNUC__ >= 3 && __GNUC_MINOR__ >= 1)) +#define USED_ATTR __attribute__((used)) +#else +#define USED_ATTR +#endif + #endif /* _GCC_EXTENSIONS_H_ */ |