build: Move utf8proc build decision into configure script.

It is always enabled, except in the following situations:

 * bootloaders
 * warble or checkwps applications
 * devices with less than 4MB of RAM
 * imx233-based devices

imx233 is a special case; that will be backed out we figure out why
it fails to boot if the binary size exceeds 1MB.

Change-Id: If4a89e389f562bb5791a565fba99c830213473d3
This commit is contained in:
Solomon Peachy 2026-06-22 17:26:44 -04:00
parent aeb42039f9
commit b6db69e7ef
3 changed files with 15 additions and 12 deletions

8
tools/configure vendored
View file

@ -4718,6 +4718,13 @@ if [ "$ARG_STACK_PROTECTOR" != "" ]; then
fi
fi
# We generally want utf8proc. Exceptions are:
# Bootloaders, checkwps, warble, <4MB RAM
# and (temporarily) imx233
if [ "$apps" = "bootloader" -o "$app_type" = "checkwps" -o "$app_type" = "warble" -o "$memory" -lt "4" -o "$t_manufacturer" = "imx233" ]; then
no_utf8proc=1
fi
cat > autoconf.h.new <<EOF
/* This header was made by configure */
#ifndef __BUILD_AUTOCONF_H
@ -4965,6 +4972,7 @@ export FUNKEY_SDK_PATH=${FUNKEY_SDK_PATH}
export ANDROID_PLATFORM_VERSION=${ANDROID_PLATFORM_VERSION}
export TOOLSET=${toolset}
export PIPER_MODEL_DIR=${PIPER_MODEL_DIR}
export NO_UTF8PROC=${no_utf8proc}
$CCACHE_ARG
$LTO_ARG

View file

@ -8,8 +8,6 @@
GCCOPTS += -g -DDEBUG -D__PCTOOL__ -DDBTOOL
include $(ROOTDIR)/lib/utf8proc/utf8proc.make
METADATAS := $(wildcard $(ROOTDIR)/lib/rbcodec/metadata/*.c)
DATABASE_SRC = $(call preprocess, $(TOOLSDIR)/database/SOURCES) $(METADATAS)

View file

@ -95,6 +95,10 @@ ifndef APP_TYPE
endif
endif
ifeq (,$(NO_UTF8PROC))
include $(ROOTDIR)/lib/utf8proc/utf8proc.make
endif
ifeq (,$(findstring checkwps,$(APP_TYPE)))
include $(ROOTDIR)/lib/fixedpoint/fixedpoint.make
endif
@ -127,14 +131,6 @@ else # core
include $(APPSDIR)/apps.make
include $(ROOTDIR)/lib/rbcodec/rbcodec.make
# bootloaders don't get utf8proc
ifeq (,$(findstring checkwps,$(APP_TYPE)))
IS_GREATER := $(shell [ $(MEMORYSIZE) -gt 2 ] && echo true || echo false)
ifeq ($(IS_GREATER),true)
include $(ROOTDIR)/lib/utf8proc/utf8proc.make
endif
endif
ifeq ($(ENABLEDPLUGINS),yes)
include $(APPSDIR)/plugins/bitmaps/pluginbitmaps.make
include $(APPSDIR)/plugins/plugins.make
@ -177,10 +173,11 @@ else # core
endif
ifneq (,$(findstring rgnano, $(MODELNAME)))
include $(ROOTDIR)/packaging/rgnano/rgnano.make
include $(ROOTDIR)/packaging/rgnano/rgnano.make
endif
ifneq (,$(findstring ctru, $(APP_TYPE)))
include $(ROOTDIR)/packaging/ctru/ctru.make
include $(ROOTDIR)/packaging/ctru/ctru.make
endif
endif # bootloader