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

[Minios-devel] [UNIKRAFT PATCH] lib/uktime: Introduce time functions library skeleton


  • To: minios-devel@xxxxxxxxxxxxx
  • From: Costin Lupu <costin.lupu@xxxxxxxxx>
  • Date: Mon, 9 Sep 2019 16:04:58 +0300
  • Cc: felipe.huici@xxxxxxxxx, simon.kuenzer@xxxxxxxxx, vlad_andrei.badoiu@xxxxxxxxxxxxxxx
  • Delivery-date: Mon, 09 Sep 2019 13:05:11 +0000
  • Ironport-phdr: 9a23:sX+L2hBER8dTmQZUDcKoUyQJP3N1i/DPJgcQr6AfoPdwSPX9o8bcNUDSrc9gkEXOFd2Cra4d0ayP4/6rBDJIyK3CmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TW94jEIBxrwKxd+KPjrFY7OlcS30P2594HObwlSizexfK1+IA+roQjSt8QajotvJ6cswRbVv3VEfPhby3l1LlyJhRb84cmw/J9n8ytOvv8q6tBNX6bncakmVLJUFDspPXw7683trhnDUBCA5mAAXWUMkxpHGBbK4RfnVZrsqCT6t+592C6HPc3qSL0/RDqv47t3RBLulSwKMSMy/mPKhcxqlK9VoAyvqQFxzYDXZ4+aO+ZxcKzGcNMGXGpMRNpdWjZdDo6+aYYEEuoPPfxfr4n4v1YDsxy+BRKwBOPuzD9Dm3n43bAi0+Q8DArL2xAvH9UVsHTIrdX1Mr0eUeSozKnQ0DXOdO9Z2Szn5IjQbxAuuuuAXah3ccfIz0QkCgDLjk2IpID4MD6Zy/4Bvmub4uZ6S+6jlWwqpxt/rzS328shhZTFipgWx13E7yl13og4KNOiREJmbtOoDp1dvDyAOYRsWMMtWWRotT4/yr0BpJG0YjAHyI8ixx7Dc/yHdJWI4g77WOaRPzh4gHVldaqhhxa360egy+n8WtOo31ZRtCZFisTMuWsX2xzJ7ciLUvp9/kG/1jaTzw3f9+5JLV0umafYK5Mt2KA8moQRvEjZECL6gED2g7WXdkUg9Oio8ePnYrD+q5CAMI90kR3+MqUomsClBeQ4LxAOX3WA9Ougz73v51X5QKhRgfEsiKnZt4jWJd4Hqa6hHw9VzoEj5g66Dzen1tQYnH4HLElcdB2akYfpJU/BIPTjAPe7glSsiytrx+vcMrzuHJrNKGLPkLD7fbZy80Rc0hY8zchD55JIDbEMOPzzVVH1tNzZFh82LRa4w+b6CNV8yoweWHmCAqmHP6zOtV+H/PkgL/OSa48IoDz9MeQq5+byjX8lnl8QZbKp3ZoSaHC/GPRqOUaZYWfyjdcHEGYFoBA+QffsiFKcTTFTY2y9ULkm6j4lFYKsFZ3DSZy1gLydwCe7GYVbZn5CCl+WDHjnb5+LW/ERZyKIPMBhkyYIWqO7RIA80hGutRL6xqF8LurI5y0XqIjv28Jp6O3Ijx0y6CR0AN+H32GXSGEn1l8PEjo32qF4uglxx0mO1YB8gudEDppD6vUPVR01ZrDGyOkvINfpRgPHNvOUUEvuFt6hGi0wSJQ13scTS01mXc2/hFbZ2Hz5UPcui7WXCclsoern1H/rKpMlxg==
  • Ironport-sdr: 3D7kKFlGil5+nCC2ILrkoIcJ4ruEtp2S3a+4ZHb8TywZ0USazF8RbvNRsfhsoXzuUFQSjgqBcF VGTnzAjvaJUQ==
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>

Until now, the time functions were added one by one in both nolibc and newlib
glue code. This meant that one had to make the exact same changes in both
Unikraft and newlib repos. The major drawback is that one can forget to
duplicate the changes in the other library and this has already happened
several times. Now, given that both nolibc and newlib miss these time
functions, it makes more sense to provide an internal library for all of them -
i.e. keeping them in one place instead of more.

