Skip to content

Commit

Permalink
Makefile.uk: Remove forceful setting of config
Browse files Browse the repository at this point in the history
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
  • Loading branch information
andreittr authored and unikraft-bot committed Aug 11, 2023
1 parent 2dd1837 commit 05f6aef
Showing 1 changed file with 6 additions and 17 deletions.
23 changes: 6 additions & 17 deletions Makefile.uk
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down Expand Up @@ -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
################################################################################
Expand Down

0 comments on commit 05f6aef

Please sign in to comment.