incorrect __SOFTFP__ breaks build on ARM
| 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)
Well, that's lame.
Thanks for fixing it.
Fix pushed hopefully this resolves all VFP and SOFTFP variants. http://llvm.org/viewvc/llvm-project?view=rev&revision=97564
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))
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
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.
I can buy that. I'll make the change.