Some of the functions are implemented from scratch, but some may be imported
from other libraries. For those imported from musl we will keep the same
hierarchy under the musl-imported/ subdirectory, just like we do it for newlib
glue code. That's why we also add the musl COPYRIGHT.

Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx>
---
 lib/Config.uk                      |   1 +
 lib/Makefile.uk                    |   1 +
 lib/uktime/Config.uk               |   3 +
 lib/uktime/Makefile.uk             |   4 +
 lib/uktime/exportsyms.uk           |   1 +
 lib/uktime/musl-imported/COPYRIGHT | 189 +++++++++++++++++++++++++++++
 6 files changed, 199 insertions(+)
 create mode 100644 lib/uktime/Config.uk
 create mode 100644 lib/uktime/Makefile.uk
 create mode 100644 lib/uktime/exportsyms.uk
 create mode 100644 lib/uktime/musl-imported/COPYRIGHT

diff --git a/lib/Config.uk b/lib/Config.uk
index 30ec094d..f0d62054 100644
--- a/lib/Config.uk
+++ b/lib/Config.uk
@@ -53,3 +53,4 @@ source "lib/uknetdev/Config.uk"
 source "lib/uk9p/Config.uk"
 source "lib/posix-libdl/Config.uk"
 source "lib/uklibparam/Config.uk"
+source "lib/uktime/Config.uk"
diff --git a/lib/Makefile.uk b/lib/Makefile.uk
index 89a57d70..a1697198 100644
--- a/lib/Makefile.uk
+++ b/lib/Makefile.uk
@@ -30,3 +30,4 @@ $(eval $(call _import_lib,$(CONFIG_UK_BASE)/lib/uknetdev))
 $(eval $(call _import_lib,$(CONFIG_UK_BASE)/lib/uk9p))
 $(eval $(call _import_lib,$(CONFIG_UK_BASE)/lib/posix-libdl))
 $(eval $(call _import_lib,$(CONFIG_UK_BASE)/lib/uklibparam))
