From: Vlad-Andrei BĂDOIU (78692) Date: Sun, 5 May 2019 21:52:02 +0000 (+0000) Subject: Initial port of libeigen to Unikraft X-Git-Tag: RELEASE-0.4^0 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=77cc6d8;p=unikraft%2Flibs%2Feigen.git Initial port of libeigen to Unikraft This is our initial port of libeigen to Unikraft as an external library. Both libcxx and libc are needed. This library should be after libcxx in the dependency list. Signed-off-by: Vlad-Andrei Badoiu Reviewed-by: Felipe Huici --- diff --git a/CODING_STYLE.md b/CODING_STYLE.md new file mode 100644 index 0000000..5730041 --- /dev/null +++ b/CODING_STYLE.md @@ -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 index 0000000..5f55eca --- /dev/null +++ b/CONTRIBUTING.md @@ -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 index 0000000..e5b3642 --- /dev/null +++ b/Config.uk @@ -0,0 +1,4 @@ +menuconfig LIBEIGEN + bool "eigen - C++ template library for linear algebra" + select LIBCXX + default n diff --git a/MAINTAINERS.md b/MAINTAINERS.md new file mode 100644 index 0000000..8684182 --- /dev/null +++ b/MAINTAINERS.md @@ -0,0 +1,11 @@ +Maintainers List +================ + +For notes on how to read this information, please refer to `MAINTAINERS.md` in +the main Unikraft repository. + + LIBEIGEN-UNIKRAFT + M: Felipe Huici + M: Vlad-Andrei Badoiu + L: minios-devel@lists.xen.org + F: * diff --git a/Makefile.uk b/Makefile.uk new file mode 100644 index 0000000..61fe366 --- /dev/null +++ b/Makefile.uk @@ -0,0 +1,83 @@ +# libeigen config file +# +# Authors: Vlad-Andrei Badoiu +# +# Copyright (c) 2019, University Politehnica 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,libeigen,$(CONFIG_LIBEIGEN))) + +ifeq ($(CONFIG_LIBEIGEN),y) +ifneq ($(CONFIG_LIBCXX),y) +$(error Require libcxx) +endif +endif + + +################################################################################ +# Sources +################################################################################ +LIBEIGEN_VERSION=3.3.7 +LIBEIGEN_URL=http://bitbucket.org/eigen/eigen/get/3.3.7.tar.gz +LIBEIGEN_PATCHDIR=$(LIBEIGEN_BASE)/patches +$(eval $(call fetch,libeigen,$(LIBEIGEN_URL))) +$(eval $(call patch,libeigen,$(LIBEIGEN_PATCHDIR),eigen-eigen-323c052e1731)) + +################################################################################ +# Helpers +################################################################################ +LIBEIGEN_SUBDIR=eigen-eigen-323c052e1731 +LIBEIGEN_SRC=$(LIBEIGEN_ORIGIN)/$(LIBEIGEN_SUBDIR) + +################################################################################ +# Library includes +################################################################################ +CINCLUDES-$(CONFIG_LIBEIGEN) += -I$(LIBEIGEN_SRC) +CINCLUDES-$(CONFIG_LIBEIGEN) += -I$(LIBEIGEN_BASE)/include + +CXXINCLUDES-$(CONFIG_LIBEIGEN) += -I$(LIBEIGEN_SRC) +CXXINCLUDES-$(CONFIG_LIBEIGEN) += -I$(LIBEIGEN_BASE)/include + +################################################################################ +# Global flags +################################################################################ +# Suppress some warnings to make the build process look neater +SUPPRESS_FLAGS += -Wno-unused-parameter -Wno-unused-variable -Wno-nonnull \ +-Wno-unused-but-set-variable -Wno-unused-label -Wno-char-subscripts \ +-Wno-unused-function -Wno-missing-field-initializers -Wno-uninitialized \ +-Wno-array-bounds -Wno-maybe-uninitialized -Wno-pointer-sign -Wno-unused-value \ +-Wno-unused-macros -Wno-parentheses -Wno-implicit-function-declaration \ +-Wno-missing-braces -Wno-endif-labels -Wno-unused-but-set-variable \ +-Wno-implicit-function-declaration -Wno-type-limits -Wno-sign-compare + +LIBEIGEN_CFLAGS-y += $(SUPPRESS_FLAGS) +LIBEIGEN_CXXFLAGS-y += $(SUPPRESS_FLAGS) diff --git a/README.md b/README.md new file mode 100644 index 0000000..06d2a7d --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +libeigen for Unikraft +=================== + +Please refer to the `README.md` as well as the documentation in the `doc/` +subdirectory of the main unikraft repository. diff --git a/exportsyms.uk b/exportsyms.uk new file mode 100644 index 0000000..621e94f --- /dev/null +++ b/exportsyms.uk @@ -0,0 +1 @@ +none diff --git a/include/__unikraft_eigen_config.h b/include/__unikraft_eigen_config.h new file mode 100644 index 0000000..c820092 --- /dev/null +++ b/include/__unikraft_eigen_config.h @@ -0,0 +1,35 @@ +/* SPDX-License-Identifier: BSD-3-Clause */ +/* + * Authors: Vlad-Andrei Badoiu +Date: Thu, 2 May 2019 18:53:22 +0300 +Subject: [PATCH 1/1] Add header config file for Unikraft + +Signed-off-by: Vlad-Andrei Badoiu +--- + Eigen/Core | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/Eigen/Core b/Eigen/Core +index b923b8c..dc531cb 100644 +--- a/Eigen/Core ++++ b/Eigen/Core +@@ -11,6 +11,8 @@ + #ifndef EIGEN_CORE_H + #define EIGEN_CORE_H + ++#include <__unikraft_eigen_config.h> ++ + // first thing Eigen does: stop the compiler from committing suicide + #include "src/Core/util/DisableStupidWarnings.h" + +-- +2.21.0 +