]> xenbits.xensource.com Git - unikraft/libs/eigen.git/commitdiff
Initial port of libeigen to Unikraft RELEASE-0.4
authorVlad-Andrei BĂDOIU (78692) <vlad_andrei.badoiu@stud.acs.upb.ro>
Sun, 5 May 2019 21:52:02 +0000 (21:52 +0000)
committerFelipe Huici <felipe.huici@neclab.eu>
Mon, 6 May 2019 09:10:31 +0000 (11:10 +0200)
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 <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]
exportsyms.uk [new file with mode: 0644]
include/__unikraft_eigen_config.h [new file with mode: 0644]
patches/0001-Add-header-config-file-for-Unikraft.patch [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..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 (file)
index 0000000..8684182
--- /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.
+
+       LIBEIGEN-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..61fe366
--- /dev/null
@@ -0,0 +1,83 @@
+#  libeigen config file
+#
+#  Authors: Vlad-Andrei Badoiu <vlad_andrei.badoiu@stud.acs.upb.ro>
+#
+#  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 (file)
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 (file)
index 0000000..621e94f
--- /dev/null
@@ -0,0 +1 @@
+none
diff --git a/include/__unikraft_eigen_config.h b/include/__unikraft_eigen_config.h
new file mode 100644 (file)
index 0000000..c820092
--- /dev/null
@@ -0,0 +1,35 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/*
+ * Authors: Vlad-Andrei Badoiu <vlad_andrei.badoiu@stud.acs.upb.ro
+ *
+ * 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.
+ */
+
+#define EIGEN_DONT_VECTORIZE
diff --git a/patches/0001-Add-header-config-file-for-Unikraft.patch b/patches/0001-Add-header-config-file-for-Unikraft.patch
new file mode 100644 (file)
index 0000000..9259de8
--- /dev/null
@@ -0,0 +1,26 @@
+From a42a344157b73cd2562259358136a1c72b02f4c1 Mon Sep 17 00:00:00 2001
+From: Vlad-Andrei Badoiu <vlad_andrei.badoiu@stud.acs.upb.ro>
+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 <vlad_andrei.badoiu@stud.acs.upb.ro>
+---
+ 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
+