Noticed something odd last night, when compiling a plain vanilla linux kernel for my panda board. My default gcc is hard float, but passing V=1 to the make command could see -msoft-float was being defined. Turns out its defined that way in arch/arm/Makefile.
So just wondering if the same issue is there for rasbrian kernels - e.g. has it inadvertently been compiled soft float due to the default make file?
Not sure it makes any difference though - are there any floats used in the kernel?
6 posts • Page 1 of 1
That's not entirely true. Floats can be used inside of kernel but their usage is discouraged (as there is no good way to do it cross platform) . Also it is used in a very specific way which is independent from the float ABI so it doesn't matter if you are using hardfp or softfp compiler. softfp compiler parameters are forced to be sure no one is using floating point in the way it's used in userspace. Here's quite good explanation of this.
Interesting article. Yes I can see why the set -msoft-float now. Logic a bit convoluted. Guess its just strongly encouraging people not to use floats in the kernel, which I guess could be more transparanetly done by one of the coding rules for the kernel.