diff --git a/jinx-config b/jinx-config index b9309d861..daf9615ae 100644 --- a/jinx-config +++ b/jinx-config @@ -139,3 +139,5 @@ if [ "$in_container" = true ]; then mkdir -p "${VMODULES}"/cache mkdir -p /tmp/v_$(id -u) fi + +PROD=true diff --git a/jinx-config-debug b/jinx-config-debug index 3ec815c17..9ff533cc3 100644 --- a/jinx-config-debug +++ b/jinx-config-debug @@ -1,3 +1,4 @@ . ${base_dir}/jinx-config -export VINIX_PROD=no -export CFLAGS="$CFLAGS -g" + +PROD=false +CFLAGS="$CFLAGS -g" diff --git a/kernel/GNUmakefile b/kernel/GNUmakefile index 9a99e7985..a1ac9084e 100644 --- a/kernel/GNUmakefile +++ b/kernel/GNUmakefile @@ -46,7 +46,7 @@ $(call USER_VARIABLE,VFLAGS,) # User controllable linker flags. We set none by default. $(call USER_VARIABLE,LDFLAGS,) -$(call USER_VARIABLE,VINIX_PROD,) +$(call USER_VARIABLE,PROD,) # Ensure the dependencies have been obtained. ifneq ($(shell ( test '$(MAKECMDGOALS)' = clean || test '$(MAKECMDGOALS)' = distclean ); echo $$?),0) @@ -123,7 +123,7 @@ override VFLAGS += \ -gc none \ -d no_backtrace -ifeq ($(VINIX_PROD),no) +ifeq ($(PROD),false) override VFLAGS += -warn-about-allocs else override VFLAGS += -prod diff --git a/recipes/kernel b/recipes/kernel index a3e7d5f7a..168635c58 100644 --- a/recipes/kernel +++ b/recipes/kernel @@ -17,6 +17,7 @@ build() { cp -rpf "${source_dir}"/. ./ make -j${parallelism} \ + PROD="$PROD" \ CC=${OS_TRIPLET}-gcc \ LD=${OS_TRIPLET}-ld \ AR=${OS_TRIPLET}-ar \ diff --git a/recipes/util-vinix b/recipes/util-vinix index cc4439e9a..73fd2b578 100644 --- a/recipes/util-vinix +++ b/recipes/util-vinix @@ -11,6 +11,7 @@ build() { cp -rp "${source_dir}"/. ./ make -j${parallelism} \ + PROD="$PROD" \ CC=${OS_TRIPLET}-gcc \ VFLAGS="-os vinix -gc none" \ CFLAGS="$TARGET_CFLAGS" \ diff --git a/util-vinix/GNUmakefile b/util-vinix/GNUmakefile index 70ace46d8..f48b00cfe 100644 --- a/util-vinix/GNUmakefile +++ b/util-vinix/GNUmakefile @@ -10,13 +10,6 @@ override USER_VARIABLE = $(if $(filter $(origin $(1)),default undefined),$(eval $(call USER_VARIABLE,CC,cc) $(call USER_VARIABLE,V,v) -VINIX_PROD ?= -ifeq ($(VINIX_PROD),no) - override PROD := false -else - override PROD := true -endif - $(call USER_VARIABLE,VFLAGS,) $(call USER_VARIABLE,CFLAGS,-g -O2 -pipe) $(call USER_VARIABLE,LDFLAGS,) @@ -24,7 +17,9 @@ $(call USER_VARIABLE,LDFLAGS,) $(call USER_VARIABLE,DESTDIR,) $(call USER_VARIABLE,PREFIX,/usr/local) -ifeq ($(PROD), true) +$(call USER_VARIABLE,PROD,) + +ifeq ($(PROD),true) override VFLAGS += -prod endif