Fix linker set creation for GCC 3.4 with -funit-at-a-time.
authorJoerg Sonnenberger <joerg@dragonflybsd.org>
Fri, 27 Aug 2004 12:08:41 +0000 (12:08 +0000)
committerJoerg Sonnenberger <joerg@dragonflybsd.org>
Fri, 27 Aug 2004 12:08:41 +0000 (12:08 +0000)
commitefb8080e4be02dfc56b37e6beb1def9ad50efa17
treeac8245ce83a095134ec70783bd551a3bfae1fd55
parentaeedcc815e5a9f2cda3bc8f807d2f0b6edde0ba7
Fix linker set creation for GCC 3.4 with -funit-at-a-time.

GCC 3.4 optimizes away global statics, which are referenced. Define a new
macro __used, which expands to attribute((used)) and tells the compiler that
a certain static indead referenced. For older versions and other compilers
it defaults to the meaning of __unused to avoid warnings.
sys/sys/cdefs.h
sys/sys/linker_set.h