• Geert Uytterhoeven's avatar
    sh: also try passing -m4-nofpu for SH2A builds · b1923b55
    Geert Uytterhoeven authored
    When compiling a SH2A kernel (e.g.  se7206_defconfig or rsk7203_defconfig)
    using sh4-linux-gcc, linking fails with:
    
      net/built-in.o: In function `__sk_run_filter':
      net/core/filter.c:566: undefined reference to `__fpscr_values'
      net/core/filter.c:269: undefined reference to `__fpscr_values'
      ...
      net/built-in.o:net/core/filter.c:580: more undefined references to `__fpscr_values' follow
    
    This happens because sh4-linux-gcc doesn't support the "-m2a-nofpu",
    which is thus filtered out by "$(call cc-option, ...)".
    
    As compiling using sh4-linux-gcc is useful for compile coverage, also
    try passing "-m4-nofpu" (which is presumably filtered out when using a
    real sh2a-linux toolchain) to disable the generation of FPU instructions
    and references to __fpscr_values[].
    Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
    Cc: Guenter Roeck <linux@roeck-us.net>
    Cc: Tony Breeds <tony@bakeyournoodle.com>
    Cc: Alexei Starovoitov <ast@plumgrid.com>
    Cc: Fengguang Wu <fengguang.wu@intel.com>
    Cc: Daniel Borkmann <dborkman@redhat.com>
    Cc: Magnus Damm <magnus.damm@gmail.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    b1923b55
Makefile 7.98 KB