llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

incorrect __SOFTFP__ breaks build on ARM

Open llvmbot opened this issue 17 years ago • 6 comments

Bugzilla Link 5309
Resolution FIXED
Resolved on Mar 02, 2010 10:14
Version 2.6
OS Linux
Reporter LLVM Bugzilla Contributor
CC @asl,@echristo

Extended Description

In lib/Target/ARM/ARMJITInfo.cpp, there are two instances of #ifndef SOFTFP which break building LLVM on (at least) ARM/Linux. All instances should be replaced with: #ifdef VFP_FP (according to aKor)

llvmbot avatar Oct 27 '09 00:10 llvmbot

Well, that's lame.

Thanks for fixing it.

echristo avatar Mar 02 '10 18:03 echristo

Fix pushed hopefully this resolves all VFP and SOFTFP variants. http://llvm.org/viewvc/llvm-project?view=rev&revision=97564

llvmbot avatar Mar 02 '10 15:03 llvmbot

some hints from http://wiki.debian.org/ArmEabiPort

Note that VFP_FP does not mean that VFP code generation has been selected. It only speaks of the floating point data format in use and is normally set when soft-float has been selected. The correct test for VFP code generation, for example around asm fragments containing VFP instructions, is

#if defined(VFP_FP) && !defined(SOFTFP))

Paradoxically, the -mfloat-abi=softfp does not set the SOFTFP_ macro, since it selects real floating point instructions using the soft-float ABI at function-call interfaces.

By default in Debian armel, VFP_FP && SOFTFP are selected.

...

so i suggest we change the two lines to

#if defined(VFP_FP) && !defined(SOFTFP))

llvmbot avatar Mar 02 '10 15:03 llvmbot

this change broke the armv5tejl (softfloat) buildbot http://llvm.org/viewvc/llvm-project/?view=rev&revision=97554

can we redesign this to work with SOFTFP machines as well?

llvm[3]: Compiling ARMJITInfo.cpp for Debug build /tmp/ccA22Bpb.s: Assembler messages: /tmp/ccA22Bpb.s:26: Error: selected processor does not support fstmfdd sp!,{d0,d1,d2,d3,d4,d5,d6,d7}' /tmp/ccA22Bpb.s:31: Error: selected processor does not support fldmfdd sp!,{d0,d1,d2,d3,d4,d5,d6,d7}' make[3]: *** [/wd/buildbot/llvm-arm-linux/llvm/lib/Target/ARM/Debug/ARMJITInfo.o] Error 1 make[3]: Leaving directory `/wd/buildbot/llvm-arm-linux/llvm/lib/Target/ARM' make[2]: *** [ARM/.makeall] Error 2

llvmbot avatar Mar 02 '10 14:03 llvmbot

Fixed thusly:

[ghostwheel:~/sources/llvm] echristo% svn ci lib/Target/ARM/ARMJITInfo.cpp Sending lib/Target/ARM/ARMJITInfo.cpp Transmitting file data . Committed revision 97554.

echristo avatar Mar 02 '10 08:03 echristo

I can buy that. I'll make the change.

echristo avatar Mar 02 '10 08:03 echristo