Error building ARM embedded for subarch armv6m & armv7em
Summary
Building the system unit for arm-embedded armv6m/7em7em fails on line 70 in thumb2.inc.
System Information
- Operating system: embedded
- Processor architecture: ARM
- Compiler version: main 85068584
- Device:
Steps to reproduce
make crossinstall OS_TARGET=embedded CPU_TARGET=arm FPC=/home/christo/fpc/installs/lib/fpc/3.2.2/ppcx64 SUBARCH=armv6m CROSSOPT=-al INSTALL_PREFIX=/home/christo/fpc/installs BINUTILSPREFIX=arm-none-eabi-
Eventually leading to:
/home/christo/fpc/gitlab-cc/compiler/ppcrossarm -Cparmv6m -Ur -Tembedded -Parm -XParm-none-eabi- -Ur -Xs -O2 -n -Fi../inc -Fi../arm -FE. -FU/home/christo/fpc/gitlab-cc/rtl/units/arm-embedded -darm -dRELEASE -al -Us -Sg system.pp @system.cfg
mathh.inc(62,14) Error: Forward declaration not solved "GetNativeFPUControlWord:LongWord;"
mathh.inc(63,15) Error: Forward declaration not solved "SetNativeFPUControlWord(const LongWord);"
Example Project
Build cross compiler for arm-embedded and armv6m or armv7em
What is the current bug behavior?
What is the expected (correct) behavior?
Relevant logs and/or screenshots
The code causing the compile failure was intriduced in commit 0758aa11.
Possible fixes
The function _controlfp is declared inside an {$ifdef wince} conditional, but is called outside this conditional in GetNativeFPUControlWord and SetNativeFPUControlWord. These two routines should probably be moved inside the {$ifdef wince} conditional scope.
Edited by ccrause