]> xenbits.xensource.com Git - unikraft/libs/python3.git/commitdiff
Makefile.uk: Remove forceful setting of config
authorAndrei Tatar <andrei@unikraft.io>
Tue, 18 Jul 2023 20:24:57 +0000 (22:24 +0200)
committerUnikraft <monkey@unikraft.io>
Fri, 11 Aug 2023 16:00:37 +0000 (16:00 +0000)
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 <andrei@unikraft.io>
Reviewed-by: Maria Sfiraiala <maria.sfiraiala@gmail.com>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #15

Makefile.uk

index 1c84ef7a2326101c3d5e970187ace5808c22bd56..a170a475c29288f34f117a92f195576f477d0949 100644 (file)
 ################################################################################
 # 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
 ################################################################################