[libunwind] Add support for Fuchsia

Fuchsia is a new operating system which uses libunwind as unwinder.

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

git-svn-id: https://llvm.org/svn/llvm-project/libunwind/trunk@284951 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/src/AddressSpace.hpp b/src/AddressSpace.hpp
index ec9fb36..2792e0e 100644
--- a/src/AddressSpace.hpp
+++ b/src/AddressSpace.hpp
@@ -61,8 +61,8 @@
 #endif // !defined(_LIBUNWIND_IS_BAREMETAL)
 #endif // _LIBUNWIND_ARM_EHABI
 
-#if defined(__CloudABI__) || defined(__FreeBSD__) || defined(__linux__) ||	\
-    defined(__NetBSD__)
+#if defined(__CloudABI__) || defined(__FreeBSD__) || defined(__Fuchsia__) ||  \
+    defined(__linux__) || defined(__NetBSD__)
 #if _LIBUNWIND_SUPPORT_DWARF_UNWIND && _LIBUNWIND_SUPPORT_DWARF_INDEX
 #include <link.h>
 // Macro for machine-independent access to the ELF program headers. This
diff --git a/src/assembly.h b/src/assembly.h
index 06b29b3..9fb9905 100644
--- a/src/assembly.h
+++ b/src/assembly.h
@@ -47,7 +47,8 @@
 #define SYMBOL_IS_FUNC(name) .type name,@function
 #endif
 
-#if defined(__GNU__) || defined(__ANDROID__) || defined(__FreeBSD__)
+#if defined(__GNU__) || defined(__ANDROID__) || defined(__FreeBSD__) || \
+    defined(__Fuchsia__)
 #define NO_EXEC_STACK_DIRECTIVE .section .note.GNU-stack,"",%progbits
 #else
 #define NO_EXEC_STACK_DIRECTIVE