From patchwork Mon Apr 24 20:30:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9697181 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 01FC7603F2 for ; Mon, 24 Apr 2017 20:30:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E98D01FF61 for ; Mon, 24 Apr 2017 20:30:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DE451283F9; Mon, 24 Apr 2017 20:30:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F1AE01FFD6 for ; Mon, 24 Apr 2017 20:30:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S972826AbdDXUa4 (ORCPT ); Mon, 24 Apr 2017 16:30:56 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:35188 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S972744AbdDXUay (ORCPT ); Mon, 24 Apr 2017 16:30:54 -0400 Received: by mail-oi0-f65.google.com with SMTP id m34so21951641oik.2; Mon, 24 Apr 2017 13:30:54 -0700 (PDT) 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=0ysBNz1HWxHwzKTOTkTqvWA34UgU6qnCf5IzGa1xqO4=; b=sFNsn+Y5rVdUbK0heJ/g7yHLmxy1yeDM0ezK+lSIz8QrbfWDYMUJ9hahGJJrgpmFP/ vOZfj5ran7Xz/hPD+TJpMCcK9jvCe+MkNfTHLqP1JFtO5DdAS29g/+YKMAMT9ne+tGBy mQ6awPhTqFyTDmkqroO4rT5cs7XocxCTcUoV2L5YQvFOuum4l6daefF2BoHcPdyH79ql yhCDnvTZDFnkJj8WjX8H8fmIBFyeu8/oSrC7k0CSWkpYMmbdBs+0Y3jmME0DwdM+ssVW kmiY6nBlEsA7Ojnu3ejSyj4LN6M9K2gbRVMpIySkGjCruQy8ZLKD+TyHFQWFjhRvMEhX 4I/Q== 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=0ysBNz1HWxHwzKTOTkTqvWA34UgU6qnCf5IzGa1xqO4=; b=ASUmRVhPmp0gAcSlBwA6SUmwSvAZGDfrATwviMVR2+Hv2X7I+haoc1P+LE1T2ZysM2 BADy9GMnw8AbIxTaf/bFHS1c0rNHljfRbpDh6BWArbm7S6wb/vwaHgtoz5L/fQQVAiUt 1PxtXp0msN3J56/d2oYbjD3VCxOay5s5Dv4dQRit5putxIEvEYc9+8oC47CPAHjGCK3D nMR4cybFbdHA/lxqu4xJAzKFhHjdHYbOUvAX3cHBaqrz1zmw6Mfs6BgzEId4MaVtWh2u GK+WzvZPQ2N4q0C/nz6d52cR+Ro6P4Nr0VD2BmpGQOnHvuwwEV7pBFG5zB+x7cwcAOZH hehw== X-Gm-Message-State: AN3rC/70sHiXsXy3D6S+klicRbGHoMYwuw/P7KdjBL12uGF2btactsS7 1cuWQsvlQTMDUI07Qu5e24Vw5UqTvg== X-Received: by 10.157.60.176 with SMTP id z45mr11138984otc.253.1493065853619; Mon, 24 Apr 2017 13:30:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.20.240 with HTTP; Mon, 24 Apr 2017 13:30:52 -0700 (PDT) In-Reply-To: References: <20161216105634.235457-1-arnd@arndb.de> <3302470.IDcDrWa0u6@wuerfel> From: Arnd Bergmann Date: Mon, 24 Apr 2017 22:30:52 +0200 X-Google-Sender-Auth: nEOOdWI0APpOrfsvONMYlmbVaok Message-ID: Subject: Re: [RFC] minimum gcc version for kernel: raise to gcc-4.3 or 4.6? To: "Maciej W. Rozycki" Cc: Geert Uytterhoeven , Kees Cook , linux-arch , linux-kbuild , LKML , "linux-arm-kernel@lists.infradead.org" , Russell King , Andrew Morton , kernel-build-reports@lists.linaro.org, kvmarm@lists.cs.columbia.edu Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Mon, Apr 24, 2017 at 8:30 PM, Maciej W. Rozycki wrote: > On Mon, 24 Apr 2017, Arnd Bergmann wrote: > >> >> So it still fails, but only because of one compiler error that I can avoid by >> disabling that driver, and you probably use a slightly patched compiler >> version that doesn't have this particular bug, or it was a regression between >> gcc-4.1.2 and 4.1.3. > > Umm, I didn't build modules, sorry, because I don't usually use them with > those systems. However I have completed this step now and it also worked > just fine: > > $ ls -la crypto/drbg.o > -rw-r--r-- 1 macro macro 14096 Apr 24 18:59 crypto/drbg.o > $ file crypto/drbg.o > crypto/drbg.o: ELF 32-bit LSB MIPS-I relocatable, MIPS, version 1 (SYSV), not stripped > $ > > so you are likely right that either I have a patch applied to my 4.1.2 > build that has somehow fixed the ICE or it is a 4.1.3 regression (or a bad > patch in your 4.1.3 build). Ok. > BTW I do see these `may be used uninitialized' warnings just as Geert > does and even have a local patch, which I have neglected to submit, for a > 64-bit configuration (`decstation_defconfig' is 32-bit) where in a single > place -Werror turns it into a build failure. I do not consider it a big > issue though, and might even wrap that patch up and submit sometime. I'd recommend dropping that -Werror from mips and the other few architectures that have it, or maybe wrapping it in a Kconfig symbol that is disabled by default. It would also take care of ==> build/mips/bmips_be_defconfig/log <== cc1: warnings being treated as errors /git/arm-soc/arch/mips/bmips/setup.c:37: error: integer constant is too large for 'long' type As mentioned, we can also turn off the warnings by default and let Geert turn them on again: # Tell gcc to never replace conditional load with a non-conditional one KBUILD_CFLAGS += $(call cc-option,--param=allow-store-data-races=0) I've built the remaining defconfigs in the meantime (linux-4.11-rc8, gcc-4.1.3, ARCH=mips) and got 38 builds with warnings and 20 failed builds. There are at least six different build failures and only one ICE among them (only in decstation_defconfig). With gcc-4.3 this is only slightly better: 18 failed build, 20 with warnings and 20 without warnings. With linux-4.3, I saw this failure on 32 defconfigs, and you fixed that in linux-4.7 with e49d38488515 ("MIPS: MSA: Fix a link error on `_init_msa_upper' with older GCC"): arch/mips/built-in.o: In function `enable_restore_fp_context': traps.c:(.text+0xbefc): undefined reference to `_init_msa_upper' traps.c:(.text+0xbfc0): undefined reference to `_init_msa_upper' With gcc-4.9, all mips defconfigs now build without warnings. For the other architectures in linux-4.11-rc8 can actually build with sparc-gcc-4.1, afaict this was a bug that impacted all compilers up to gcc-4.7 and a workaround was added recently. In turn, parisc-gcc-4.1 no longer works on linux-4.11, so we still have only three architectures that can build their 'defconfig' with the old compiler, plus the majority of the mips config files. So while overall I still think that gcc-4.1 is rather broken, it seems that you have it well under control on both mips and m68k. It's possible that some other people use patched gcc-4.1 or only build special configurations on further architectures that I found to be broken with vanilla toolchains and the regular defconfig. How about this approach then: - To keep it simple, we update the README.rst to say that a minimum gcc-4.3 is required, while recommending gcc-4.9 for all architectures - Support for gcc-4.0 and earlier gets removed from linux/compiler.h, and instead we add a summary of what I found, explaining that gcc-4.1 has active users on a few architectures. - We make the Makefile show a warning once during compilation for gcc earlier than 4.3. Arnd --- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/Makefile b/Makefile index 779302695453..2528f60fb9ab 100644 --- a/Makefile +++ b/Makefile @@ -647,8 +647,10 @@ KBUILD_CFLAGS += -O2 endif endif -KBUILD_CFLAGS += $(call cc-ifversion, -lt, 0409, \ - $(call cc-disable-warning,maybe-uninitialized,)) +KBUILD_CFLAGS += $(call cc-ifversion, -lt, 0408, \ + $(call cc-disable-warning,uninitialized, \ + $(call cc-ifversion, -lt, 0409, \ + $(call cc-disable-warning,maybe-uninitialized,))))