Fix executable stack directive on Linux.

Summary: Use __linux__  to check for Linux and bring back the check for __GNU__.

Reviewers: echristo, krytarowski, compnerd, rengolin

Reviewed By: krytarowski

Subscribers: phosek, llvm-commits, srhines

Differential Revision: https://reviews.llvm.org/D33219

llvm-svn: 303131
This commit is contained in:
Manoj Gupta 2017-05-15 23:13:54 +00:00
parent ebbc7159e9
commit 2361a394b6
1 changed files with 2 additions and 1 deletions

View File

@ -44,7 +44,8 @@
#endif
#define CONST_SECTION .section .rodata
#if defined(__GNUC__) || defined(__ANDROID__) || defined(__FreeBSD__)
#if defined(__GNU__) || defined(__FreeBSD__) || defined(__Fuchsia__) || \
defined(__linux__)
#define NO_EXEC_STACK_DIRECTIVE .section .note.GNU-stack,"",%progbits
#else
#define NO_EXEC_STACK_DIRECTIVE