All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] board/qemu/ppc*: disable Werror while building ppc kernel with gcc >= 9.1
@ 2019-05-01 12:52 Romain Naour
  2019-05-01 13:32 ` Arnout Vandecappelle
  0 siblings, 1 reply; 6+ messages in thread
From: Romain Naour @ 2019-05-01 12:52 UTC (permalink / raw)
  To: buildroot

From patch [1] included in kernel >= 5.0:
"The upcoming GCC 9 release extends the -Wmissing-attributes warnings
(enabled by -Wall) to C and aliases: it warns when particular function
attributes are missing in the aliases but not in their target.

In particular, it triggers for all the init/cleanup_module
aliases in the kernel (defined by the module_init/exit macros),
ending up being very noisy.

These aliases point to the __init/__exit functions of a module,
which are defined as __cold (among other attributes). However,
the aliases themselves do not have the __cold attribute.

Since the compiler behaves differently when compiling a __cold
function as well as when compiling paths leading to calls
to __cold functions, the warning is trying to point out
the possibly-forgotten attribute in the alias."

Werror is set by default while building ppc kernel [2], but
some warning can be introduced while building current kernel with
newer compiler (for example building kernel 4.19 with gcc 9.1).

Instead of backporting this patch [1] to kernel 4.19, select
the Kconfig option CONFIG_PPC_DISABLE_WERROR that allow to
disable Werror.

Add CONFIG_PPC_DISABLE_WERROR only for qemu ppc{64} defconfig
since they are used for CI with toolchain-builder's gitlab [3].

Fixes:
https://gitlab.com/kubu93/toolchains-builder/-/jobs/205435741

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=a6e60d84989fa0e91db7f236eda40453b0e44afa
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=ba55bd74360ea4b8b95e73ed79474d37ff482b36
[3] https://gitlab.com/bootlin/toolchains-builder

Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
Note: It can be usefull to select CONFIG_PPC_DISABLE_WERROR for
other ppc board defconfig.
---
 board/qemu/ppc-g3beige/linux.config       | 1 +
 board/qemu/ppc-mpc8544ds/linux.config     | 1 +
 board/qemu/ppc-virtex-ml507/linux.config  | 1 +
 board/qemu/ppc64-e5500/linux.fragment     | 2 ++
 board/qemu/ppc64-pseries/linux.fragment   | 1 +
 board/qemu/ppc64le-pseries/linux.fragment | 1 +
 configs/qemu_ppc64_pseries_defconfig      | 1 +
 configs/qemu_ppc64le_pseries_defconfig    | 1 +
 8 files changed, 9 insertions(+)
 create mode 100644 board/qemu/ppc64-pseries/linux.fragment
 create mode 100644 board/qemu/ppc64le-pseries/linux.fragment

diff --git a/board/qemu/ppc-g3beige/linux.config b/board/qemu/ppc-g3beige/linux.config
index 7994553544..a65df7d807 100644
--- a/board/qemu/ppc-g3beige/linux.config
+++ b/board/qemu/ppc-g3beige/linux.config
@@ -23,3 +23,4 @@ CONFIG_EXT4_FS=y
 CONFIG_TMPFS=y
 CONFIG_TMPFS_POSIX_ACL=y
 CONFIG_BOOTX_TEXT=y
+CONFIG_PPC_DISABLE_WERROR=y
diff --git a/board/qemu/ppc-mpc8544ds/linux.config b/board/qemu/ppc-mpc8544ds/linux.config
index b36847c93d..ec65510d9d 100644
--- a/board/qemu/ppc-mpc8544ds/linux.config
+++ b/board/qemu/ppc-mpc8544ds/linux.config
@@ -36,3 +36,4 @@ CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_EHCI_FSL=y
 CONFIG_USB_OHCI_HCD=y
 CONFIG_TMPFS=y
+CONFIG_PPC_DISABLE_WERROR=y
diff --git a/board/qemu/ppc-virtex-ml507/linux.config b/board/qemu/ppc-virtex-ml507/linux.config
index ed4eb792b6..b07ba6e5fb 100644
--- a/board/qemu/ppc-virtex-ml507/linux.config
+++ b/board/qemu/ppc-virtex-ml507/linux.config
@@ -34,3 +34,4 @@ CONFIG_EXT4_FS=y
 CONFIG_AUTOFS4_FS=y
 CONFIG_VFAT_FS=y
 CONFIG_TMPFS=y
+CONFIG_PPC_DISABLE_WERROR=y
diff --git a/board/qemu/ppc64-e5500/linux.fragment b/board/qemu/ppc64-e5500/linux.fragment
index 071a55ccf7..7a33b09065 100644
--- a/board/qemu/ppc64-e5500/linux.fragment
+++ b/board/qemu/ppc64-e5500/linux.fragment
@@ -8,3 +8,5 @@ CONFIG_VIRTIO_PCI=y
 CONFIG_HW_RANDOM_VIRTIO=y
 CONFIG_VIRTIO_BLK=y
 CONFIG_VIRTIO_NET=y
+
+CONFIG_PPC_DISABLE_WERROR=y
diff --git a/board/qemu/ppc64-pseries/linux.fragment b/board/qemu/ppc64-pseries/linux.fragment
new file mode 100644
index 0000000000..6ea12a1243
--- /dev/null
+++ b/board/qemu/ppc64-pseries/linux.fragment
@@ -0,0 +1 @@
+CONFIG_PPC_DISABLE_WERROR=y
diff --git a/board/qemu/ppc64le-pseries/linux.fragment b/board/qemu/ppc64le-pseries/linux.fragment
new file mode 100644
index 0000000000..6ea12a1243
--- /dev/null
+++ b/board/qemu/ppc64le-pseries/linux.fragment
@@ -0,0 +1 @@
+CONFIG_PPC_DISABLE_WERROR=y
diff --git a/configs/qemu_ppc64_pseries_defconfig b/configs/qemu_ppc64_pseries_defconfig
index 5f55b246f7..38c9ad5654 100644
--- a/configs/qemu_ppc64_pseries_defconfig
+++ b/configs/qemu_ppc64_pseries_defconfig
@@ -19,3 +19,4 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
 BR2_LINUX_KERNEL_DEFCONFIG="pseries"
 BR2_LINUX_KERNEL_VMLINUX=y
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/qemu/ppc64-pseries/linux.fragment"
diff --git a/configs/qemu_ppc64le_pseries_defconfig b/configs/qemu_ppc64le_pseries_defconfig
index 8356e4e250..bf00009e45 100644
--- a/configs/qemu_ppc64le_pseries_defconfig
+++ b/configs/qemu_ppc64le_pseries_defconfig
@@ -19,3 +19,4 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
 BR2_LINUX_KERNEL_DEFCONFIG="pseries_le"
 BR2_LINUX_KERNEL_VMLINUX=y
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/qemu/ppc64le-pseries/linux.fragment"
-- 
2.14.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH] board/qemu/ppc*: disable Werror while building ppc kernel with gcc >= 9.1
  2019-05-01 12:52 [Buildroot] [PATCH] board/qemu/ppc*: disable Werror while building ppc kernel with gcc >= 9.1 Romain Naour
@ 2019-05-01 13:32 ` Arnout Vandecappelle
  2019-05-01 13:57   ` Romain Naour
  0 siblings, 1 reply; 6+ messages in thread
From: Arnout Vandecappelle @ 2019-05-01 13:32 UTC (permalink / raw)
  To: buildroot



On 01/05/2019 14:52, Romain Naour wrote:
> Add CONFIG_PPC_DISABLE_WERROR only for qemu ppc{64} defconfig
> since they are used for CI with toolchain-builder's gitlab [3].

 Maybe it would be better to have a single fragment file
board/linux-ppc-disable-werror.fragment
and include that in all the relevant defconfigs, rather than updating each linux
config?

 Regards,
 Arnout

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH] board/qemu/ppc*: disable Werror while building ppc kernel with gcc >= 9.1
  2019-05-01 13:32 ` Arnout Vandecappelle
