All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Rolf Eike Beer <eb@emlix.com>
Cc: stable@vger.kernel.org, linux-kernel@vger.kernel.org,
	Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Subject: Re: Linux 4.9.180 build fails with gcc 9 and 'cleanup_module' specifies less restrictive attribute than its target …
Date: Thu, 6 Jun 2019 17:27:46 +0200	[thread overview]
Message-ID: <20190606152746.GB21921@kroah.com> (raw)
In-Reply-To: <259986242.BvXPX32bHu@devpool35>

On Thu, Jun 06, 2019 at 03:16:03PM +0200, Rolf Eike Beer wrote:
> 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.

I just added some patches for gcc9 to 4.14 and 4.19, are you really
going to want to build it on 4.9?

If so, I can try to fix this up...

thanks,

greg k-h

  reply	other threads:[~2019-06-06 15:27 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-06 13:16 Linux 4.9.180 build fails with gcc 9 and 'cleanup_module' specifies less restrictive attribute than its target … Rolf Eike Beer
2019-06-06 15:27 ` Greg KH [this message]
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=20190606152746.GB21921@kroah.com \
    --to=greg@kroah.com \
    --cc=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.