From b804c241b32c179c84a0e9033ead29346f855059 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Marie?= Date: Thu, 11 Jun 2015 08:12:07 +0200 Subject: [PATCH] inverse the logic in code inclusion instead of enumerate the (long) list of platforms to exclude, use only the short list of platforms to include. should fixes __morestack symbol problem under openbsd --- src/rustllvm/ExecutionEngineWrapper.cpp | 6 +++--- 1 file 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(__morestack); if (Name == "__morestack_addr" || Name == "___morestack_addr")