@ 2019-05-01 13:57   ` Romain Naour
  2019-05-01 19:38     ` Thomas Petazzoni
  2019-05-02 12:27     ` Arnout Vandecappelle
  0 siblings, 2 replies; 6+ messages in thread
From: Romain Naour @ 2019-05-01 13:57 UTC (permalink / raw)
  To: buildroot

Hi Arnout,

Le 01/05/2019 ? 15:32, Arnout Vandecappelle a ?crit?:
> 
> 
> On 01/05/2019 14:52, Romain Naour wrote:
>> Add CONFIG_PPC_DISABLE_WERROR only for qemu ppc{64} defconfig
>> since they are used for CI with toolchain-builder's gitlab [3].
> 
>  Maybe it would be better to have a single fragment file
> board/linux-ppc-disable-werror.fragment
> and include that in all the relevant defconfigs, rather than updating each linux
> config?

I'm not sure how to handle such fragments in Buildroot.
Storing fragments in board directory seems not great.

Maybe add a new fragments directory in linux package directory:
linux/fragments/linux-ppc-disable-werror.fragment

Or a new directory configs/fragments/linux/linux-ppc-disable-werror.fragment

Thought ?

Best regards,
Romain

> 
>  Regards,
>  Arnout
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH] board/qemu/ppc*: disable Werror while building ppc kernel with gcc >= 9.1
  2019-05-01 13:57   ` Romain Naour
