From: Arnd Bergmann <arnd@arndb.de>
To: linux-arch@vger.kernel.org
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Russell King <rmk+kernel@armlinux.org.uk>,
Andrew Morton <akpm@linux-foundation.org>,
kernel-build-reports@lists.linaro.org,
kvmarm@lists.cs.columbia.edu
Subject: Re: [RFC] minimum gcc version for kernel: raise to gcc-4.3 or 4.6?
Date: Fri, 16 Dec 2016 12:14:45 +0100 [thread overview]
Message-ID: <3302470.IDcDrWa0u6@wuerfel> (raw)
In-Reply-To: <20161216105634.235457-1-arnd@arndb.de>
[Fixed linux-arm-kernel mailing list address, sorry for the duplicate,
I'm not reposting all the ugly patches though, unless someone really
wants them, https://lkml.org/lkml/2016/12/16/174 has a copy]
On Friday, December 16, 2016 11:56:21 AM CET Arnd Bergmann wrote:
> I had some fun doing build testing with older gcc versions, building
> every release from 4.0 through 7.0 and running that on my randconfig
> setup to see what comes out.
>
> First of all, gcc-4.9 and higher is basically warning-free everywhere,
> although gcc-7 introduces some interesting new warnings (I have started
> doing patches for those as well). gcc-4.8 is probably good, too, and
> gcc-4.6 and 4.7 at least don't produce build failures in general, though
> the level of false-positive warnings increases (we could decide to turn
> those off for older compilers for build test purposes).
>
> In gcc-4.5 and below, dead code elimination is not as good as later,
> causing a couple of link errors, and some of them have no good workaround
> (see patch 1). It would be nice to declare that version too old, but
> several older distros that are still in wide use ship with compilers
> earlier than 4.6:
>
> RHEL6: gcc-4.4
> Debian 6: gcc-4.4
> Ubuntu 10.04: gcc-4.4
> SLES11: gcc-4.3
>
> With gcc-4.3, we need a couple of workaround patches beyond the problem
> mentioned above, more configuration options are unavailable and we get
> a significant number of false-positive warnings, but it's not much worse
> than gcc-4.5 otherwise.
>
> These are the options I had to disable to get gcc-4.3 randconfig builds
> working:
>
> CONFIG_HAVE_GCC_PLUGINS
> CONFIG_CC_STACKPROTECTOR_STRONG
> CONFIG_ARM_SINGLE_ARMV7M
> CONFIG_THUMB2_KERNEL
> CONFIG_KERNEL_MODE_NEON
> CONFIG_VDSO
> CONFIG_FUNCTION_TRACER (with CONFIG_FRAME_POINTER=n)
>
> I have not checked in detail which version is required for
> each of the above.
>
> Specifically on ARM, going further makes things rather useless especially
> for build testing: with gcc-4.2, we lose support for ARMv7, EABI, and
> effectively ARMv6 (as it relies on EABI for building reliably). Also,
> the number of false-positive build warnings is so high that it is useless
> for finding actual bugs from the warnings.
>
> See the replies to this mail for 13 patches I needed to work around
> issues for each of the releases before 4.6. I have also submitted
> some separate patches for issues that I considered actual bugs
> uncovered by the older compilers and that should be applied regardless.
>
> The original gcc-4.3 release was in early 2008. If we decide to still
> support that, we probably want the first 10 quirks in this series,
> while gcc-4.6 (released in 2011) requires none of them.
>
> Arnd
>
> Arnd Bergmann (13):
> [HACK] gcc-4.5: avoid link errors for unused function pointers
> KVM: arm: fix gcc-4.5 build
> ARM: div64: fix building with gcc-4.5 and lower
> vfio-pci: use 32-bit comparisons for register address for gcc-4.5
> clk: pxa: fix gcc-4.4 build
> ARM: atomic: fix gcc-4.4 build
> watchdog: kempld: fix gcc-4.3 build
> arm/arm64: xen: avoid gcc-4.4 warning
> ARM: mark cmpxchg and xchg __always_inline for gcc-4.3
> asm-generic: mark cmpxchg as __always_inline for gcc-4.3
> fs: fix unsigned enum warning with gcc-4.2
> KVM: arm: avoid binary number literals for gcc-4.2
> ARM: avoid 'Q' asm constraint for gcc-4.1 and earlier
>
> arch/arm/include/asm/atomic.h | 10 ++++++++--
> arch/arm/include/asm/cmpxchg.h | 12 ++++++------
> arch/arm/include/asm/div64.h | 17 +++--------------
> arch/arm/include/asm/io.h | 8 ++++++++
> arch/arm/include/asm/kvm_mmu.h | 2 +-
> arch/arm/include/asm/percpu.h | 5 ++++-
> arch/arm/mach-imx/pm-imx5.c | 20 ++++++++++++++++----
> arch/arm/mach-sa1100/pm.c | 2 ++
> arch/arm/plat-samsung/pm.c | 4 ++++
> drivers/clk/pxa/clk-pxa.c | 3 +--
> drivers/dma/ti-dma-crossbar.c | 4 ++++
> drivers/firmware/psci_checker.c | 3 +++
> drivers/iio/adc/exynos_adc.c | 3 +++
> drivers/net/ethernet/via/via-rhine.c | 6 ++++++
> drivers/vfio/pci/vfio_pci_rdwr.c | 5 ++++-
> drivers/watchdog/kempld_wdt.c | 9 ++++++++-
> include/asm-generic/cmpxchg-local.h | 7 ++++---
> include/linux/fs.h | 2 +-
> include/xen/arm/page.h | 1 +
> virt/kvm/arm/vgic/vgic-its.c | 4 ++--
> virt/kvm/arm/vgic/vgic-mmio-v3.c | 8 ++++----
> virt/kvm/arm/vgic/vgic-mmio.c | 16 ++++++++--------
> virt/kvm/arm/vgic/vgic-mmio.h | 12 ++++++------
> 23 files changed, 107 insertions(+), 56 deletions(-)
>
>
next prev parent reply other threads:[~2016-12-16 11:15 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-16 10:56 [RFC] minimum gcc version for kernel: raise to gcc-4.3 or 4.6? Arnd Bergmann
2016-12-16 10:56 ` [PATCH 01/13] [HACK] gcc-4.5: avoid link errors for unused function pointers Arnd Bergmann
2016-12-16 10:56 ` [PATCH 02/13] KVM: arm: fix gcc-4.5 build Arnd Bergmann
2017-01-04 10:38 ` Christoffer Dall
2016-12-16 10:56 ` [PATCH 03/13] ARM: div64: fix building with gcc-4.5 and lower Arnd Bergmann
2016-12-16 10:56 ` [PATCH 04/13] vfio-pci: use 32-bit comparisons for register address for gcc-4.5 Arnd Bergmann
2016-12-16 15:30 ` Alex Williamson
2016-12-16 19:50 ` Arnd Bergmann
2016-12-16 10:56 ` [PATCH 05/13] clk: pxa: fix gcc-4.4 build Arnd Bergmann
2016-12-16 10:56 ` [PATCH 06/13] ARM: atomic: " Arnd Bergmann
2016-12-16 10:56 ` [PATCH 07/13] watchdog: kempld: fix gcc-4.3 build Arnd Bergmann
2016-12-16 10:56 ` [PATCH 08/13] arm/arm64: xen: avoid gcc-4.4 warning Arnd Bergmann
2016-12-16 10:56 ` [PATCH 09/13] ARM: mark cmpxchg and xchg __always_inline for gcc-4.3 Arnd Bergmann
2016-12-16 10:56 ` [PATCH 10/13] asm-generic: mark cmpxchg as " Arnd Bergmann
2016-12-16 10:56 ` [PATCH 11/13] fs: fix unsigned enum warning with gcc-4.2 Arnd Bergmann
2017-01-03 22:47 ` Brendan Gregg
2017-02-28 21:53 ` Brendan Gregg
2016-12-16 10:56 ` [PATCH 12/13] KVM: arm: avoid binary number literals for gcc-4.2 Arnd Bergmann
2017-01-04 10:39 ` Christoffer Dall
2016-12-16 10:56 ` [PATCH 13/13] ARM: avoid 'Q' asm constraint for gcc-4.1 and earlier Arnd Bergmann
2016-12-16 11:14 ` Arnd Bergmann [this message]
2017-04-16 19:52 ` [RFC] minimum gcc version for kernel: raise to gcc-4.3 or 4.6? Kees Cook
2017-04-20 10:15 ` Arnd Bergmann
2017-04-20 19:52 ` Kees Cook
2017-04-21 20:55 ` Arnd Bergmann
2017-04-21 21:05 ` Kees Cook
2017-04-22 3:10 ` Maciej W. Rozycki
2017-04-22 15:30 ` Arnd Bergmann
2017-04-23 20:13 ` Geert Uytterhoeven
2017-04-24 9:44 ` Arnd Bergmann
2017-04-24 10:17 ` Geert Uytterhoeven
2017-04-24 14:13 ` Arnd Bergmann
2017-04-24 16:53 ` Maciej W. Rozycki
2017-04-24 17:29 ` Arnd Bergmann
2017-04-24 18:16 ` Geert Uytterhoeven
2017-04-24 18:30 ` Maciej W. Rozycki
2017-04-24 20:30 ` Arnd Bergmann
2017-04-24 20:52 ` Kees Cook
2017-04-25 7:06 ` Geert Uytterhoeven
2017-04-25 9:22 ` Suzuki K Poulose
2016-12-16 15:54 ` Geert Uytterhoeven
2016-12-16 19:58 ` Arnd Bergmann
2016-12-16 20:34 ` Geert Uytterhoeven
2016-12-16 17:00 ` Sebastian Andrzej Siewior
2016-12-16 22:00 ` Arnd Bergmann
2016-12-17 11:29 ` Sebastian Andrzej Siewior
2017-01-02 12:23 ` Russell King - ARM Linux
2016-12-20 9:59 ` Heiko Carstens
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=3302470.IDcDrWa0u6@wuerfel \
--to=arnd@arndb.de \
--cc=akpm@linux-foundation.org \
--cc=kernel-build-reports@lists.linaro.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rmk+kernel@armlinux.org.uk \
/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