[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT/LIBEIGEN PATCH 2/2] Initial port of libcxx to Unikraft



This is our initial port of libcxx 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@xxxxxxxxxxxxxxx>
---
 CODING_STYLE.md                               |  4 +
 CONTRIBUTING.md                               |  4 +
 Config.uk                                     |  3 +
 MAINTAINERS.md                                | 11 +++
 Makefile.uk                                   | 76 +++++++++++++++++++
 README.md                                     |  5 ++
 exportsyms.uk                                 |  1 +
 include/__unikraft_eigen_config.h             | 35 +++++++++
 ...-Add-header-config-file-for-Unikraft.patch | 26 +++++++
 9 files changed, 165 insertions(+)
 create mode 100644 CODING_STYLE.md
 create mode 100644 CONTRIBUTING.md
 create mode 100644 Config.uk
 create mode 100644 MAINTAINERS.md
 create mode 100644 Makefile.uk
 create mode 100644 README.md
 create mode 100644 exportsyms.uk
 create mode 100644 include/__unikraft_eigen_config.h
 create mode 100644 patches/0001-Add-header-config-file-for-Unikraft.patch

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..db7535c
--- /dev/null
+++ b/Config.uk
@@ -0,0 +1,3 @@
+menuconfig LIBEIGEN
+    bool "C++ template library for linear algebra"
+    default n
diff --git a/MAINTAINERS.md b/MAINTAINERS.md
new file mode 100644
index 0000000..ddcf3ca
--- /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.
+
+       LIBCXX-UNIKRAFT
+       M:      Felipe Huici <felipe.huici@xxxxxxxxx>
+       M:      Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
+       L:      minios-devel@xxxxxxxxxxxxx
+       F: *
diff --git a/Makefile.uk b/Makefile.uk
new file mode 100644
index 0000000..3e9198b
--- /dev/null
+++ b/Makefile.uk
@@ -0,0 +1,76 @@
+#  libeigen config file
+#
+#  Authors: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
+#
+#  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)))
+
+################################################################################
+# 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 <vlad_andrei.badoiu@xxxxxxxxxxxxxxx
+ *
+ * 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
index 0000000..9259de8
--- /dev/null
+++ b/patches/0001-Add-header-config-file-for-Unikraft.patch
@@ -0,0 +1,26 @@
+From a42a344157b73cd2562259358136a1c72b02f4c1 Mon Sep 17 00:00:00 2001
+From: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
+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@xxxxxxxxxxxxxxx>
+---
+ 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
+
-- 
2.21.0

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.