From: Andrei Tatar Date: Tue, 18 Jul 2023 20:24:57 +0000 (+0200) Subject: Makefile.uk: Remove forceful setting of config X-Git-Tag: RELEASE-0.14.0~6 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=05f6aeff79ee935905a6dfc990f4e89a49dbd0f1;p=unikraft%2Flibs%2Fpython3.git Makefile.uk: Remove forceful setting of config Previously the python Makefile would forcefully set the Kconfig value `STACK_SIZE_PAGE_ORDER` to 10, a minimum value for python to work. This change removes this fairly invasive behavior in favor of an explicit check and error message if the value is too low. Signed-off-by: Andrei Tatar Reviewed-by: Maria Sfiraiala Reviewed-by: Stefan Jumarea Approved-by: Razvan Deaconescu Tested-by: Unikraft CI GitHub-Closes: #15 --- diff --git a/Makefile.uk b/Makefile.uk index 1c84ef7..a170a47 100644 --- a/Makefile.uk +++ b/Makefile.uk @@ -38,6 +38,12 @@ ################################################################################ # Library registration ################################################################################ +ifeq ($(CONFIG_LIBPYTHON3),y) +ifeq ($(shell test $(CONFIG_STACK_SIZE_PAGE_ORDER) -lt 10; echo $$?),0) +$(error CONFIG_STACK_SIZE_PAGE_ORDER must be at least 10) +endif +endif + $(eval $(call addlib_s,libpython3,$(CONFIG_LIBPYTHON3))) $(eval $(call addlib_s,libpython3_core,$(CONFIG_LIBPYTHON3))) $(eval $(call addlib_s,libpython3_extensions,$(CONFIG_LIBPYTHON3))) @@ -479,23 +485,6 @@ LIBPYTHON3_EXTENSIONS_SRCS-y += $(LIBPYTHON3_SRC)/Modules/_zoneinfo.c #LIBPYTHON3_EXTENSIONS_SRCS-y += $(LIBPYTHON3_SRC)/Misc/coverity_model.c -################################################################################ -# Prepare rules -################################################################################ - -# Customize config: configure stack size -$(APP_BASE)/.config.orig: - $(call verbose_cmd,CONFIG,libpython3: $(notdir $@), \ - cp $(C) $@ && \ - sed -i 's/^CONFIG_STACK_SIZE_PAGE_ORDER=.*$$/CONFIG_STACK_SIZE_PAGE_ORDER=10/g' $(C)) - -LIBPYTHON3_PREPARED_DEPS = \ - $(APP_BASE)/.config.orig \ - -$(LIBPYTHON3_BUILD)/.prepared: $(LIBPYTHON3_PREPARED_DEPS) - -UK_PREPARE += $(LIBPYTHON3_BUILD)/.prepared - ################################################################################ # Root filesystem ################################################################################