In the dependency list it should stay as follows:
...:$(UK_LIBS)/libunwind:$(UK_LIBS)/compiler-rt:
$(UK_LIBS)/libcxxabi:$(UK_LIBS)/libcxx:$(UK_LIBS)/newlib:...
Signed-off-by: Vlad-Andrei Badoiu <
vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
---
Config.uk | 5 ++
Makefile.uk | 89 ++++++++++++++++++++++++++++++
exportsyms.uk | 9 +++
patches/0001-Updated-the-RIP.patch | 32 +++++++++++
4 files changed, 135 insertions(+)
create mode 100644
Config.uk
create mode 100644
Makefile.uk
create mode 100644
exportsyms.uk
create mode 100644 patches/0001-Updated-the-RIP.patch
diff --git a/
Config.uk b/
Config.uk
new file mode 100644
index 0000000..320363a
--- /dev/null
+++ b/
Config.uk
@@ -0,0 +1,5 @@
+menuconfig LIBUNWIND
+ bool "libunwind - unwinder"
+
select LIBNOLIBC if !HAVE_LIBC
+
select LIBCOMPILER_RT
+ default n
diff --git a/
Makefile.uk b/
Makefile.uk
new file mode 100644
index 0000000..9547852
--- /dev/null
+++ b/
Makefile.uk
@@ -0,0 +1,89 @@
+# libunwind
Makefile.uk
+#
+# Authors: Vlad-Andrei Badoiu <
vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
+#
+# Copyright (c) 2019, NEC Europe Ltd., NEC Corporation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of the copyright holder nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+# THIS HEADER MAY NOT BE EXTRACTED OR MODIFIED IN ANY WAY.
+#
+
+
+################################################################################
+# Library registration
+################################################################################
+$(eval $(call addlib_s,libunwind,$(CONFIG_LIBUNWIND)))
+
+ifeq ($(CONFIG_LIBUNWIND),y)
+ifneq ($(CONFIG_LIBCOMPILER_RT),y)
+$(error Require libcompiler_rt)
+endif
+endif
+
+################################################################################
+# Sources
+################################################################################
+LIBUNWIND_VERSION=7.0.0
+LIBUNWIND_URL=
http://releases.llvm.org/$(LIBUNWIND_VERSION)/libunwind-$(LIBUNWIND_VERSION).src.tar.xz
+LIBUNWIND_PATCHDIR=$(LIBUNWIND_BASE)/patches
+$(eval $(call fetch,libunwind,$(LIBUNWIND_URL)))
+$(eval $(call patch,libunwind,$(LIBUNWIND_PATCHDIR),libunwind-$(LIBUNWIND_VERSION).src))
+
+################################################################################
+# Helpers
+################################################################################
+LIBUNWIND_SUBDIR=libunwind-$(LIBUNWIND_VERSION).src
+LIBUNWIND_SRC=$(LIBUNWIND_ORIGIN)/$(LIBUNWIND_SUBDIR)
+
+################################################################################
+# Library includes
+################################################################################
+CINCLUDES-$(CONFIG_LIBUNWIND) += -I$(LIBUNWIND_SRC)/src
+CINCLUDES-$(CONFIG_LIBUNWIND) += -I$(LIBUNWIND_SRC)/include
+CXXINCLUDES-$(CONFIG_LIBUNWIND) += -I$(LIBUNWIND_SRC)/src
+CXXINCLUDES-$(CONFIG_LIBUNWIND) += -I$(LIBUNWIND_SRC)/include
+
+CXXINCLUDES-$(CONFIG_LIBUNWIND) += -I$(LIBUNWIND_BASE)/include
+CINCLUDES-$(CONFIG_LIBUNWIND) += -I$(LIBUNWIND_BASE)/include
+
+################################################################################
+# Global flags
+################################################################################
+CONFIG_FLAGS += -D _LIBUNWIND_HAS_NO_THREADS -D __ELF__ -D _LIBUNWIND_IS_NATIVE_ONLY -D _LIBUNWIND_SUPPORT_DWARF_UNWIND -D _LIBUNWIND_IS_BAREMETAL -D _LIBUNWIND_BUILD_ZERO_COST_APIS -D _LIBUNWIND_TARGET_X86_64 -D __x86_64__