Bug 203725 - Build error: 'init_module' specifies less restrictive attribute than its target 'rtas_flash_init': 'cold'
Summary: Build error: 'init_module' specifies less restrictive attribute than its targ...
Status: NEW
Alias: None
Product: Platform Specific/Hardware
Classification: Unclassified
Component: PPC-64 (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: platform_ppc-64
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-27 14:42 UTC by jason
Modified: 2019-05-27 14:42 UTC (History)
0 users

See Also:
Kernel Version: 4.19.46
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Build log (357.78 KB, text/plain)
2019-05-27 14:42 UTC, jason
Details

Description jason 2019-05-27 14:42:30 UTC
Created attachment 282969 [details]
Build log

I recently upgraded to GCC 9.1. This error appears while building 4.19.46. I'm building with ppc64el. GCC 8.3 doesn't doesn't generate an error so that's my workaround for now.

  powerpc64le-linux-gcc -Wp,-MD,arch/powerpc/kernel/.rtas_flash.o.d  -nostdinc -isystem /home/jason/toolchain/bin/../lib/gcc/powerpc64le-linux/9.1.0/include -I./arch/powerpc/include -I./arch/powerpc/include/generated  -I./include -I./arch/powerpc/include/uapi -I./arch/powerpc/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -Iarch/powerpc -DHAVE_AS_ATHIGH=1 -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -DCC_HAVE_ASM_GOTO -mlittle-endian -m64 -msoft-float -pipe -Iarch/powerpc -mtraceback=no -mabi=elfv2 -mcmodel=medium -mno-pointers-to-nested-functions -mcpu=power8 -mtune=power9 -mno-altivec -mno-vsx -funit-at-a-time -fno-dwarf2-cfi-asm -mno-string -Wa,-maltivec -Wa,-mpower4 -Wa,-many -mno-strict-align -mlittle-endian -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-int-in-bool-context -O2 --param=allow-store-data-races=0 -Wframe-larger-than=2048 -fno-stack-protector -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-var-tracking-assignments -pg -mprofile-kernel -Wdeclaration-after-statement -Wno-pointer-sign -Wno-stringop-truncation -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -fmacro-prefix-map=./= -Wno-packed-not-aligned -Werror  -DMODULE -mno-save-toc-indirect -mcmodel=large  -DKBUILD_BASENAME='"rtas_flash"' -DKBUILD_MODNAME='"rtas_flash"' -c -o arch/powerpc/kernel/rtas_flash.o arch/powerpc/kernel/rtas_flash.c
In file included from arch/powerpc/kernel/rtas_flash.c:16:
./include/linux/module.h:133:6: error: 'init_module' specifies less restrictive attribute than its target 'rtas_flash_init': 'cold' [-Werror=missing-attributes]
  133 |  int init_module(void) __attribute__((alias(#initfn)));
      |      ^~~~~~~~~~~
arch/powerpc/kernel/rtas_flash.c:779:1: note: in expansion of macro 'module_init'
  779 | module_init(rtas_flash_init);
      | ^~~~~~~~~~~
arch/powerpc/kernel/rtas_flash.c:703:19: note: 'init_module' target declared here
  703 | static int __init rtas_flash_init(void)
      |                   ^~~~~~~~~~~~~~~
In file included from arch/powerpc/kernel/rtas_flash.c:16:
./include/linux/module.h:139:7: error: 'cleanup_module' specifies less restrictive attribute than its target 'rtas_flash_cleanup': 'cold' [-Werror=missing-attributes]
  139 |  void cleanup_module(void) __attribute__((alias(#exitfn)));
      |       ^~~~~~~~~~~~~~
arch/powerpc/kernel/rtas_flash.c:780:1: note: in expansion of macro 'module_exit'
  780 | module_exit(rtas_flash_cleanup);
      | ^~~~~~~~~~~
arch/powerpc/kernel/rtas_flash.c:759:20: note: 'cleanup_module' target declared here
  759 | static void __exit rtas_flash_cleanup(void)
      |                    ^~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
scripts/Makefile.build:309: recipe for target 'arch/powerpc/kernel/rtas_flash.o' failed
make[1]: *** [arch/powerpc/kernel/rtas_flash.o] Error 1
Makefile:1051: recipe for target 'arch/powerpc/kernel' failed
make: *** [arch/powerpc/kernel] Error 2

Note You need to log in before you can comment on or make changes to this bug.