Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1629075

Re: [RFC] minimum gcc version for kernel: raise to gcc-4.3 or 4.6?

Path csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From Geert Uytterhoeven <geert@linux-m68k.org>
Newsgroups linux.kernel
Subject Re: [RFC] minimum gcc version for kernel: raise to gcc-4.3 or 4.6?
Date Sun, 23 Apr 2017 22:20:02 +0200
Message-ID <tzw9b-4O2-13@gated-at.bofh.it> (permalink)
References <sOYp3-2rU-5@gated-at.bofh.it> <sOYIq-2PB-17@gated-at.bofh.it> <twYv0-7Im-13@gated-at.bofh.it> <tyhlU-7Gn-7@gated-at.bofh.it> <tyqpb-4ED-13@gated-at.bofh.it> <tyNOO-1YA-3@gated-at.bofh.it> <tyNYu-2gR-9@gated-at.bofh.it> <tyTKx-5Vo-1@gated-at.bofh.it> <tz5iF-4zx-1@gated-at.bofh.it>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=5rpOh6yV11Fse9jJ437dbzUmI9w46/Ms+c5mv+GAYi8=; b=C6orHEgd6ZItUEtN5gASoUNxFxl2Hci7LPo6jCSI0kKprZmGmCoXnmIbzWRueIBTVA 9Mu/QLGOrb4GPw/57LT9eLlsBn5/rLk4pxhq2y8JBE84FZ0KwbMV4geZ91im/PF9Tkyc HNmPz/XIn9+T1qLqRQX65P+GuAu6OUpp6iHgIhYIP5CCOpLeIjCNnaw9eIPonCy+uT6c rqe6F1ujNSqKe+6vzwm+iIeZmgxmTlSanFhuxCFA6WKFbViUIN88GMTpcas9oc7ClhOj AlT0wzLQJJ599aRvIxSdY4gvmVXCIzKXccvvWwm1koS9GC0qdL45YvcNbYViAIfOsIKp CL/g==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=5rpOh6yV11Fse9jJ437dbzUmI9w46/Ms+c5mv+GAYi8=; b=MQCyzbvfQr/gMDValMBjYxj1Yzdwo9/i8/8ROvX8AHMvOz8hREix06Wf3PY4g2uHNu hG8OnF/0rhDy6+fUyO428CwUBqKWod7iv64BZ+aafZHwvZKLT87KKCu28hCJt/4l1gQ+ M9I0gJ2Zki6KyIoy4uDBidv301JKsJyV6w7wTaE32vMEavu7ALp/3P7s3R0fneZQvZxC r8pp3Huweph/g9MU6wsse9g9mIiXUvL77PrRvfJ10DL3T/dy4hr9AyuYROjarlKkOOvv /EyNtlLEIFB6Uo0Gc06IjW2bRSf5c6Zg478T2tYi31j6iXP/n3fcDjO7Yg24dh1A0CT7 ZU1Q==
X-Gm-Message-State AN3rC/5xVx6v0ukALrsiNFd+bykT1wcBH+BCxWYb1lkcvEwaBaK8PyxX /W/pi3PzLYF7hxvVttYED6ZmGDa/ng==
X-Received by 10.36.254.68 with SMTP id w65mr9479910ith.35.1492978401655; Sun, 23 Apr 2017 13:13:21 -0700 (PDT)
MIME-Version 1.0
X-Google-Sender-Auth 05wsH_mZ8DnES5QW9TRdJ8bRCIE
Content-Type text/plain; charset=UTF-8
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 88
Organization linux.* mail to news gateway
X-Original-Cc "Maciej W. Rozycki" <macro@linux-mips.org>, Kees Cook <keescook@chromium.org>, linux-arch <linux-arch@vger.kernel.org>, linux-kbuild <linux-kbuild@vger.kernel.org>, LKML <linux-kernel@vger.kernel.org>, "linux-arm-kernel@lists.infradead.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
X-Original-Date Sun, 23 Apr 2017 22:13:20 +0200
X-Original-Message-ID <CAMuHMdWTiurUSacddYXgW69=QwOrZDV3Zt2DezJauPy8j-GMHw@mail.gmail.com>
X-Original-References <20161216105634.235457-1-arnd@arndb.de> <3302470.IDcDrWa0u6@wuerfel> <CAGXu5jLPRYi+HK=07Zndc8szEKD4mZCqaHJFnHmmoYr7tA1xPw@mail.gmail.com> <CAK8P3a2C2WhWjzF=HrzU15Ncg0juR+nstZukBEpqCrVNW5pnDA@mail.gmail.com> <CAGXu5jLTR+dY_Ayyix5Tg0Yn9LBFAt=j56MQVdJVGue-R-CizA@mail.gmail.com> <CAK8P3a114EVbnhbObfq-4pZp8XCT4fWzMXD+WkRi7iPXs1vFMA@mail.gmail.com> <CAGXu5jJpofLF0qAf0-2iNTesZt-X704Q7L=DpQYdtHY5n2HD0w@mail.gmail.com> <alpine.LFD.2.20.1704220400380.32200@eddie.linux-mips.org> <CAK8P3a28fi0GRcz1yLq+wRkaBBO_w74NnBCY7f3myg78JpaCCQ@mail.gmail.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1629075