@ 2019-05-01 19:38     ` Thomas Petazzoni
  2019-05-01 19:47       ` Romain Naour
  2019-05-02 12:27     ` Arnout Vandecappelle
  1 sibling, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2019-05-01 19:38 UTC (permalink / raw)
  To: buildroot

Hello Romain,

On Wed, 1 May 2019 15:57:47 +0200
Romain Naour <romain.naour@gmail.com> wrote:

> >  Maybe it would be better to have a single fragment file
> > board/linux-ppc-disable-werror.fragment
> > and include that in all the relevant defconfigs, rather than updating each linux
> > config?  
> 
> I'm not sure how to handle such fragments in Buildroot.
> Storing fragments in board directory seems not great.

Why ? We already have plenty of these:

$ find board/ | grep frag
board/beaglebone/linux-4.1-sgx.fragment
board/technologic/ts4800/linux.fragment
board/engicam/icorem6/linux_qt5.fragment
board/orangepi/orangepi-pc/linux.fragment
board/amarula/vyasa/linux_gmac.fragment
board/udoo/mx6qdl/linux.fragment
board/lego/ev3/linux.fragment
board/lego/ev3/busybox.fragment
board/stmicroelectronics/stm32mp157-dk/uboot-fragment.config
board/freescale/imx6-sabresd/linux_qt5.fragment
board/freescale/warpboard/linux.fragment
board/solidrun/macchiatobin/uboot-fragment.config
board/solidrun/clearfog/linux.fragment
board/synopsys/hsdk/linux.fragment
board/qemu/nios2-10m50/linux.fragment
board/qemu/ppc64-e5500/linux.fragment
board/lemaker/bananapro/linux-wifi.fragment
board/chromebook/snow/linux-4.15.fragment
board/olimex/imx233_olinuxino/linux-wifi.fragment

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH] board/qemu/ppc*: disable Werror while building ppc kernel with gcc >= 9.1
  2019-05-01 19:38     ` Thomas Petazzoni
