Re: [PATCH] arm64: vdso32: force vdso32 to be compiled as -marm

From: Dave Martin
Date: Wed May 27 2020 - 09:53:29 EST

On Tue, May 26, 2020 at 09:45:05PM +0100, Will Deacon wrote:
> On Tue, 26 May 2020 10:31:14 -0700, Nick Desaulniers wrote:
> > Custom toolchains that modify the default target to -mthumb cannot

It's probably too late to water this down, but it's unfortunate to have
this comment in the upstream commit history.

It's not constructive to call the native compiler configuration of
major distros for many years a "custom" toolchain. Unmodified GCC has
had a clean configure option for this for a very long time; it's not
someone's dirty hack. (The wisdom of armhf's choice of -mthumb might
be debated, but it is well established.)

Ignoring the triplet and passing random options to a compiler in the
hopes that it will do the right thing for an irregular usecase has never
been reliable. Usecases don't get much more irregular than building

arch/arm has the proper options in its Makefiles.

This patch is a kernel bugfix, plain and simple.

> > compile the arm64 compat vdso32, as
> > arch/arm64/include/asm/vdso/compat_gettimeofday.h
> > contains assembly that's invalid in -mthumb. Force the use of -marm,
> > always.
> Applied to arm64 (for-next/vdso), thanks!
> [1/1] arm64: vdso32: force vdso32 to be compiled as -marm

Does this need to go to stable?