ssp: further refine the conditional used for constructor priority
__has_attribute(__constructor__) is a better test for clang than defined(__clang__). Switch to it instead. While we're already here and touching it, pfg@ nailed down when GCC actually introduced the priority argument -- 4.3. Use that instead of our hammer-guess of GCC >= 5 for the sake of correctness.
This commit is contained in:
parent
301b49d2e5
commit
4e0706cbdf
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=354689
@ -50,7 +50,7 @@ __FBSDID("$FreeBSD$");
|
||||
*
|
||||
* This conditional should be removed when GCC 4.2 is removed.
|
||||
*/
|
||||
#if defined(__clang__) || (defined(__GNUC__) && __GNUC__ > 4)
|
||||
#if __has_attribute(__constructor__) || __GNUC_PREREQ__(4, 3)
|
||||
#define _GUARD_SETUP_CTOR_ATTR \
|
||||
__attribute__((__constructor__ (200), __used__));
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user