This is an archive of the discontinued LLVM Phabricator instance.

[builtins] Fix a check from __GNU__ to __GNUC__ for disabling executable stack.
ClosedPublic

Authored by manojgupta on May 15 2017, 1:42 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

manojgupta created this revision.May 15 2017, 1:42 PM
manojgupta added a comment.EditedMay 15 2017, 1:45 PM

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

echristo accepted this revision.May 15 2017, 1:47 PM

LGTM.

This revision is now accepted and ready to land.May 15 2017, 1:47 PM
This revision was automatically updated to reflect the committed changes.

__GNU__ is for GNU/Hurd not, GNU compiler, please revert

We don't want this on NetBSD.