Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.kernel > #73280

Bug#996419: gcc-11: Fails to compile the linux kernel on ARM.

From Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Newsgroups linux.debian.bugs.dist, linux.debian.kernel
Subject Bug#996419: gcc-11: Fails to compile the linux kernel on ARM.
Date 2021-10-13 22:50 +0200
Message-ID <D7Tmh-1W0-5@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Cross-posted to 2 groups.

Show all headers | View raw


Package: gcc-11
Version: 11.2.0-9
Severity: important

The linux kernel has the following in its ARM Makefile:
	$(call cc-option,-march=armv7-a,-march=armv5t -Wa$(comma)-march=armv7-a)

This means the switch "-march=armv7-a" is tested if supported by the
compiler and if so it is used, otherwise it uses the alternative
"-march=armv5t -Wa,-march=armv7-a".

On gcc-10 it evaluated to "-march=armv7-a".
On gcc-11 it evaluates to "-march=armv5t -Wa,-march=armv7-a" leading to
compile errors:
| cccHPwDp.s:4372: Error: selected processor does not support `cpsid i' in ARM mode
| cccHPwDp.s:5145: Error: selected processor does not support `cpsid i' in ARM mode
| cccHPwDp.s:5393: Error: selected processor does not support `cpsie i' in ARM mode
| cccHPwDp.s:5530: Error: selected processor does not support `dsb ' in ARM mode
| cccHPwDp.s:6088: Error: selected processor does not support `cpsie i' in ARM mode
| cccHPwDp.s:7132: Error: architectural extension `mp' is not allowed for the current base architecture
| cccHPwDp.s:7133: Error: selected processor does not support `pldw [r4]' in ARM mode
| cccHPwDp.s:7136: Error: selected processor does not support `pld [r4]' in ARM mode
| cccHPwDp.s:7148: Error: selected processor does not support `ldrex r3,[r4]' in ARM mode
| cccHPwDp.s:7150: Error: selected processor does not support `strex r1,r2,[r4]' in ARM mode

This has been noticed in the gcc-11-arm-linux-gnueabihf package and
verified on a armhf porter box with the native gcc-11 package.

The test fails due to:
| $ arm-linux-gnueabihf-gcc-10 -o a.o a.c -march=armv7-a
| $ arm-linux-gnueabihf-gcc-11 -o a.o a.c -march=armv7-a
| cc1: error: ‘-mfloat-abi=hard’: selected architecture lacks an FPU

Passing early -msoft-float to the compiler test solves the problem. This
option is passed later to the compile process.
Is this change intended?

Sebastian

Back to linux.debian.kernel | Previous | Next | Find similar | Unroll thread


Thread

Bug#996419: gcc-11: Fails to compile the linux kernel on ARM. Sebastian Andrzej Siewior <sebastian@breakpoint.cc> - 2021-10-13 22:50 +0200

csiph-web