From patchwork Wed May 8 15:07:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 1097090 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="u3AUuzvi"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44zfwk4bnSz9s7h for ; Thu, 9 May 2019 01:07:50 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 05AA130E40; Wed, 8 May 2019 15:07:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bi8t1eO++9n0; Wed, 8 May 2019 15:07:35 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 51E9D30CC6; Wed, 8 May 2019 15:07:32 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id A4D901BF25F for ; Wed, 8 May 2019 15:07:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 6577886502 for ; Wed, 8 May 2019 15:07:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mvHuFG6t5p0I for ; Wed, 8 May 2019 15:07:28 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 0542E864C4 for ; Wed, 8 May 2019 15:07:28 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id a12so17565952wrn.4 for ; Wed, 08 May 2019 08:07:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=OUYhHy0P0xAB9cE6wLr5XU7e0I1plJ4Nmb9sQybVVbs=; b=u3AUuzviv1WlSHi4+OFWUru+Q92i38hD9qGA6UkYvWLMikkFvYipkFzybzomhjvEKQ zFCugqr6rc+E5I78xu6iFRlRMPuVJkwHgfvrfQ9GYPGIoDfLS9dBDT9+srkqfaTvkXs5 1eMgzSwee0FQXIUedMxYxvhoYM7bHoeOL1vQDsEeOr2f4pxoZLEhRpACRlF9v6dXKv8M iA69uJ5VUT2Ozs5kcBAdTbpRZvjP4+GsM7QeEk9Zu3Sbu9njzUyGqULlpxRE2OwSaOd+ 2/uMxX9V9Gl7H8WRujfkNrtpixJzswo1p9+uNicu6gsLyj5SvKXeHnOLRuYh6zRUa9cl 2/xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=OUYhHy0P0xAB9cE6wLr5XU7e0I1plJ4Nmb9sQybVVbs=; b=ULa+IIS19ZdI2epEKwD3DH/ubVqXMVr2KzJMURXcTRAsvKDptQQzKJsFad0rKDWSYt WPhDrapaCv67YGNGGKoB4gnkb4da3fwpkCbBxboYk4Jcy7SOjhsNWHmw5uN2htNafI8C d0QJrML+LpnsMis0dEbWjHygvCmzT7VbZnY1TTf0QYNnQi1MIiU9mG3xTqaX6tEbOcym RoPJKuLrmaOu6DWo9AHi8Tdbm/nbsy3F/okyzz+FpynmMC+FtZApeXXlDx/0tW1Ga4oy 8R0epDV+IuOOIihmvKRh+qyaKgUqxG+Q1eJ6hb7KcoF9slNhxeKq46NGXWWC7SwB3YU3 qgRg== X-Gm-Message-State: APjAAAVvaRsezuHgT+XKXTBW8iDAxV1/4/xpMSvB71dk0EDfC9MN/LKW sH1gUPOaZT7XbAWUK+BaNqh2uYK4 X-Google-Smtp-Source: APXvYqyTlSvLy/duwgNqpMxN5mZSmzVYclMJw6xc+fsrpfFdPrLzPzLHtoI7u4G5sDIhdS+xqCY3hQ== X-Received: by 2002:adf:b3d1:: with SMTP id x17mr12253372wrd.31.1557328046131; Wed, 08 May 2019 08:07:26 -0700 (PDT) Received: from localhost.localdomain (2a01cb0589880c008a3268f7cbc0fc5c.ipv6.abo.wanadoo.fr. [2a01:cb05:8988:c00:8a32:68f7:cbc0:fc5c]) by smtp.gmail.com with ESMTPSA id o6sm36315359wrh.55.2019.05.08.08.07.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 08 May 2019 08:07:25 -0700 (PDT) From: Romain Naour To: buildroot@buildroot.org Date: Wed, 8 May 2019 17:07:07 +0200 Message-Id: <20190508150720.27946-3-romain.naour@gmail.com> X-Mailer: git-send-email 2.14.5 In-Reply-To: <20190508150720.27946-1-romain.naour@gmail.com> References: <20190508150720.27946-1-romain.naour@gmail.com> Subject: [Buildroot] [PATCH v2 02/15] linux: disable Werror for powerpc kernels X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Naour MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "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). 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 Signed-off-by: Romain Naour --- 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. --- linux/linux.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linux/linux.mk b/linux/linux.mk index 51fd41fa15..85364451a8 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -315,6 +315,8 @@ define LINUX_KCONFIG_FIXUP_CMDS $(LINUX_FIXUP_CONFIG_ENDIANNESS) $(if $(BR2_arm)$(BR2_armeb), $(call KCONFIG_ENABLE_OPT,CONFIG_AEABI,$(@D)/.config)) + $(if $(BR2_powerpc)$(BR2_powerpc64)$(BR2_powerpc64le), + $(call KCONFIG_ENABLE_OPT,CONFIG_PPC_DISABLE_WERROR,$(@D)/.config)) $(if $(BR2_TARGET_ROOTFS_CPIO), $(call KCONFIG_ENABLE_OPT,CONFIG_BLK_DEV_INITRD,$(@D)/.config)) # As the kernel gets compiled before root filesystems are