Received: by 10.223.176.5 with SMTP id f5csp2250939wra; Thu, 8 Feb 2018 10:49:30 -0800 (PST) X-Google-Smtp-Source: AH8x224+rLJH2Kcer1W3svud9aGuEUdfEwv6oVY4aVVamWM4Z1XSV97EI60miJ7t9FXoxmtH1fG2 X-Received: by 10.99.103.198 with SMTP id b189mr140728pgc.20.1518115769961; Thu, 08 Feb 2018 10:49:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518115769; cv=none; d=google.com; s=arc-20160816; b=FC05LcgyIF+qT210lYNB8SBYWDpvWlsYuVX3FR+4WigGkV6DMlWYdi1RUdGgFXjIrv 3M99hNYx9awka+wtAICFJo5SEU7W8WZRR8EfLZP7czfFtMQHv+zdgY2R7qXP+PJruGx4 ITh4ZyANRZIGzwhex0atqC6D5TF7D5b1IbWkd5UioUZ1wuIEonxv10nD6wY3vEi3bNvM fLaGeXNeEomBI+rY7Pzc1IgeZXtxSTLo+iJCU57VZriSP6LKUrax3ktbwLA90Qa4Szek kCOn0H2rk0G1LXyhKkI/kdad0cc8wPbCqkg7SNeHVjrS4FOGpABJMXx/JmCId3OrvVxv 0WCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=1utcvc9A+VUcNneQ0vWJt46l76oBZkAM4rdXn4srypM=; b=RUdPH5ETk+Ono/8pNEvQRqFhvJGwCfEmsiIqg6BD+bRWIqmLjkqJtLUBbKt83zPfbA 79vIN7alU45g9HellDn/rpgMGLQI21lLNXwjtSLiZSyicJDh29AqWLJTzYJhqSbgJU/H YPbXB8JAu5Zb82Kljx3yMrzqz8ruuJeuVCe0l8Djs/zJJfqFsE7IHYGQyEbuQ9HBivcX BXaa60Cn144AMmebtduPd31cBioNVenKiJkqG03QJ0AaIQDNxANNcAN4Xgnguo1kZjzR 1b4CrOMcWlnvlFEWQnhPfSKX/aBXtwUkS+ojFwNObm2pOPXC1pViTaa+mYLbe2GudHqj qZng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=DLwopTme; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e93-v6si272972plk.580.2018.02.08.10.49.14; Thu, 08 Feb 2018 10:49:29 -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=@chromium.org header.s=google header.b=DLwopTme; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752056AbeBHSsc (ORCPT + 99 others); Thu, 8 Feb 2018 13:48:32 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:45967 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751094AbeBHSsb (ORCPT ); Thu, 8 Feb 2018 13:48:31 -0500 Received: by mail-pg0-f65.google.com with SMTP id m136so1920210pga.12 for ; Thu, 08 Feb 2018 10:48:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=1utcvc9A+VUcNneQ0vWJt46l76oBZkAM4rdXn4srypM=; b=DLwopTmegXZLPxir01ysfQPHnacf8BBBUqERajWrXF3840yn70P/dSpuRDDi9l3jJX t42xSuWorC8LZhg9kl9IfqgudUYfm7MgfKiuFPv2SZmx78TaTs0185lyM91/wwP5mjW9 YbJMtgLw0KzB+sZCjopE4O9CtnbvorYFP+PLA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=1utcvc9A+VUcNneQ0vWJt46l76oBZkAM4rdXn4srypM=; b=PYt/9w1lRQd4ONKbIQBBJBnoNvZSTnNgcgD0u69FJykbdJihXLmcRCVxW2CtAun5M5 SwROYpJjr/TMzld0a4e7dbuA900XxdChKPxxXTrhgvR7s4KIl8vAh2kNBx+SUOKLWdIV 7JM+wuZYJyKssGZA1nSEHaU8dMkfVy+UtjZlrbYdrafkR01B9byZ5dnMPj3CwqFEKjW1 1irVxgOd3Pi9Xir6ezaU3UqtGqF8jAY49bK7UuzWuUS5IlHQEzQoeaQpzdV0nHhuUP3p mv650GwWoyegVYc1QYDIulWjHBMhJCVn5eGMD4oNP3f+xnCMhQRVVkdD/Cxa/TuZJQYK icLQ== X-Gm-Message-State: APf1xPD/KJw6lHP7zEmMEeMSsNPiUItFXewWTO8W4YUAqPJ3j5DYZzqh p+Op6qzf8CEgY+JuvAP9zBJkLg== X-Received: by 10.98.213.198 with SMTP id d189mr41229pfg.136.1518115709195; Thu, 08 Feb 2018 10:48:29 -0800 (PST) Received: from localhost ([2620:0:1000:1600:5ff4:666d:2881:a60]) by smtp.gmail.com with ESMTPSA id v24sm3165399pfj.97.2018.02.08.10.48.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 08 Feb 2018 10:48:28 -0800 (PST) Date: Thu, 8 Feb 2018 10:48:27 -0800 From: Matthias Kaehlcke To: Harry Wentland Cc: Alex Deucher , Christian =?utf-8?B?S8O2bmln?= , David Zhou , David Airlie , Felix Kuehling , Dmytro Laktyushkin , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Guenter Roeck , Justin TerAvest , Craig Bergstrom Subject: Re: [PATCH v2 1/2] amdgpu/dc/dml: Consolidate redundant CFLAGS Message-ID: <20180208184827.GD116483@google.com> References: <20180208015103.169603-1-mka@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org El Thu, Feb 08, 2018 at 09:33:53AM -0500 Harry Wentland ha dit: > On 2018-02-07 08:51 PM, Matthias Kaehlcke wrote: > > Use subdir-ccflags instead of specifying the same flags for every source > > file. > > > > Signed-off-by: Matthias Kaehlcke > > Reviewed-by: Guenter Roeck > > --- > > Changes in v2: > > - added 'Reviewed-by: Guenter Roeck ' tag > > > > drivers/gpu/drm/amd/display/dc/dml/Makefile | 10 +--------- > > 1 file changed, 1 insertion(+), 9 deletions(-) > > > > diff --git a/drivers/gpu/drm/amd/display/dc/dml/Makefile b/drivers/gpu/drm/amd/display/dc/dml/Makefile > > index 3488af2b5786..b8cadf833e71 100644 > > --- a/drivers/gpu/drm/amd/display/dc/dml/Makefile > > +++ b/drivers/gpu/drm/amd/display/dc/dml/Makefile > > @@ -24,15 +24,7 @@ > > # It provides the general basic services required by other DAL > > # subcomponents. > > > > -CFLAGS_display_mode_vba.o := -mhard-float -msse -mpreferred-stack-boundary=4 > > -CFLAGS_display_mode_lib.o := -mhard-float -msse -mpreferred-stack-boundary=4 > > -CFLAGS_display_pipe_clocks.o := -mhard-float -msse -mpreferred-stack-boundary=4 > > -CFLAGS_display_rq_dlg_calc.o := -mhard-float -msse -mpreferred-stack-boundary=4 > > -CFLAGS_dml1_display_rq_dlg_calc.o := -mhard-float -msse -mpreferred-stack-boundary=4 > > -CFLAGS_display_rq_dlg_helpers.o := -mhard-float -msse -mpreferred-stack-boundary=4 > > -CFLAGS_soc_bounding_box.o := -mhard-float -msse -mpreferred-stack-boundary=4 > > -CFLAGS_dml_common_defs.o := -mhard-float -msse -mpreferred-stack-boundary=4 > > - > > +subdir-ccflags-y += -mhard-float -msse -mpreferred-stack-boundary=4 > > Are you sure this will only apply to dc/dml? > > The way the amdgpu build is setup I've seen this flag apply to all of amdgpu, even if specified in a subdirectories build file. The reason being that amdgpu/Makefile recursively includes all other Makefiles in the module. > > According to kbuild/makefiles.txt this will have effect for the kbuild file where it's present and all subdirectories: > > https://www.kernel.org/doc/Documentation/kbuild/makefiles.txt: > > subdir-ccflags-y, subdir-asflags-y > > The two flags listed above are similar to ccflags-y and asflags-y. > > The difference is that the subdir- variants have effect for the kbuild > > file where they are present and all subdirectories. > > Options specified using subdir-* are added to the commandline before > > the options specified using the non-subdir variants. > > > > Example: > > subdir-ccflags-y := -Werror Thanks, I didn't realize the recursive inclusion from amdgpu/Makefile, in this case using subdir-ccflags-y indeed isn't a good idea. > For your 2nd patch you probably want to make a dml_cflags variable > that's set different for clang and gcc, and then still set it for > all files in DML individually. Yep, that was my first impulse and then I remembered subdir-ccflags-y. Will go back to that. > You'll probably also have to do the same for dc/calcs/Makefile. Thanks for the heads up!