@ 2019-05-01 19:47       ` Romain Naour
  0 siblings, 0 replies; 6+ messages in thread
From: Romain Naour @ 2019-05-01 19:47 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

Le 01/05/2019 ? 21:38, Thomas Petazzoni a ?crit?:
> Hello Romain,
> 
> On Wed, 1 May 2019 15:57:47 +0200
> Romain Naour <romain.naour@gmail.com> wrote:
> 
>>>  Maybe it would be better to have a single fragment file
>>> board/linux-ppc-disable-werror.fragment
>>> and include that in all the relevant defconfigs, rather than updating each linux
>>> config?  
>>
>> I'm not sure how to handle such fragments in Buildroot.
>> Storing fragments in board directory seems not great.
> 
> Why ? We already have plenty of these:
> 
> $ find board/ | grep frag
> board/beaglebone/linux-4.1-sgx.fragment
> board/technologic/ts4800/linux.fragment
> board/engicam/icorem6/linux_qt5.fragment
> board/orangepi/orangepi-pc/linux.fragment
> board/amarula/vyasa/linux_gmac.fragment
> board/udoo/mx6qdl/linux.fragment
> board/lego/ev3/linux.fragment
> board/lego/ev3/busybox.fragment
> board/stmicroelectronics/stm32mp157-dk/uboot-fragment.config
> board/freescale/imx6-sabresd/linux_qt5.fragment
> board/freescale/warpboard/linux.fragment
> board/solidrun/macchiatobin/uboot-fragment.config
> board/solidrun/clearfog/linux.fragment
> board/synopsys/hsdk/linux.fragment
> board/qemu/nios2-10m50/linux.fragment
> board/qemu/ppc64-e5500/linux.fragment
> board/lemaker/bananapro/linux-wifi.fragment
> board/chromebook/snow/linux-4.15.fragment
> board/olimex/imx233_olinuxino/linux-wifi.fragment

I mean storing the fragment in board/linux-ppc-disable-werror.fragment that is
shared between several boards.

Each existing linux.fragment are only used by one board.

Best regards,
Romain

> 
> Best regards,
> 
> Thomas
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH] board/qemu/ppc*: disable Werror while building ppc kernel with gcc >= 9.1
  2019-05-01 13:57   ` Romain Naour
  2019-05-01 19:38     ` Thomas Petazzoni
@ 2019-05-02 12:27     ` Arnout Vandecappelle
  1 sibling, 0 replies; 6+ messages in thread
From: Arnout Vandecappelle @ 2019-05-02 12:27 UTC (permalink / raw)
  To: buildroot



On 01/05/2019 15:57, Romain Naour wrote:
> Hi Arnout,
> 
> Le 01/05/2019 ? 15:32, Arnout Vandecappelle a ?crit?:
>>
>>
>> On 01/05/2019 14:52, Romain Naour wrote:
>>> Add CONFIG_PPC_DISABLE_WERROR only for qemu ppc{64} defconfig
>>> since they are used for CI with toolchain-builder's gitlab [3].
>>
>>  Maybe it would be better to have a single fragment file
>> board/linux-ppc-disable-werror.fragment
>> and include that in all the relevant defconfigs, rather than updating each linux
>> config?
> 
> I'm not sure how to handle such fragments in Buildroot.
> Storing fragments in board directory seems not great.

 Maybe in board/shared then?


> Maybe add a new fragments directory in linux package directory:
> linux/fragments/linux-ppc-disable-werror.fragment

 I don't like that. that. IMO, the linux/ directory should only contain stuff
that is used by the linux package infra itself. IMO the defconfigs should only
refer to paths in board/ and utils/.

 We currently have two exceptions to that "rule": genimage.sh which is in
support/scripts instead of utils, and busybox-minimal.config which is in the
busybox directory.


> Or a new directory configs/fragments/linux/linux-ppc-disable-werror.fragment

 I feel that configs/ is an artefact of the kconfig infra, it would in fact be a
lot more logical to have the defconfigs in the board directory. But
board/fragments/linux would work as well. Though I don't see many other shared
fragments than linux config fragments...

 Regards,
 Arnout


> 
> Thought ?
> 
> Best regards,
> Romain
> 
>>
>>  Regards,
>>  Arnout
>>
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-05-02 12:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-01 12:52 [Buildroot] [PATCH] board/qemu/ppc*: disable Werror while building ppc kernel with gcc >= 9.1 Romain Naour
2019-05-01 13:32 ` Arnout Vandecappelle
2019-05-01 13:57   ` Romain Naour
2019-05-01 19:38     ` Thomas Petazzoni
2019-05-01 19:47       ` Romain Naour
2019-05-02 12:27     ` Arnout Vandecappelle

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.