Show key headers only | View raw


Hi Arnd,

On Sat, Apr 22, 2017 at 5:30 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> Based on what I found so far, gcc-4 can be pretty much ruled out from
> being the minimum version based on the number of failures I got.
> It's much better than 3.4 but much worse than 4.1 or 4.2 which seem
> fixable on MIPS and x86 at least, and may or may not work depending
> on configuration. So the best two possible (but conflicting) answers I
> have are
>
> a) There are known users on gcc-4.1, and we never break things that
>     work for users, so gcc-4.1 (or possibly 4.0 if a user shows up) would
>     be the minimum version.
> b) gcc-4.1 and 4.2 have too many problems, so users are better off
>     when we tell them to upgrade to something newer, and a minimum
>     version of gcc-4.3 has fewer surprises. We should remove all
>     workarounds for pre-gcc-4.3 compilers and just force a build error
>     message.

If there's no real good reason (brokenness) to deprecate gcc-4.1, I would not
do it.I guess most people using old compilers know what they're doing.

My main motivation for keep on using gcc-4.1 is that it gives many warnings
that were disabled in later gcc versions.  I do look at all new warnings, and
send patches when they are real bugs, or are trivial to silence.

Lately the usefulness has been decreasing, as you've been too aggressively
killing compiler warnings with recent gcc versions (which became better) ;-)
Hence if I detected a new warning with a point or an rc release, it usually
means the code was never in nex (ugh)t, or the maintainer ignored your patch.

I could easily switch to v4.9 from kernel.org crosstool, though, but then I
would loose all those warnings.

BTW, below is the diff I use to avoid an ICE.
After that, it builds and (test)boots fine on ARAnyM ;-)

diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index ec0848fcca02d896..eb75b324ac0ac53d 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -650,13 +650,16 @@ int gfs2_glock_get(struct gfs2_sbd *sdp, u64 number,
                   struct gfs2_glock **glp)
 {
        struct super_block *s = sdp->sd_vfs;
-       struct lm_lockname name = { .ln_number = number,
+       // FIXME Avoid gcc 4.1.2 20061115 (prerelease) (Ubuntu 4.1.1-21) ICE
+       //struct lm_lockname name = { .ln_number = number,
+       struct lm_lockname name = {
                                    .ln_type = glops->go_type,
                                    .ln_sbd = sdp };
        struct gfs2_glock *gl, *tmp = NULL;
        struct address_space *mapping;
        struct kmem_cache *cachep;
        int ret, tries = 0;
+       name.ln_number = number;

        rcu_read_lock();
        gl = rhashtable_lookup_fast(&gl_hash_table, &name, ht_parms);
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index 86ccc01593937d93..8783b72df5fa3d0c 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -1767,7 +1767,11 @@ static void try_rgrp_unlink(struct gfs2_rgrpd
*rgd, u64 *last_unlinked, u64 skip
        struct gfs2_inode *ip;
        int error;
        int found = 0;
-       struct gfs2_rbm rbm = { .rgd = rgd, .bii = 0, .offset = 0 };
+       // FIXME Avoid gcc 4.1.2 20061115 (prerelease) (Ubuntu 4.1.1-21) ICE
+       // struct gfs2_rbm rbm = { .rgd = rgd, .bii = 0, .offset = 0 };
+       struct gfs2_rbm rbm = { .bii = 0, .offset = 0 };
+       rbm.rgd = rgd;
+

        while (1) {
                down_write(&sdp->sd_log_flush_lock);

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [RFC] minimum gcc version for kernel: raise to gcc-4.3 or 4.6? Kees Cook <keescook@chromium.org> - 2017-04-16 22:00 +0200
  Re: [RFC] minimum gcc version for kernel: raise to gcc-4.3 or 4.6? Arnd Bergmann <arnd@arndb.de> - 2017-04-20 12:20 +0200
    Re: [RFC] minimum gcc version for kernel: raise to gcc-4.3 or 4.6? Kees Cook <keescook@chromium.org> - 2017-04-20 22:00 +0200
      Re: [RFC] minimum gcc version for kernel: raise to gcc-4.3 or 4.6? Arnd Bergmann <arnd@arndb.de> - 2017-04-21 23:00 +0200
        Re: [RFC] minimum gcc version for kernel: raise to gcc-4.3 or 4.6? Kees Cook <keescook@chromium.org> - 2017-04-21 23:10 +0200
          Re: [RFC] minimum gcc version for kernel: raise to gcc-4.3 or 4.6? "Maciej W. Rozycki" <macro@linux-mips.org> - 2017-04-22 05:20 +0200
            Re: [RFC] minimum gcc version for kernel: raise to gcc-4.3 or 4.6? Arnd Bergmann <arnd@arndb.de> - 2017-04-22 17:40 +0200
              Re: [RFC] minimum gcc version for kernel: raise to gcc-4.3 or 4.6? Geert Uytterhoeven <geert@linux-m68k.org> - 2017-04-23 22:20 +0200
                Re: [RFC] minimum gcc version for kernel: raise to gcc-4.3 or 4.6? Arnd Bergmann <arnd@arndb.de> - 2017-04-24 11:50 +0200
                Re: [RFC] minimum gcc version for kernel: raise to gcc-4.3 or 4.6? Geert Uytterhoeven <geert@linux-m68k.org> - 2017-04-24 12:20 +0200
                Re: [RFC] minimum gcc version for kernel: raise to gcc-4.3 or 4.6? Arnd Bergmann <arnd@arndb.de> - 2017-04-24 16:20 +0200
                Re: [RFC] minimum gcc version for kernel: raise to gcc-4.3 or 4.6? "Maciej W. Rozycki" <macro@linux-mips.org> - 2017-04-24 19:00 +0200
                Re: [RFC] minimum gcc version for kernel: raise to gcc-4.3 or 4.6? Arnd Bergmann <arnd@arndb.de> - 2017-04-24 19:40 +0200
                Re: [RFC] minimum gcc version for kernel: raise to gcc-4.3 or 4.6? Geert Uytterhoeven <geert@linux-m68k.org> - 2017-04-24 20:20 +0200
                Re: [RFC] minimum gcc version for kernel: raise to gcc-4.3 or 4.6? "Maciej W. Rozycki" <macro@linux-mips.org> - 2017-04-24 20:40 +0200
                Re: [RFC] minimum gcc version for kernel: raise to gcc-4.3 or 4.6? Arnd Bergmann <arnd@arndb.de> - 2017-04-24 22:40 +0200

csiph-web