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

Re: [Minios-devel] [UNIKRAFT/RUBY PATCH 12/16] encodings: Build extensions



Reviewed-by: Stefan Teodorescu <stefanl.teodorescu@xxxxxxxxx>

On Sun, Dec 8, 2019 at 11:56 AM Costin Lupu <costin.lupu@xxxxxxxxx> wrote:
>
> All encodings are included in a new library, libruby_enc. Given that the
> extensions files are generated at build time by the origin build system, we
> also have to run `./configure` and `make` for the original build before
> building them for Unikraft. This is done once for both extensions and
> encodings.
>
> Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx>
> ---
>  Config.uk   |  6 +++++
>  Makefile.uk | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 84 insertions(+)
>
> diff --git a/Config.uk b/Config.uk
> index ff44fd7..b4c5bff 100644
> --- a/Config.uk
> +++ b/Config.uk
> @@ -123,4 +123,10 @@ config LIBRUBY_EXT
>                 bool "sdbm"
>                 default y
>         endif
> +
> +config LIBRUBY_ENC
> +       bool "Enable encodings"
> +       depends on !LIBRUBY_MINI
> +       default y
> +
>  endif
> diff --git a/Makefile.uk b/Makefile.uk
> index 42d3348..9f66606 100644
> --- a/Makefile.uk
> +++ b/Makefile.uk
> @@ -40,6 +40,7 @@
>  
> ################################################################################
>  $(eval $(call addlib_s,libruby,$(CONFIG_LIBRUBY)))
>  $(eval $(call addlib_s,libruby_ext,$(CONFIG_LIBRUBY_EXT)))
> +$(eval $(call addlib_s,libruby_enc,$(CONFIG_LIBRUBY_ENC)))
>
>  
> ################################################################################
>  # Sources
> @@ -461,7 +462,81 @@ LIBRUBY_EXT_SRCS-y += $(LIBRUBY_SRC)/ext/sdbm/init.c|sdbm
>  LIBRUBY_EXT_INIT_FLAGS-y += -I$(LIBRUBY_BASE)/generated/ext/sdbm
>  endif
>
> +################################################################################
> +# Encodings
> +################################################################################
> +LIBRUBY_ENC_CFLAGS-y += $(LIBRUBY_CINCLUDES-y)
> +LIBRUBY_ENC_CFLAGS-y += $(LIBRUBY_SUPPRESS_FLAGS)
> +LIBRUBY_ENC_CFLAGS-y += -DRUBY_EXPORT=1 -DONIG_ENC_REGISTER=rb_enc_register
> +
> +ifeq ($(CONFIG_LIBRUBY_ENC),y)
> +LIBRUBY_SRCS-y += $(LIBRUBY_BASE)/generated/enc/encinit.c
> +else
>  LIBRUBY_SRCS-y += $(LIBRUBY_SRC)/dmyenc.c
> +endif
> +
> +# enc/libenc.a
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/encdb.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/big5.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/cp949.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/emacs_mule.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/euc_jp.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/euc_kr.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/euc_tw.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/gb2312.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/gb18030.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/gbk.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/iso_8859_1.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/iso_8859_2.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/iso_8859_3.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/iso_8859_4.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/iso_8859_5.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/iso_8859_6.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/iso_8859_7.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/iso_8859_8.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/iso_8859_9.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/iso_8859_10.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/iso_8859_11.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/iso_8859_13.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/iso_8859_14.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/iso_8859_15.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/iso_8859_16.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/koi8_r.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/koi8_u.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/shift_jis.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/utf_16be.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/utf_16le.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/utf_32be.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/utf_32le.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/windows_31j.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/windows_1250.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/windows_1251.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/windows_1252.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/windows_1253.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/windows_1254.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/windows_1257.c
> +
> +# enc/libtrans.a
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/trans/transdb.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/trans/big5.c|trans
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/trans/chinese.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/trans/ebcdic.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/trans/emoji.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/trans/emoji_iso2022_kddi.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/trans/emoji_sjis_docomo.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/trans/emoji_sjis_kddi.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/trans/emoji_sjis_softbank.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/trans/escape.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/trans/gb18030.c|trans
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/trans/gbk.c|trans
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/trans/iso2022.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/trans/japanese.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/trans/japanese_euc.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/trans/japanese_sjis.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/trans/korean.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/trans/single_byte.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/trans/utf8_mac.c
> +LIBRUBY_ENC_SRCS-y += $(LIBRUBY_SRC)/enc/trans/utf_16_32.c
>
>  
> ################################################################################
>  # Prepare rules
> @@ -481,4 +556,7 @@ $(LIBRUBY_BUILD)/.build: $(LIBRUBY_BUILD)/.configured
>  ifeq ($(CONFIG_LIBRUBY_EXT),y)
>  UK_PREPARE += $(LIBRUBY_BUILD)/.build
>  endif
> +ifeq ($(CONFIG_LIBRUBY_ENC),y)
> +UK_PREPARE += $(LIBRUBY_BUILD)/.build
> +endif
>
> --
> 2.20.1
>
>
> _______________________________________________
> Minios-devel mailing list
> Minios-devel@xxxxxxxxxxxxxxxxxxxx
> https://lists.xenproject.org/mailman/listinfo/minios-devel

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