[Buildroot] [PATCH v4 02/15] linux: disable Werror for powerpc kernels
Baruch Siach
baruch at tkos.co.il
Tue Jun 25 03:05:20 UTC 2019
Hi Peter,
On Mon, Jun 24 2019, Peter Korsgaard wrote:
>>>>>> "Giulio" == Giulio Benetti <giulio.benetti at micronovasrl.com> writes:
>
> > From: Romain Naour <romain.naour at gmail.com>
> > 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).
>
> > For the same reason why we remove Werror in packages's compiler
> > flags. Building with Werror is not bulletproof when we start
> > using a newer compiler that introduce new warnings.
> > This is the case here.
>
> > Also this option is a bit strange since it's specific to ppc kernels:
> > "The intention is to make it harder for people to inadvertantly
> > introduce warnings in the arch/powerpc code."
> > Other kernel developers on other arch may be interested by a
> > similar/more generic option.
>
> > So, It's clearly intended for kernel developers.
>
> > Instead of backporting this patch [1] to kernel 4.19, select
> > unconditionally the Kconfig option CONFIG_PPC_DISABLE_WERROR
> > that allow to disable Werror.
>
> > 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
>
> > Fix-suggested-by: Yann E. MORIN <yann.morin.1998 at free.fr>
> > Signed-off-by: Romain Naour <romain.naour at gmail.com>
> > Signed-off-by: Giulio Benetti <giulio.benetti at micronovasrl.com>
> > ---
> > v2: add a shared fragment in board/fragments/linux and update
> > qemu ppc* defconfigs. (Arnout)
>
> > v3: commit log (Yann)
> > enable the option from linux.mk instead of the defconfig.
>
> Committed to 2019.02.x and 2019.05.x, thanks.
It is in 2019.02.x, but not in 2019.05.x as of commit 1818dae1e0.
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
More information about the buildroot
mailing list