Add libunwind build script
Not functionnal yet
This commit is contained in:
1 parent
d70ed92ed0
commit
62be46d9c6
2 files changed
+39
-11
No files matched your search
+14
-11
@@ -131,23 +131,26 @@ RUN git clone -b release_38 --depth=1 https://github.com/llvm-mirror/libcxx.git
|
||||
git clone -b release_38 --depth=1 https://github.com/llvm-mirror/libcxxabi.git && \
|
||||
git clone -b release_38 --depth=1 https://github.com/llvm-mirror/libunwind.git
|
||||
|
||||
COPY libunwind-0002.patch /build/patches/
|
||||
|
||||
RUN cd libcxx && \
|
||||
git am /build/patches/libcxx-*.patch
|
||||
|
||||
RUN cd libunwind && \
|
||||
git am /build/patches/libunwind-*.patch
|
||||
|
||||
#RUN cd libunwind && mkdir build && cd build && \
|
||||
# CXXFLAGS="-nodefaultlibs" \
|
||||
# LDFLAGS="/build/prefix/armv7-w64-mingw32/lib/crt2.o /build/prefix/armv7-w64-mingw32/lib/crtbegin.o -lmingw32 /build/prefix/bin/../lib/clang/3.8.1/lib/windows/libclang_rt.builtins-arm.a -lmoldname -lmingwex -lmsvcrt -ladvapi32 -lshell32 -luser32 -lkernel32 /build/prefix/armv7-w64-mingw32/lib/crtend.o" \
|
||||
# cmake \
|
||||
# -DCMAKE_CXX_COMPILER_WORKS=TRUE \
|
||||
# -DLLVM_ENABLE_LIBCXX=TRUE \
|
||||
# -DCMAKE_BUILD_TYPE=Release \
|
||||
# -DLIBUNWIND_ENABLE_SHARED=OFF \
|
||||
# .. && \
|
||||
# make -j4 && \
|
||||
# make install
|
||||
RUN cd libunwind && mkdir build && cd build && \
|
||||
CXXFLAGS="-nodefaultlibs -D_LIBUNWIND_IS_BAREMETAL" \
|
||||
LDFLAGS="/build/prefix/armv7-w64-mingw32/lib/crt2.o /build/prefix/armv7-w64-mingw32/lib/crtbegin.o -lmingw32 /build/prefix/bin/../lib/clang/3.8.1/lib/windows/libclang_rt.builtins-arm.a -lmoldname -lmingwex -lmsvcrt -ladvapi32 -lshell32 -luser32 -lkernel32 /build/prefix/armv7-w64-mingw32/lib/crtend.o" \
|
||||
cmake \
|
||||
-DCMAKE_CXX_COMPILER_WORKS=TRUE \
|
||||
-DLLVM_ENABLE_LIBCXX=TRUE \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DLIBUNWIND_ENABLE_SHARED=OFF \
|
||||
..
|
||||
|
||||
RUN cd libunwind/build && make -j4
|
||||
RUN cd libunwind/build && make install
|
||||
|
||||
RUN cd libcxx && mkdir build && cd build && \
|
||||
CXXFLAGS="-nodefaultlibs -D_GNU_SOURCE -D_LIBCPP_HAS_NO_CONSTEXPR" \
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
From 9d0332b9dac6c5925c827d8b372f3c846da8a639 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo@beauzee.fr>
|
||||
Date: Fri, 13 May 2016 15:07:26 +0200
|
||||
Subject: [PATCH] Define _Unwind_Ptr on windows
|
||||
|
||||
---
|
||||
src/AddressSpace.hpp | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/AddressSpace.hpp b/src/AddressSpace.hpp
|
||||
index ab17d42..8e5fc20 100644
|
||||
--- a/src/AddressSpace.hpp
|
||||
+++ b/src/AddressSpace.hpp
|
||||
@@ -47,6 +47,8 @@ extern "C" _Unwind_Ptr __gnu_Unwind_Find_exidx(_Unwind_Ptr addr, int *len);
|
||||
// Emulate the BSD dl_unwind_find_exidx API when on a GNU libdl system.
|
||||
#define dl_unwind_find_exidx __gnu_Unwind_Find_exidx
|
||||
|
||||
+#elif defined(_WIN32)
|
||||
+typedef void *_Unwind_Ptr;
|
||||
#elif !defined(_LIBUNWIND_IS_BAREMETAL)
|
||||
#include <link.h>
|
||||
#else // !defined(_LIBUNWIND_IS_BAREMETAL)
|
||||
--
|
||||
2.8.1
|
||||
|
||||
Reference in new issue
Block a user