* Pass FPC_DOTTEDUNITS on to fpmake as -ns

* cpu-target checks now use CPU_OS_TARGET instead of FULL_TARGET, as the latter includes SUB_TARGET
This commit is contained in:
Michaël Van Canneyt 2023-07-27 10:30:36 +02:00 committed by Pierre Muller
parent 0bc8c46c16
commit 853f4f30ea
2 changed files with 391 additions and 376 deletions

File diff suppressed because it is too large Load Diff

View File

@ -285,7 +285,7 @@ ARCH=$(CPU_TARGET)
endif
endif
ifeq ($(FULL_TARGET),aarch64-embedded)
ifeq ($(CPU_OS_TARGET),aarch64-embedded)
# override FPCOPT+=-Cp$(SUBARCH)
endif
@ -295,7 +295,7 @@ FPMAKE_OPT+=--subtarget=$(SUB_TARGET)
endif
ifeq ($(FULL_TARGET),arm-embedded)
ifeq ($(CPU_OS_TARGET),arm-embedded)
ifeq ($(SUBARCH),)
# we don't add a default here, people should explicitly add the SUBARCH
$(error When compiling for arm-embedded, a sub-architecture (e.g. SUBARCH=armv4t or SUBARCH=armv7m) must be defined)
@ -303,7 +303,7 @@ endif
override FPCOPT+=-Cp$(SUBARCH)
endif
ifeq ($(FULL_TARGET),avr-embedded)
ifeq ($(CPU_OS_TARGET),avr-embedded)
ifeq ($(SUBARCH),)
# we don't add a default here, people should explicitly add the SUBARCH
$(error When compiling for avr-embedded, a sub-architecture (e.g. SUBARCH=avr25 or SUBARCH=avr35) must be defined)
@ -311,7 +311,7 @@ endif
override FPCOPT+=-Cp$(SUBARCH)
endif
ifeq ($(FULL_TARGET),mipsel-embedded)
ifeq ($(CPU_OS_TARGET),mipsel-embedded)
ifeq ($(SUBARCH),)
# we don't add a default here, people should explicitly add the SUBARCH
$(error When compiling for mipsel-embedded, a sub-architecture (e.g. SUBARCH=pic32mx) must be defined)
@ -319,21 +319,21 @@ endif
override FPCOPT+=-Cp$(SUBARCH)
endif
ifeq ($(FULL_TARGET),xtensa-embedded)
ifeq ($(CPU_OS_TARGET),xtensa-embedded)
ifeq ($(SUBARCH),)
$(error When compiling for xtensa-embedded, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
endif
override FPCOPT+=-Cp$(SUBARCH)
endif
ifeq ($(FULL_TARGET),xtensa-freertos)
ifeq ($(CPU_OS_TARGET),xtensa-freertos)
ifeq ($(SUBARCH),)
$(error When compiling for xtensa-freertos, a sub-architecture (e.g. SUBARCH=lx106 or SUBARCH=lx6) must be defined)
endif
override FPCOPT+=-Cp$(SUBARCH)
endif
ifeq ($(FULL_TARGET),arm-freertos)
ifeq ($(CPU_OS_TARGET),arm-freertos)
ifeq ($(SUBARCH),)
$(error When compiling for arm-freertos, a sub-architecture (e.g. SUBARCH=armv6m or SUBARCH=armv7em) must be defined)
endif
@ -2517,6 +2517,9 @@ endif
ifdef CPU_TARGET
FPC_TARGETOPT+=--cpu=$(CPU_TARGET)
endif
ifdef SUB_TARGET
FPC_TARGETOPT+=--subtarget=$(SUB_TARGET)
endif
# Get the location of the bootstrap-fpmkunit units
PACKAGEDIR_FPMKUNIT:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /fpmkunit/Makefile.fpc,$(PACKAGESDIR))))))
@ -2550,6 +2553,9 @@ FPMAKE_OPT+=$(FPC_TARGETOPT)
FPMAKE_OPT+=$(addprefix -o ,$(FPCOPT))
FPMAKE_OPT+=--compiler=$(FPC)
FPMAKE_OPT+=-bu
ifdef FPC_DOTTEDUNITS
FPMAKE_OPT+=-ns
endif
FPMAKE_INSTALL_OPT+=--unitinstalldir=$(INSTALL_UNITDIR)
ifdef UNIXHier