]> xenbits.xensource.com Git - unikraft/libs/libcxxabi.git/commitdiff
Initial public release: configuration and build files
authorVlad-Andrei BĂDOIU (78692) <vlad_andrei.badoiu@stud.acs.upb.ro>
Sun, 7 Apr 2019 11:34:48 +0000 (11:34 +0000)
committerFelipe Huici <felipe.huici@neclab.eu>
Wed, 10 Apr 2019 06:58:45 +0000 (08:58 +0200)
This is our initial port of libcxxabi to Unikraft as an external
library. The Makefile should include the following library
dependencies:

...:$(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@stud.acs.upb.ro>
Reviewed-by: Felipe Huici <felipe.huici@neclab.eu>
CODING_STYLE.md [new file with mode: 0644]
CONTRIBUTING.md [new file with mode: 0644]
Config.uk [new file with mode: 0644]
MAINTAINERS.md [new file with mode: 0644]
Makefile.uk [new file with mode: 0644]
README.md [new file with mode: 0644]

diff --git a/CODING_STYLE.md b/CODING_STYLE.md
new file mode 100644 (file)
index 0000000..5730041
--- /dev/null
@@ -0,0 +1,4 @@
+Coding Style
+============
+
+Please refer to the `CODING_STYLE.md` file in the main Unikraft repository.
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644 (file)
index 0000000..5f55eca
--- /dev/null
@@ -0,0 +1,4 @@
+Contributing to Unikraft
+=======================
+
+Please refer to the `CONTRIBUTING.md` file in the main Unikraft repository.
diff --git a/Config.uk b/Config.uk
new file mode 100644 (file)
index 0000000..9e96041
--- /dev/null
+++ b/Config.uk
@@ -0,0 +1,4 @@
+menuconfig LIBCXXABI
+    bool "libcxxabi - c++ abi"
+       select LIBUNWIND
+    default n
diff --git a/MAINTAINERS.md b/MAINTAINERS.md
new file mode 100644 (file)
index 0000000..e2aa947
--- /dev/null
@@ -0,0 +1,11 @@
+Maintainers List
+================
+
+For notes on how to read this information, please refer to `MAINTAINERS.md` in
+the main Unikraft repository.
+
+       NEWLIB-UNIKRAFT
+       M:      Felipe Huici <felipe.huici@neclab.eu>
+       M:      Vlad-Andrei Badoiu <vlad_andrei.badoiu@stud.acs.upb.ro>
+       L:      minios-devel@lists.xen.org
+       F: *
diff --git a/Makefile.uk b/Makefile.uk
new file mode 100644 (file)
index 0000000..fbb00bc
--- /dev/null
@@ -0,0 +1,95 @@
+#  libcxxabi Makefile.uk
+#
+#  Authors: Vlad-Andrei Badoiu <vlad_andrei.badoiu@stud.acs.upb.ro>
+#
+#  Copyright (c) 2019, Politehnica University of Bucharest. 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,libcxxabi,$(CONFIG_LIBCXXABI)))
+
+ifeq ($(CONFIG_LIBCXXABI),y)
+ifneq ($(CONFIG_LIBUNWIND),y)
+$(error Require libunwind)
+endif
+endif
+
+################################################################################
+# Sources
+################################################################################
+LIBCXXABI_VERSION=7.0.0
+LIBCXXABI_URL=http://releases.llvm.org/$(LIBCXXABI_VERSION)/libcxxabi-$(LIBCXXABI_VERSION).src.tar.xz
+LIBCXXABI_PATCHDIR=$(LIBCXXABI_BASE)/patches
+$(eval $(call fetch,libcxxabi,$(LIBCXXABI_URL)))
+
+################################################################################
+# Helpers
+################################################################################
+LIBCXXABI_SUBDIR=libcxxabi-$(LIBCXXABI_VERSION).src
+LIBCXXABI_SRC=$(LIBCXXABI_ORIGIN)/$(LIBCXXABI_SUBDIR)
+
+################################################################################
+# Library includes
+################################################################################
+CINCLUDES-$(CONFIG_LIBCXXABI) += -I$(LIBCXXABI_SRC)/src
+CINCLUDES-$(CONFIG_LIBCXXABI) += -I$(LIBCXXABI_SRC)/include
+CXXINCLUDES-$(CONFIG_LIBCXXABI) += -I$(LIBCXXABI_SRC)/src
+CXXINCLUDES-$(CONFIG_LIBCXXABI) += -I$(LIBCXXABI_SRC)/include
+
+################################################################################
+# Global flags
+################################################################################
+CONFIG_FLAGS   +=      -D _LIBCXXABI_HAS_NO_THREADS
+LIBCXXABI_CFLAGS-y    +=  $(CONFIG_FLAGS)
+LIBCXXABI_CXXFLAGS-y    +=  $(CONFIG_FLAGS)
+
+################################################################################
+# Library sources
+################################################################################
+LIBCXXABI_SRCS-y += $(LIBCXXABI_SRC)/src/cxa_exception.cpp
+LIBCXXABI_SRCS-y += $(LIBCXXABI_SRC)/src/cxa_exception_storage.cpp
+LIBCXXABI_SRCS-y += $(LIBCXXABI_SRC)/src/cxa_virtual.cpp
+LIBCXXABI_SRCS-y += $(LIBCXXABI_SRC)/src/abort_message.cpp
+LIBCXXABI_SRCS-y += $(LIBCXXABI_SRC)/src/stdlib_exception.cpp
+LIBCXXABI_SRCS-y += $(LIBCXXABI_SRC)/src/cxa_demangle.cpp
+LIBCXXABI_SRCS-y += $(LIBCXXABI_SRC)/src/stdlib_typeinfo.cpp
+LIBCXXABI_SRCS-y += $(LIBCXXABI_SRC)/src/fallback_malloc.cpp
+LIBCXXABI_SRCS-y += $(LIBCXXABI_SRC)/src/cxa_aux_runtime.cpp
+LIBCXXABI_SRCS-y += $(LIBCXXABI_SRC)/src/stdlib_new_delete.cpp
+LIBCXXABI_SRCS-y += $(LIBCXXABI_SRC)/src/cxa_personality.cpp
+LIBCXXABI_SRCS-y += $(LIBCXXABI_SRC)/src/cxa_vector.cpp
+LIBCXXABI_SRCS-y += $(LIBCXXABI_SRC)/src/stdlib_stdexcept.cpp
+LIBCXXABI_SRCS-y += $(LIBCXXABI_SRC)/src/cxa_unexpected.cpp
+LIBCXXABI_SRCS-y += $(LIBCXXABI_SRC)/src/private_typeinfo.cpp
+LIBCXXABI_SRCS-y += $(LIBCXXABI_SRC)/src/cxa_handlers.cpp
+LIBCXXABI_SRCS-y += $(LIBCXXABI_SRC)/src/cxa_default_handlers.cpp
+LIBCXXABI_SRCS-y += $(LIBCXXABI_SRC)/src/cxa_guard.cpp
diff --git a/README.md b/README.md
new file mode 100644 (file)
index 0000000..b5ae250
--- /dev/null
+++ b/README.md
@@ -0,0 +1,5 @@
+libcxxabi for Unikraft
+===================
+
+Please refer to the `README.md` as well as the documentation in the `doc/`
+subdirectory of the main unikraft repository.