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

Re: [Minios-devel] [UNIKRAFT PATCH] lib/nolibc: Imply uktime for time functions


  • To: minios-devel@xxxxxxxxxxxxx
  • From: Costin Lupu <costin.lupu@xxxxxxxxx>
  • Date: Tue, 15 Oct 2019 19:54:05 +0300
  • Cc: felipe.huici@xxxxxxxxx
  • Delivery-date: Tue, 15 Oct 2019 16:54:11 +0000
  • Ironport-sdr: ZPkHctzGZt9pp+vly8genB1BRx43ZlD/g8kq/cGFXA353HBr3SlHDyzRi8g4/vmbeMYvUzvI6w 59sGq4NPJV7w==
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>

This should be applied right after `Make changes for fixing compilation
warnings with` series.

Costin

On 10/15/19 7:43 PM, Costin Lupu wrote:
> We choose to _imply_ uktime in order to support time functions transparently.
> When configurating, the user will have the option to disable uktime in order 
> to
> build a minimal nolibc.
> 
> This patch introduces a new feature flag, HAVE_TIME, which indicates whether
> time-related functions are enabled.
> 
> Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx>
> ---
>  lib/Config.uk                                   | 4 ++++
>  lib/nolibc/Config.uk                            | 1 +
>  lib/nolibc/include/nolibc-internal/shareddefs.h | 2 ++
>  lib/uktime/Config.uk                            | 1 +
>  4 files changed, 8 insertions(+)
> 
> diff --git a/lib/Config.uk b/lib/Config.uk
> index 44311de3..7565257d 100644
> --- a/lib/Config.uk
> +++ b/lib/Config.uk
> @@ -13,6 +13,10 @@ config HAVE_LIBC
>         bool
>         default n
>  
> +config HAVE_TIME
> +       bool
> +       default n
> +
>  config HAVE_SCHED
>         bool
>         default n
> diff --git a/lib/nolibc/Config.uk b/lib/nolibc/Config.uk
> index a81aaece..0b7e8025 100644
> --- a/lib/nolibc/Config.uk
> +++ b/lib/nolibc/Config.uk
> @@ -2,6 +2,7 @@ menuconfig LIBNOLIBC
>       bool "nolibc: Only neccessary subset of libc functionality"
>       depends on !HAVE_LIBC
>       default y if !HAVE_LIBC
> +     imply LIBUKTIME
>  
>  if LIBNOLIBC
>       config LIBNOLIBC_UKDEBUG_ASSERT
> diff --git a/lib/nolibc/include/nolibc-internal/shareddefs.h 
> b/lib/nolibc/include/nolibc-internal/shareddefs.h
> index a1661081..27e01294 100644
> --- a/lib/nolibc/include/nolibc-internal/shareddefs.h
> +++ b/lib/nolibc/include/nolibc-internal/shareddefs.h
> @@ -65,7 +65,9 @@ typedef __off off_t;
>  #define __DEFINED_off_t
>  #endif
>  
> +#if CONFIG_HAVE_TIME
>  #include <uk/time_types.h>
> +#endif
>  
>  #if (defined __NEED_mode_t && !defined __DEFINED_mode_t)
>  typedef unsigned mode_t;
> diff --git a/lib/uktime/Config.uk b/lib/uktime/Config.uk
> index 1c634f27..1892c4ef 100644
> --- a/lib/uktime/Config.uk
> +++ b/lib/uktime/Config.uk
> @@ -1,3 +1,4 @@
>  config LIBUKTIME
>         bool "uktime: Time functions"
>         default n
> +       select HAVE_TIME
> 

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