+$(eval $(call _import_lib,$(CONFIG_UK_BASE)/lib/uktime))
diff --git a/lib/uktime/Config.uk b/lib/uktime/Config.uk
new file mode 100644
index 00000000..a68e3f4e
--- /dev/null
+++ b/lib/uktime/Config.uk
@@ -0,0 +1,3 @@
+config LIBUKTIME
+       bool "uktime: Time functions"
+       default n
\ No newline at end of file
diff --git a/lib/uktime/Makefile.uk b/lib/uktime/Makefile.uk
new file mode 100644
index 00000000..9c1f8b35
--- /dev/null
+++ b/lib/uktime/Makefile.uk
@@ -0,0 +1,4 @@
+$(eval $(call addlib_s,libuktime,$(CONFIG_LIBUKTIME)))
+
+CINCLUDES-$(CONFIG_LIBUKTIME)    += -I$(LIBUKTIME_BASE)/include
+CXXINCLUDES-$(CONFIG_LIBUKTIME)  += -I$(LIBUKTIME_BASE)/include
diff --git a/lib/uktime/exportsyms.uk b/lib/uktime/exportsyms.uk
new file mode 100644
index 00000000..c86c3f35
--- /dev/null
+++ b/lib/uktime/exportsyms.uk
@@ -0,0 +1 @@
+none
\ No newline at end of file
diff --git a/lib/uktime/musl-imported/COPYRIGHT 
b/lib/uktime/musl-imported/COPYRIGHT
new file mode 100644
index 00000000..2525ffb5
--- /dev/null
+++ b/lib/uktime/musl-imported/COPYRIGHT
@@ -0,0 +1,189 @@
+musl as a whole is licensed under the following standard MIT license:
+
+----------------------------------------------------------------------
+Copyright © 2005-2019 Rich Felker, et al.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+----------------------------------------------------------------------
+
+Authors/contributors include:
+
+A. Wilcox
+Alex Dowad
+Alex Suykov
+Alexander Monakov
+Andre McCurdy
+Andrew Kelley
+Anthony G. Basile
+Aric Belsito
+Arvid Picciani
+Bartosz Brachaczek
+Benjamin Peterson
+Bobby Bingham
+Boris Brezillon
+Brent Cook
+Chris Spiegel
+Clément Vasseur
+Daniel Micay
+Daniel Sabogal
+Daurnimator
+David Carlier
+David Edelsohn
+Denys Vlasenko
+Dmitry Ivanov
+Dmitry V. Levin
+Drew DeVault
+Emil Renner Berthing
+Fangrui Song
+Felix Fietkau
+Felix Janda
+Gianluca Anzolin
+Hauke Mehrtens
+He X
+Hiltjo Posthuma
+Isaac Dunham
+Jaydeep Patil
+Jens Gustedt
+Jeremy Huntwork
+Jo-Philipp Wich
+Joakim Sindholt
+John Spencer
+Josiah Worcester
+Julien Ramseier
+Justin Cormack
+Kaarle Ritvanen
+Khem Raj
+Kylie McClain
+Leah Neukirchen
+Luca Barbato
+Luka Perkov
+M Farkas-Dyck (Strake)
+Mahesh Bodapati
+Markus Wichmann
+Masanori Ogino
+Michael Clark
+Michael Forney
+Mikhail Kremnyov
+Natanael Copa
+Nicholas J. Kain
+orc
+Pascal Cuoq
+Patrick Oppenlander
+Petr Hosek
+Petr Skocik
+Pierre Carrier
+Reini Urban
+Rich Felker
+Richard Pennington
+Ryan Fairfax
+Samuel Holland
+Segev Finer
+Shiz
+sin
+Solar Designer
+Stefan Kristiansson
+Stefan O'Rear
+Szabolcs Nagy
+Timo Teräs
+Trutz Behn
+Valentin Ochs
+Will Dietz
+William Haddon
+William Pitcock
+
+Portions of this software are derived from third-party works licensed
+under terms compatible with the above MIT license:
+
+The TRE regular expression implementation (src/regex/reg* and
+src/regex/tre*) is Copyright © 2001-2008 Ville Laurikari and licensed
+under a 2-clause BSD license (license text in the source files). The
+included version has been heavily modified by Rich Felker in 2012, in
+the interests of size, simplicity, and namespace cleanliness.
+
+Much of the math library code (src/math/* and src/complex/*) is
+Copyright © 1993,2004 Sun Microsystems or
+Copyright © 2003-2011 David Schultz or
+Copyright © 2003-2009 Steven G. Kargl or
+Copyright © 2003-2009 Bruce D. Evans or
+Copyright © 2008 Stephen L. Moshier
+and labelled as such in comments in the individual source files. All
+have been licensed under extremely permissive terms.
+
+The ARM memcpy code (src/string/arm/memcpy_el.S) is Copyright © 2008
+The Android Open Source Project and is licensed under a two-clause BSD
+license. It was taken from Bionic libc, used on Android.
+
+The implementation of DES for crypt (src/crypt/crypt_des.c) is
+Copyright © 1994 David Burren. It is licensed under a BSD license.
+
+The implementation of blowfish crypt (src/crypt/crypt_blowfish.c) was
+originally written by Solar Designer and placed into the public
+domain. The code also comes with a fallback permissive license for use
+in jurisdictions that may not recognize the public domain.
+
+The smoothsort implementation (src/stdlib/qsort.c) is Copyright © 2011
+Valentin Ochs and is licensed under an MIT-style license.
+
+The x86_64 port was written by Nicholas J. Kain and is licensed under
+the standard MIT terms.
+
+The mips and microblaze ports were originally written by Richard
+Pennington for use in the ellcc project. The original code was adapted
+by Rich Felker for build system and code conventions during upstream
+integration. It is licensed under the standard MIT terms.
+
+The mips64 port was contributed by Imagination Technologies and is
+licensed under the standard MIT terms.
+
+The powerpc port was also originally written by Richard Pennington,
+and later supplemented and integrated by John Spencer. It is licensed
+under the standard MIT terms.
+
+All other files which have no copyright comments are original works
+produced specifically for use as part of this library, written either
+by Rich Felker, the main author of the library, or by one or more
+contibutors listed above. Details on authorship of individual files
+can be found in the git version control history of the project. The
+omission of copyright and license comments in each file is in the
+interest of source tree size.
+
+In addition, permission is hereby granted for all public header files
+(include/* and arch/*/bits/*) and crt files intended to be linked into
+applications (crt/*, ldso/dlstart.c, and arch/*/crt_arch.h) to omit
+the copyright notice and permission notice otherwise required by the
+license, and to use these files without any requirement of
+attribution. These files include substantial contributions from:
+
+Bobby Bingham
+John Spencer
+Nicholas J. Kain
+Rich Felker
+Richard Pennington
+Stefan Kristiansson
+Szabolcs Nagy
+
+all of whom have explicitly granted such permission.
+
+This file previously contained text expressing a belief that most of
+the files covered by the above exception were sufficiently trivial not
+to be subject to copyright, resulting in confusion over whether it
+negated the permissions granted in the license. In the spirit of
+permissive licensing, and of not having licensing issues being an
+obstacle to adoption, that text has been removed.
-- 
2.20.1


_______________________________________________
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®.