[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKwvOdkhyvTpY6pHT+CLSsBFuKRWsXucjbwN_tyJAsryZXvG1A@mail.gmail.com>
Date: Wed, 30 Sep 2020 14:40:54 -0700
From: Nick Desaulniers <ndesaulniers@...gle.com>
To: Joe Perches <joe@...ches.com>
Cc: Sedat Dilek <sedat.dilek@...il.com>,
"Paul E . McKenney" <paulmck@...nel.org>,
Steven Rostedt <rostedt@...dmis.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Lai Jiangshan <jiangshanlai@...il.com>,
Josh Triplett <josh@...htriplett.org>,
Kees Cook <keescook@...omium.org>,
LKML <linux-kernel@...r.kernel.org>, rcu@...r.kernel.org,
Clang-Built-Linux ML <clang-built-linux@...glegroups.com>,
Miguel Ojeda <miguel.ojeda.sandonis@...il.com>,
Michael Ellerman <mpe@...erman.id.au>
Subject: Re: [RFC PATCH next-20200930] treewide: Convert macro and uses of
__section(foo) to __section("foo")
On Wed, Sep 30, 2020 at 12:16 PM Joe Perches <joe@...ches.com> wrote:
>
> Use a more generic form for __section that requires quotes to avoid
> complications with clang and gcc differences.
>
> Remove the quote operator # from compiler_attributes.h __section macro.
>
> Convert all unquoted __section(foo) uses to quoted __section("foo").
> Also convert __attribute__((section("foo"))) uses to __section("foo")
> even if the __attribute__ has multiple list entry forms.
>
> Signed-off-by: Joe Perches <joe@...ches.com>
> ---
>
> This is the current output from the script against next-20200930
> attached in this link:
>
> https://lore.kernel.org/lkml/0e582a7f5144a33f465978d97701f9b3dcc377f3.camel@perches.com/
>
> It might be useful to run the script immediately before
> the next -rc1.
$ ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- make CC=clang -j71
powernv_defconfig
$ ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- make CC=clang -j71
...
arch/powerpc/boot/main.c:193:44: error: expected ';' after top level declarator
static char cmdline[BOOT_COMMAND_LINE_SIZE]
^
;
$ git blame arch/powerpc/boot/main.c -L 193 | head -n2
a2dd5da77f2cc arch/powerpc/boot/main.c (Anton Blanchard
2014-04-14 21:54:05 +1000 193) static char
cmdline[BOOT_COMMAND_LINE_SIZE]
9d04187c25477 arch/powerpc/boot/main.c (Joe Perches
2020-09-30 12:16:43 -0700 194) __section("__builtin_cmdline");
Looks like arch/powerpc/boot/main.c doesn't include
compiler_attributes.h? Preprocessing it doesn't expand __section as
expected. I think scripts/Makefile.lib's c_flags injects this via
-include flag.
(x86_64, arm, and arm64 defconfigs worked fine for me otherwise).
https://lore.kernel.org/lkml/46f69161e60b802488ba8c8f3f8bbf922aa3b49b.camel@perches.com/
--
Thanks,
~Nick Desaulniers
Powered by blists - more mailing lists