From: Rolf Eike Beer <eb@emlix.com>
To: stable@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Subject: Linux 4.9.180 build fails with gcc 9 and 'cleanup_module' specifies less restrictive attribute than its target …
Date: Thu, 06 Jun 2019 15:16:03 +0200 [thread overview]
Message-ID: <259986242.BvXPX32bHu@devpool35> (raw)
[-- Attachment #1: Type: text/plain, Size: 7430 bytes --]
I have at least these 2 instances:
In file included from /tmp/e2/build/linux-4.9.180/include/drm/drm_vma_manager.h:28,
from /tmp/e2/build/linux-4.9.180/include/drm/drmP.h:78,
from /tmp/e2/build/linux-4.9.180/include/drm/drm_modeset_helper.h:26,
from /tmp/e2/build/linux-4.9.180/include/drm/drm_atomic_helper.h:33,
from /tmp/e2/build/linux-4.9.180/drivers/gpu/drm/tilcdc/tilcdc_drv.c:24:
/tmp/e2/build/linux-4.9.180/include/linux/module.h:138:7: error: 'cleanup_module' specifies less restrictive attribute than its target 'tilcdc_drm_fini': 'cold' [-Werror=missing-attributes]
138 | void cleanup_module(void) __attribute__((alias(#exitfn)));
| ^~~~~~~~~~~~~~
/tmp/e2/build/linux-4.9.180/drivers/gpu/drm/tilcdc/tilcdc_drv.c:757:1: note: in expansion of macro 'module_exit'
757 | module_exit(tilcdc_drm_fini);
| ^~~~~~~~~~~
/tmp/e2/build/linux-4.9.180/drivers/gpu/drm/tilcdc/tilcdc_drv.c:748:20: note: 'cleanup_module' target declared here
748 | static void __exit tilcdc_drm_fini(void)
| ^~~~~~~~~~~~~~~
In file included from /tmp/e2/build/linux-4.9.180/include/drm/drm_vma_manager.h:28,
from /tmp/e2/build/linux-4.9.180/include/drm/drmP.h:78,
from /tmp/e2/build/linux-4.9.180/include/drm/drm_modeset_helper.h:26,
from /tmp/e2/build/linux-4.9.180/include/drm/drm_atomic_helper.h:33,
from /tmp/e2/build/linux-4.9.180/drivers/gpu/drm/tilcdc/tilcdc_drv.c:24:
/tmp/e2/build/linux-4.9.180/include/linux/module.h:132:6: error: 'init_module' specifies less restrictive attribute than its target 'tilcdc_drm_init': 'cold' [-Werror=missing-attributes]
132 | int init_module(void) __attribute__((alias(#initfn)));
| ^~~~~~~~~~~
/tmp/e2/build/linux-4.9.180/drivers/gpu/drm/tilcdc/tilcdc_drv.c:756:1: note: in expansion of macro 'module_init'
756 | module_init(tilcdc_drm_init);
| ^~~~~~~~~~~
/tmp/e2/build/linux-4.9.180/drivers/gpu/drm/tilcdc/tilcdc_drv.c:740:19: note: 'init_module' target declared here
740 | static int __init tilcdc_drm_init(void)
| ^~~~~~~~~~~~~~~
In file included from /tmp/e2/build/linux-4.9.180/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c:17:
/tmp/e2/build/linux-4.9.180/include/linux/module.h:138:7: error: 'cleanup_module' specifies less restrictive attribute than its target 'mpc52xx_lpbfifo_driver_exit': 'cold' [-Werror=missing-attributes]
138 | void cleanup_module(void) __attribute__((alias(#exitfn)));
| ^~~~~~~~~~~~~~
/tmp/e2/build/linux-4.9.180/include/linux/device.h:1360:1: note: in expansion of macro 'module_exit'
1360 | module_exit(__driver##_exit);
| ^~~~~~~~~~~
/tmp/e2/build/linux-4.9.180/include/linux/platform_device.h:228:2: note: in expansion of macro 'module_driver'
228 | module_driver(__platform_driver, platform_driver_register, \
| ^~~~~~~~~~~~~
/tmp/e2/build/linux-4.9.180/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c:581:1: note: in expansion of macro 'module_platform_driver'
581 | module_platform_driver(mpc52xx_lpbfifo_driver);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/e2/build/linux-4.9.180/arch/powerpc/include/asm/io.h:27,
from /tmp/e2/build/linux-4.9.180/include/linux/io.h:25,
from /tmp/e2/build/linux-4.9.180/include/linux/irq.h:24,
from /tmp/e2/build/linux-4.9.180/arch/powerpc/include/asm/hardirq.h:5,
from /tmp/e2/build/linux-4.9.180/include/linux/hardirq.h:8,
from /tmp/e2/build/linux-4.9.180/include/linux/interrupt.h:12,
from /tmp/e2/build/linux-4.9.180/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c:12:
/tmp/e2/build/linux-4.9.180/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c:581:24: note: 'cleanup_module' target declared here
581 | module_platform_driver(mpc52xx_lpbfifo_driver);
| ^~~~~~~~~~~~~~~~~~~~~~
/tmp/e2/build/linux-4.9.180/include/linux/device.h:1356:20: note: in definition of macro 'module_driver'
1356 | static void __exit __driver##_exit(void) \
| ^~~~~~~~
/tmp/e2/build/linux-4.9.180/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c:581:1: note: in expansion of macro 'module_platform_driver'
581 | module_platform_driver(mpc52xx_lpbfifo_driver);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/e2/build/linux-4.9.180/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c:17:
/tmp/e2/build/linux-4.9.180/include/linux/module.h:132:6: error: 'init_module' specifies less restrictive attribute than its target 'mpc52xx_lpbfifo_driver_init': 'cold' [-Werror=missing-attributes]
132 | int init_module(void) __attribute__((alias(#initfn)));
| ^~~~~~~~~~~
/tmp/e2/build/linux-4.9.180/include/linux/device.h:1355:1: note: in expansion of macro 'module_init'
1355 | module_init(__driver##_init); \
| ^~~~~~~~~~~
/tmp/e2/build/linux-4.9.180/include/linux/platform_device.h:228:2: note: in expansion of macro 'module_driver'
228 | module_driver(__platform_driver, platform_driver_register, \
| ^~~~~~~~~~~~~
/tmp/e2/build/linux-4.9.180/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c:581:1: note: in expansion of macro 'module_platform_driver'
581 | module_platform_driver(mpc52xx_lpbfifo_driver);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/e2/build/linux-4.9.180/arch/powerpc/include/asm/io.h:27,
from /tmp/e2/build/linux-4.9.180/include/linux/io.h:25,
from /tmp/e2/build/linux-4.9.180/include/linux/irq.h:24,
from /tmp/e2/build/linux-4.9.180/arch/powerpc/include/asm/hardirq.h:5,
from /tmp/e2/build/linux-4.9.180/include/linux/hardirq.h:8,
from /tmp/e2/build/linux-4.9.180/include/linux/interrupt.h:12,
from /tmp/e2/build/linux-4.9.180/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c:12:
/tmp/e2/build/linux-4.9.180/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c:581:24: note: 'init_module' target declared here
581 | module_platform_driver(mpc52xx_lpbfifo_driver);
| ^~~~~~~~~~~~~~~~~~~~~~
/tmp/e2/build/linux-4.9.180/include/linux/device.h:1351:19: note: in definition of macro 'module_driver'
1351 | static int __init __driver##_init(void) \
| ^~~~~~~~
/tmp/e2/build/linux-4.9.180/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c:581:1: note: in expansion of macro 'module_platform_driver'
581 | module_platform_driver(mpc52xx_lpbfifo_driver);
| ^~~~~~~~~~~~~~~~~~~~~~
So this needs a6e60d84989fa0e91db7f236eda40453b0e44afa, which needs
c0d9782f5b6d7157635ae2fd782a4b27d55a6013, which can't be applied cleanly
because a3f8a30f3f0079c7edfc72e329eee8594fb3e3cb is missing in 4.9.
I have applied a6e60d84989fa0e91db7f236eda40453b0e44afa and modified it to
directly use __attribute__((__copy__(initfn))) and (exitfn), which fixes the
build for me.
Greetings,
Eike
--
Rolf Eike Beer, emlix GmbH, http://www.emlix.com
Fon +49 551 30664-0, Fax +49 551 30664-11
Gothaer Platz 3, 37083 Göttingen, Germany
Sitz der Gesellschaft: Göttingen, Amtsgericht Göttingen HR B 3160
Geschäftsführung: Heike Jordan, Dr. Uwe Kracke – Ust-IdNr.: DE 205 198 055
emlix - smart embedded open source
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 313 bytes --]
next reply other threads:[~2019-06-06 13:16 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-06 13:16 Rolf Eike Beer [this message]
2019-06-06 15:27 ` Linux 4.9.180 build fails with gcc 9 and 'cleanup_module' specifies less restrictive attribute than its target … Greg KH
2019-06-06 15:29 ` Greg KH
2019-06-06 18:25 ` Miguel Ojeda
2019-06-06 18:59 ` Greg KH
2019-06-08 12:00 ` Miguel Ojeda
2019-08-02 8:17 ` Rolf Eike Beer
2019-08-02 8:28 ` Greg KH
2019-08-02 10:19 ` Miguel Ojeda
2019-08-02 10:33 ` Greg KH
2019-08-02 10:39 ` Miguel Ojeda
2019-08-02 11:26 ` Greg KH
2019-08-02 11:00 ` Miguel Ojeda
2019-08-02 11:25 ` Greg KH
2019-08-02 13:01 ` Miguel Ojeda
2019-08-02 15:56 ` Greg KH
2019-08-02 16:55 ` Miguel Ojeda
2019-08-05 11:55 ` Greg KH
2019-08-05 12:47 ` Miguel Ojeda
2019-06-12 7:19 ` Rolf Eike Beer
2019-06-12 7:50 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=259986242.BvXPX32bHu@devpool35 \
--to=eb@emlix.com \
--cc=linux-kernel@vger.kernel.org \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).