Neither GCC nor Clang define GNU. Instead use GNUC
for the check.
Details
Details
- Reviewers
echristo rengolin compnerd - Commits
- rGcf0675bb7459: [builtins] Fix a check from __GNU__ to __GNUC__ for disabling executable stack.
rCRT303112: [builtins] Fix a check from __GNU__ to __GNUC__ for disabling executable stack.
rL303112: [builtins] Fix a check from __GNU__ to __GNUC__ for disabling executable stack.
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Tested that GCC and Clang do not define
__GNU__
$ cat blah.c
#ifdef __GNU__ aabb // Should error out if __GNU__ is defined #endif
$ gcc -c blah.c No error
$ bin/clang -c blah.c No error
Comment Actions
__GNU__ is for GNU/Hurd not, GNU compiler, please revert
We don't want this on NetBSD.