about summary refs log tree commit diff
path: root/src/rustllvm/ExecutionEngineWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-06-14 21:15:32 +0000
committerbors <bors@rust-lang.org>2015-06-14 21:15:32 +0000
commitb26eeffacb80c122e0559ada5584fdce7183561b (patch)
tree49e238d4a2081f4091491fa403c7d213e1c77ded /src/rustllvm/ExecutionEngineWrapper.cpp
parente89bb24cb267dfa1bf9acee6a06b3221114ae7f5 (diff)
parentb804c241b32c179c84a0e9033ead29346f855059 (diff)
downloadrust-b26eeffacb80c122e0559ada5584fdce7183561b.tar.gz
rust-b26eeffacb80c122e0559ada5584fdce7183561b.zip
Auto merge of #26213 - semarie:openbsd-morestack, r=alexcrichton
don't try to bind __morestack symbol under OpenBSD as the platform don't
have morestack support.

r? @alexcrichton 

it unbreak build under OpenBSD. Does some others platforms don't have morestack too ? They should be impacted by this problem too.
Diffstat (limited to 'src/rustllvm/ExecutionEngineWrapper.cpp')
-rw-r--r--src/rustllvm/ExecutionEngineWrapper.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rustllvm/ExecutionEngineWrapper.cpp b/src/rustllvm/ExecutionEngineWrapper.cpp
index 50551405383..bd4fcc0fc7d 100644
--- a/src/rustllvm/ExecutionEngineWrapper.cpp
+++ b/src/rustllvm/ExecutionEngineWrapper.cpp
@@ -16,8 +16,8 @@ using namespace llvm;
 using namespace llvm::sys;
 using namespace llvm::object;
 
-// libmorestack is not used on Windows
-#if !defined(_WIN32) && !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__Bitrig__)
+// libmorestack is not used on other platforms
+#if defined(__linux__) || defined(__APPLE__)
 extern "C" void __morestack(void);
 
 static void* morestack_addr() {
@@ -35,7 +35,7 @@ class RustJITMemoryManager : public SectionMemoryManager
 
     uint64_t getSymbolAddress(const std::string &Name) override
     {
-#if !defined(_WIN32) && !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__Bitrig__)
+#if defined(__linux__) || defined(__APPLE__)
         if (Name == "__morestack" || Name == "___morestack")
             return reinterpret_cast<uint64_t>(__morestack);
         if (Name == "__morestack_addr" || Name == "___morestack_addr")