Forum > General

Why VFP register always in arguments While compiler is ARMEL


I already build cross arm compiler with OPT="-dFPC_ARMEL"

and my crosslib is support soft float

when I build a shared library´╝îoutput link errors:

arm-linux-ld.exe: error: fpc\units\arm-linux\rtl\classes.o uses VFP register arguments, XXXXX\ does not

Try to compile both FPC itself (as part of OPT) and your library with -Cfsoft.


--- Quote from: PascalDragon on December 01, 2022, 09:57:42 pm ---Try to compile both FPC itself (as part of OPT) and your library with -Cfsoft.

--- End quote ---

Hi,  this is my ppcrossarm.exe -i
Free Pascal Compiler version 3.3.1

Compiler date      : 2022/12/01
Compiler CPU target: arm

Supported targets (targets marked with '{*}' are under development):
  Linux: Linux for ARMEL
  WinCE: WinCE for ARM
  gba: GameBoy Advance
  PalmOS: PalmOS
  nds: Nintendo DS
  embedded: Embedded
  Symbian: Symbian OS for ARM
  iOS: iOS for ARM
  Android: Android for ARMEL
  NetBSD: NetBSD for ARMHF {*}
  freertos: FreeRTOS

Supported CPU instruction sets:

Supported FPU instruction sets:

I build FPC rtl & packages with FPC=ppcrossarm.exe

command line:
cd C:\fpcsrc\
make.exe rtl packages CROSSINSTALL=1 CPU_TARGET=arm OS_TARGET=linux BINUTILSPREFIX=arm-linux FPC=ppcrossarm.exe OPT="-Cfsoft"

output :
arm-linux-as -meabi=5 -o C:/fpcsrc/rtl/units/arm-linux/prt0.o arm/
ppcrossarm.exe -Ur -Tlinux -Parm -XParm-linux- -Ur -Xs -O2 -n -Fi../inc -Fi../arm -Fi../unix -Fiarm -FE. -FUC:/fpcsrc/rtl/units/arm-linux -Cfsoft -darm -dRELEASE  -Us -Sg system.pp

Bootstrap Compiler is win64 ppcx64.exe

I build my library in Lazarus with -Cfsoft in [Compiler Options]->[Custom Options] pages, still got errors, here is information:
Free Pascal Compiler version 3.3.1 [2022/12/01] for arm
Copyright (c) 1993-2021 by Florian Klaempfl and others
(1002) Target OS: Linux for ARMEL
(3104) Compiling xxxx.ppr
(3104) Compiling ..\..\..\..\Common\GraphLibEx.pas
(9015) Linking E:\xxxxxxx\Bin\Linux\arm-OpenHarmony\
arm-linux-ld.exe: error: E:\xxxxxx\Tmp\Linux\arm-OpenHarmony\xxxx.o uses VFP register arguments, E:\XXXXXXX\Bin\Linux\arm-OpenHarmony\ does not
arm-linux-ld.exe: error: C:\fpc\fpc64\units\arm-linux\rtl\sysutils.o uses VFP register arguments, E:\XXXXXXX\Bin\Linux\arm-OpenHarmony\ does not

did i miss something, Your help would be greatly appreciated

finally, i found that -dFPC_ARMEL is unnecessary!

1. build cross compiler
make.exe compiler_cycle CROSSINSTALL=1 CPU_TARGET=arm OS_TARGET=linux FPC=ppc386.exe or ppcx64.exe

2. cross build fpc rtl package units with
NOT TESTED: fast floating point with -OoFASTMATH

some infos may help:


[0] Message Index

Go to full version