Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2265819imu; Sat, 12 Jan 2019 20:51:35 -0800 (PST) X-Google-Smtp-Source: ALg8bN6502AY2CrxCcs/segyiqesftM34+vi89ZgdpT2gUXT8xMvouxMNvzfsj1nb6niqMOXaNgv X-Received: by 2002:a63:4a0a:: with SMTP id x10mr18764431pga.237.1547355095465; Sat, 12 Jan 2019 20:51:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547355095; cv=none; d=google.com; s=arc-20160816; b=BcIXHXFmb+VYUWD8X0cDawWx7di9Ok0n/t3/MALhcdPuKrueMgfSitkPY6HfdPVmI1 GwEFrbbZDRPDBdvB/XDIwVyyA3UjAdr/vaG0AhDa1xPhpotj5dusGcGbgRqrUSS6WM94 tqMXMT/0kODozgWwNZ1aQbXwNUTAb3BBMN1Vbmq04PCoz3UnYH7xgIlLbWJNyZ/j9J/P hpZl6/q+Dg8UF0/HznvVdLvfrufiZrleBb3U3nvjVgjsAVH2cHIz49dmlkYcpaez/Om4 gPnln9+cLlNrT/Ay6EAy9ukHK/orfzcyyCd3Y8ZugyFC1UFiUjaWCOBPD2hqPkYfvqCb Ooug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature:dkim-filter; bh=MLmbrY6gJCTsikFhFlVTaYkEc7iRoLO5sQPpeaPromQ=; b=HfIFvCvj2p9V1da/TME0N1LXOIY8Py9LmLTTvfIj9pUklcDJslxhG3g0wxjsT05X5+ hXT5Adjb1SOYEMALnATb9zBJ0u3gfUv3gyUJvGZNHKFcFrxDr0KhmG/znhanlDAs1aMG SudfGaNBK+UMZ9W2t4Uu768GXcTiiPqbVut7ixVdEVQkUcsHuZsHK9KZ9niXTIUJhJDI oLQ3U6PnI6OnrG3rkS/44zRH7z+UrSTKkv5o6EOrGBVJPyHSIE0Id2fDZbBQ1Lw6i8Up 09Qt43VONflZg6wNJX2cjAnEu41cyH05UIbMov25SXBse9czMNjEniAvmW5/AWJolxGW 7XxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=TYv4qvYA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z188si60407704pgb.330.2019.01.12.20.51.06; Sat, 12 Jan 2019 20:51:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=TYv4qvYA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726731AbfAMDzE (ORCPT + 99 others); Sat, 12 Jan 2019 22:55:04 -0500 Received: from conssluserg-02.nifty.com ([210.131.2.81]:17926 "EHLO conssluserg-02.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726482AbfAMDzD (ORCPT ); Sat, 12 Jan 2019 22:55:03 -0500 Received: from mail-ua1-f46.google.com (mail-ua1-f46.google.com [209.85.222.46]) (authenticated) by conssluserg-02.nifty.com with ESMTP id x0D3srFW012197; Sun, 13 Jan 2019 12:54:54 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-02.nifty.com x0D3srFW012197 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1547351694; bh=MLmbrY6gJCTsikFhFlVTaYkEc7iRoLO5sQPpeaPromQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=TYv4qvYAhAUY4Yf+xESqNRBLmxvN0q4t9JwZiJK6pVjZYXWNERrnS8zNkKeZu4/Uc U6Mw57M16JtcRktQzJYRooRMZcUaPmNeNa7nY8KyGzvor5AUwnZ8MQGdQuIpEPCCo8 t+7HVH+voB7SpwWJB0Q9LwVaQNUgioQdDFl50L6rnxH4SQdL9M1s3RjROWx/5WRAQB Uhy5KMWylWOOpnABTz50RjTwrpGSEpORaeVeRQku7vPefHEpAagH/U80G6Nb3aV1N4 46F8lKKDrIgFNOQdeBBiTsh9FgRnoyji61SS2BghUE7eicsv6ZpjxAoBhmT3wQSCQ6 I2NWLpHn9uk6g== X-Nifty-SrcIP: [209.85.222.46] Received: by mail-ua1-f46.google.com with SMTP id z11so6005602uaa.10; Sat, 12 Jan 2019 19:54:54 -0800 (PST) X-Gm-Message-State: AJcUukfD+QQMg7ba0PKLnAHiwe6yVx2QJaDNKs+arF68wUYPInOLxyMr rO2JHXMhAPPbGqydBUWJ0V1+I1y2a6iPZD0ObGs= X-Received: by 2002:a9f:3193:: with SMTP id v19mr7671495uad.55.1547351693047; Sat, 12 Jan 2019 19:54:53 -0800 (PST) MIME-Version: 1.0 References: <20190111190538.6744-1-paul.burton@mips.com> In-Reply-To: <20190111190538.6744-1-paul.burton@mips.com> From: Masahiro Yamada Date: Sun, 13 Jan 2019 12:54:17 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] kbuild: Disable LD_DEAD_CODE_DATA_ELIMINATION with ftrace & GCC <= 4.7 To: Paul Burton Cc: "linux-kbuild@vger.kernel.org" , "linux-mips@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Paul Burton , Geert Uytterhoeven , Nicholas Piggin , "stable@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jan 12, 2019 at 6:00 AM Paul Burton wrote: > > When building using GCC 4.7 or older, -ffunction-sections & the -pg flag > used by ftrace are incompatible. This causes warnings or build failures > (where -Werror applies) such as the following: > > arch/mips/generic/init.c: > error: -ffunction-sections disabled; it makes profiling impossible > > This used to be taken into account by the ordering of calls to cc-option > from within the top-level Makefile, which was introduced by commit > 90ad4052e85c ("kbuild: avoid conflict between -ffunction-sections and > -pg on gcc-4.7"). Unfortunately this was broken when the > CONFIG_LD_DEAD_CODE_DATA_ELIMINATION cc-option check was moved to > Kconfig in commit e85d1d65cd8a ("kbuild: test dead code/data elimination > support in Kconfig"), because the flags used by this check no longer > include -pg. > > Fix this by not allowing CONFIG_LD_DEAD_CODE_DATA_ELIMINATION to be > enabled at the same time as ftrace/CONFIG_FUNCTION_TRACER when building > using GCC 4.7 or older. > > Signed-off-by: Paul Burton > Fixes: e85d1d65cd8a ("kbuild: test dead code/data elimination support in Kconfig") > Reported-by: Geert Uytterhoeven > Cc: Masahiro Yamada > Cc: Nicholas Piggin > Cc: stable@vger.kernel.org # v4.19+ > Cc: linux-kbuild@vger.kernel.org > Cc: linux-mips@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > --- > Changes in v2: > - Invert the dependency as Masahiro suggested. Applied to linux-kbuild/fixes. Thanks! -- Best Regards Masahiro Yamada