Re: [PATCH 1/7] Compiler Attributes: remove unused attributes

From: Arnd Bergmann
Date: Sun Sep 02 2018 - 15:55:06 EST


On Fri, Aug 31, 2018 at 11:27 PM Nick Desaulniers
<ndesaulniers@xxxxxxxxxx> wrote:
> On Fri, Aug 31, 2018 at 1:23 PM Miguel Ojeda
> <miguel.ojeda.sandonis@xxxxxxxxx> wrote:
> > On Fri, Aug 31, 2018 at 8:43 PM, Nick Desaulniers
> > > I don't think minimal supported versions are required for these clean
> > > ups, and would not block these patches from landing on that.
> > >
> > > Also, haven't found anyone using ICC yet to comment on minimal version
> > > requirements.
> >
> > For clang, by the way, __naked should go out of -gcc.h.
>
> Yep, Arnd's note in the other thread was a valuable insight and I agree with it.
>
> > I guess that
> > is breaking ARM clang builds at the moment (didn't check)?
>
> Huh?

32-bit ARM has a number of problems with clang at the moment,
one of them is the lack of a __naked definition, which causes it
fail building if any of these files are enabled:

arch/arm/mach-exynos/mcpm-exynos.c:static void __naked
exynos_pm_power_up_setup(unsigned int affinity_level)
arch/arm/mach-vexpress/tc2_pm.c:static void __naked
tc2_pm_power_up_setup(unsigned int affinity_level)
arch/arm/mm/copypage-fa.c:static void __naked
arch/arm/mm/copypage-feroceon.c:static void __naked
arch/arm/mm/copypage-v4mc.c:static void __naked
arch/arm/mm/copypage-v4wb.c:static void __naked
arch/arm/mm/copypage-v4wt.c:static void __naked
arch/arm/mm/copypage-xsc3.c:static void __naked
arch/arm/mm/copypage-xscale.c:static void __naked

There is a related problem in all the copypage files: even if we add __naked,
clang refuses to compile them because it is more restrictive than gcc
about enforcing the __naked function rules. I'll send a patch for
that soon.

Arnd