Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 376ba624 authored by Juerg Haefliger's avatar Juerg Haefliger Committed by Robert Nelson
Browse files

ARM: Fix instruction set selection for GCC 11


GCC 11 on ARM now complains like the following when trying to determine if
an arch is supported. Presumably because it enforces the default option
'--with-float=hard' which GCC 10 didn't do?

  $ arm-linux-gnueabihf-gcc-11 -march=armv7-a -c -x c /dev/null
  cc1: error: ‘-mfloat-abi=hard’: selected architecture lacks an FPU

Due to that, the kernel build system selects the wrong compiler options
which throws errros like this during the build:

  /tmp/ccrHfZPj.s: Assembler messages:
  /tmp/ccrHfZPj.s:116: Error: selected processor does not support `dmb ish' in ARM mode
  /tmp/ccrHfZPj.s:150: Error: selected processor does not support `isb ' in ARM mode
  /tmp/ccrHfZPj.s:160: Error: selected processor does not support `mrrc p15,1,r4,r5,c14' in ARM mode
  /tmp/ccrHfZPj.s:245: Error: selected processor does not support `dmb ish' in ARM mode
  /tmp/ccrHfZPj.s:503: Error: selected processor does not support `dmb ish' in ARM mode
  /tmp/ccrHfZPj.s:527: Error: selected processor does not support `dmb ish' in ARM mode
  /tmp/ccrHfZPj.s:698: Error: selected processor does not support `dmb ish' in ARM mode
  /tmp/ccrHfZPj.s:731: Error: selected processor does not support `isb ' in ARM mode

Fix that by adding '-msoft-float' to KBUILD_CFLAGS before the definition of
the 'arch-$(CONFIG_CPU_<foo>)' instruction selection macros.

Signed-off-by: default avatarJuerg Haefliger <juergh@canonical.com>
parent e2b68bc3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment