Re: [PATCH net-next] sh: add missing fpscr_values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 2, 2014 at 5:47 AM, David Miller <davem@xxxxxxxxxxxxx> wrote:
> From: Alexei Starovoitov <ast@xxxxxxxxxxxx>
> Date: Tue,  1 Apr 2014 19:54:04 -0700
>
>> GCC on SuperH for the following program:
>> int foo(int i)
>> {
>>       static const void *table[2] = {
>>               [0] = &&label1,
>>               [1] = &&label2,
>>       };
>>       goto *table[i & 1];
>>
>>       label1:
>>               return 1;
>>       label2:
>>               return 2;
>> }
>> generates code:
>>       mov.l   .L9,r1
>>       mov     #1,r0
>>       rts
>>       lds.l   @r1+,fpscr
>> .L9:
>>       .long   __fpscr_values+4
>>
>> so kernel has to provide body of fpscr_values just like glibc does
>>
>> Fixes: bd4cf0ed331a ("net: filter: rework/optimize internal BPF interpreter's instruction set")
>> Reported-by: Fengguang Wu <fengguang.wu@xxxxxxxxx>
>> Signed-off-by: Alexei Starovoitov <ast@xxxxxxxxxxxx>
>
> You guys really need to just fix the compiler, sorry.

agree.

To summarize:
according to Kaz:
"For sh2a, configuring gcc with --with-multilib-list=m2a,m2a-nofpu
 and specifying -m2a-nofpu during compiling kernel would work."

and as Geert pointed out we already have:
arch/sh/Makefile:
cflags-$(CONFIG_CPU_SH2A)               += $(call cc-option,-m2a,) \
                                           $(call cc-option,-m2a-nofpu,)

so no kernel changes needed and gcc just needs to be reconfigured.
--
To unsubscribe from this list: send the line "unsubscribe linux-next" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux