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

Re: [Minios-devel] [UNIKRAFT/NEWLIB PATCH] build: export -D__DYNAMIC_REENT__ to global C[XX]FLAGS if used



Thanks, Florian!

Reviewed-by: Costin Lupu <costin.lupu@xxxxxxxxx>

On 5/10/19 11:49 AM, Florian Schmidt wrote:
> __DYNAMIC_REENT__ is used as a preprocessor flag in several public
> header files (most importantly, stdio.h). This means that if newlib is
> compiled with one set of flags and the rest of the build with another,
> the header file and the implementation don't match. This leads to
> problems such as stdin/stdoud/stderr not working because they always use
> the (non-functional) versions inside _impure_data instead instead of the
> current environment's private _reent struct.
> 
> Signed-off-by: Florian Schmidt <florian.schmidt@xxxxxxxxx>
> ---
>  Makefile.uk | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/Makefile.uk b/Makefile.uk
> index 82e4e6e..f49264e 100644
> --- a/Makefile.uk
> +++ b/Makefile.uk
> @@ -318,7 +318,8 @@ LIBNEWLIBC_SRCS-y += $(LIBNEWLIB_LIBC)/posix/regfree.c
>  
> ################################################################################
>  ifeq ($(CONFIG_HAVE_SCHED),y)
>  # if scheduling enabled, then Unikraft provides __getreent()
> -LIBNEWLIBC_CFLAGS-y += -D__DYNAMIC_REENT__
> +CFLAGS-$(CONFIG_LIBNEWLIBC) += -D__DYNAMIC_REENT__
> +CXXFLAGS-$(CONFIG_LIBNEWLIBC) += -D__DYNAMIC_REENT__
>  else
>  LIBNEWLIBC_SRCS-y += $(LIBNEWLIB_LIBC)/reent/getreent.c
>  endif
> 

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