PPC64 TOC. warnings

Masahiro Yamada masahiroy at kernel.org
Sun Feb 5 04:40:28 AEDT 2023


On Sun, Feb 5, 2023 at 2:30 AM Randy Dunlap <rdunlap at infradead.org> wrote:
>
> Hi,
>
> I'm seeing thousands of these warnings:
> (gcc 12.2.0)
>
>
> ./include/generated/autoksyms.h:7:9: warning: ISO C99 requires whitespace after the macro name
>     7 | #define __KSYM_TOC. 1
>       |         ^~~~~~~~~~
>
> In file included from ../include/asm-generic/export.h:57,
>                  from ./arch/powerpc/include/generated/asm/export.h:1,
>                  from ../arch/powerpc/kernel/misc.S:17:
> ./include/generated/autoksyms.h:7:9: warning: missing whitespace after the macro name
>     7 | #define __KSYM_TOC. 1
>       |         ^~~~~~~~~~
>
>
> Can anything be done about them?
>
> Thanks.
> --
> ~Randy



Hmm, I just thought this issue was fixed by
commit 29500f15b54b63ad0ea60b58e85144262bd24df2



Does this happen only for GCC 12?

Does the following patch fix the issue?
(I did not test it.)





diff --git a/scripts/gen_autoksyms.sh b/scripts/gen_autoksyms.sh
index 12bcfae940ee..70d4ab3621f6 100755
--- a/scripts/gen_autoksyms.sh
+++ b/scripts/gen_autoksyms.sh
@@ -54,7 +54,7 @@ EOT
 } | sed -e 's/ /\n/g' | sed -n -e '/^$/!p' |
 # Remove the dot prefix for ppc64; symbol names with a dot (.) hold entry
 # point addresses.
-sed -e 's/^\.//' |
+sed -e 's/^\.//g' |
 sort -u |
 # Ignore __this_module. It's not an exported symbol, and will be resolved
 # when the final .ko's are linked.










-- 
Best Regards
Masahiro Yamada


More information about the Linuxppc-dev mailing list