[llvm] r224994 - The __morestack function is only available on i386 and x86_64 architectures.

Peter Collingbourne peter at pcc.me.uk
Tue Dec 30 10:22:06 PST 2014


Author: pcc
Date: Tue Dec 30 12:22:06 2014
New Revision: 224994

URL: http://llvm.org/viewvc/llvm-project?rev=224994&view=rev
Log:
The __morestack function is only available on i386 and x86_64 architectures.

Modified:
    llvm/trunk/lib/ExecutionEngine/RTDyldMemoryManager.cpp

Modified: llvm/trunk/lib/ExecutionEngine/RTDyldMemoryManager.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RTDyldMemoryManager.cpp?rev=224994&r1=224993&r2=224994&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/RTDyldMemoryManager.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/RTDyldMemoryManager.cpp Tue Dec 30 12:22:06 2014
@@ -210,7 +210,8 @@ ARM_MATH_IMPORTS(ARM_MATH_DECL)
 #undef ARM_MATH_DECL
 #endif
 
-#if defined(__linux__) && defined(__GLIBC__)
+#if defined(__linux__) && defined(__GLIBC__) && \
+      (defined(__i386__) || defined(__x86_64__))
 extern "C" void __morestack();
 #endif
 
@@ -238,8 +239,10 @@ RTDyldMemoryManager::getSymbolAddressInP
   if (Name == "atexit") return (uint64_t)&atexit;
   if (Name == "mknod") return (uint64_t)&mknod;
 
+#if defined(__i386__) || defined(__x86_64__)
   // __morestack lives in libgcc, a static library.
   if (Name == "__morestack") return (uint64_t)&__morestack;
+#endif
 #endif // __linux__ && __GLIBC__
   
   // See ARM_MATH_IMPORTS definition for explanation





More information about the llvm-commits mailing list