Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp432301pxb; Thu, 30 Sep 2021 09:04:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2b4xsZE8EzMuzX668My670LOhM565b1NJoOiJZ3ZZBlrByXwo+NIzeled+ROydc9KAgC+ X-Received: by 2002:ac2:5c07:: with SMTP id r7mr5991677lfp.689.1633017859259; Thu, 30 Sep 2021 09:04:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633017859; cv=none; d=google.com; s=arc-20160816; b=TCql0SKRFFi/I4GsFFQaWvdIwquws84C3nqjeDpEqVfQl1oi35H1dJVuUNeCjM5lDc ducZgVJPu3bsc2QMLAfUQSBLb+C2Jig7K3+18gAWAMoX8NOIk9MccwYCD3DpOzYK6Jga UsLB7xjzAaNLPWMCchuKREa2OfDekTnzs1w+GlB97RV469taslSTnmC11H/JAei98hH8 JVfXrsDkTjoL1dq+44TtY3LgMVkDGrEwZUbsuXr5iVXC6H8hfEWnnFjI1wM/hYQ/MxlT vmK6sZN9MHG13cLdFXVYhK/WOmPHra6QIL56GWcI4QdbYKfJmJvdzY1d68+vdAy3S0BC EpbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=dM6Kozho0++rxMNdtUIN42nmk1tsn+5dpsIH37HY16k=; b=hdd6/taO4X2usAwFc6XvvJJKGf+c/k/BngbpP/z0pluJVlBPfPlu97+VcUCIZWBGlk aEEJlQeiVOm2W+R2x6SaIOqqOhFeRYK/1SxtrJicx+AT1a4jl9Iw8f6bAM+JOIgsra+a UxPDY3uplfEi7GEtxoWZ+orHWrpP9TGEhT6EZIFtLj3zXXw0CvUn9SOeDGhVkPVrcJWX Oz5PDO5t6VLLZ4rF+rjrkUA8yfTAtwX/iMNlY9rEcA8L0DFmQ3u9yMjrGp8lnb6+OB0R mYYAAqhCutop2nCY1NIFsnVBInoHxCGECwjV9DUhBywIygsqkHvWU+dRJNlq1GSMWCZo 7QHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tnqVKO6f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v2si5797362edc.561.2021.09.30.09.03.52; Thu, 30 Sep 2021 09:04:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tnqVKO6f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347989AbhI3QDq (ORCPT + 99 others); Thu, 30 Sep 2021 12:03:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:43368 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346745AbhI3QDp (ORCPT ); Thu, 30 Sep 2021 12:03:45 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id CC71A61267; Thu, 30 Sep 2021 16:02:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633017722; bh=0+sb2XqH5BquPP7EjtdnYr/NxYIMmonry0L2K3JYAFo=; h=From:To:Cc:Subject:Date:From; b=tnqVKO6f7eLz2tpcuRDdCbw3uKJ9pnWBRYsHY3fEabEYitSik4nVI1i5qhZ2pTrT2 knPSWujATtrB4RkrITDzAhDWSwvT6b4yORb+jJERgymY5ew+ej61QUcWzSAmI0fxsc DZpUgmX0LDW15rxFHYvo0NMd2PoWWKmwFARS4prSYnowHmSaH14Y1v6iddHhGRmvWt /cwqiAJ4WpR07zC0H4Y7krVUE6bvb9O1Vw36+mguqO5DGxY88G7KWjQj10lQ9KT6V2 12S4/oGlFGpQx4aE9MQHj2BFxij3G+wSanDMk6ummf01Ft/KZA6/dT8Sa2Dw6G/Hfo gzrRn/wUwDKcA== From: Nathan Chancellor To: Harry Wentland , Leo Li , Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , "Pan, Xinhui" Cc: Nick Desaulniers , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Nathan Chancellor Subject: [PATCH] drm/amd: Guard IS_OLD_GCC assignment with CONFIG_CC_IS_GCC Date: Thu, 30 Sep 2021 09:01:42 -0700 Message-Id: <20210930160142.2301257-1-nathan@kernel.org> X-Mailer: git-send-email 2.33.0.591.gddb1055343 MIME-Version: 1.0 X-Patchwork-Bot: notify Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org cc-ifversion only works for GCC, as clang pretends to be GCC 4.2.1 for glibc compatibility, which means IS_OLD_GCC will get set and unsupported flags will be passed to clang when building certain code within the DCN files: clang-14: error: unknown argument: '-mpreferred-stack-boundary=4' make[5]: *** [scripts/Makefile.build:277: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn201/dcn201_resource.o] Error 1 Guard the call to cc-ifversion with CONFIG_CC_IS_GCC so that everything continues to work properly. See commit 00db297106e8 ("drm/amdgpu: fix stack alignment ABI mismatch for GCC 7.1+") for more context. Fixes: ff7e396f822f ("drm/amd/display: add cyan_skillfish display support") Link: https://github.com/ClangBuiltLinux/linux/issues/1468 Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/amd/display/dc/dcn201/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/display/dc/dcn201/Makefile b/drivers/gpu/drm/amd/display/dc/dcn201/Makefile index d98d69705117..96cbd4ccd344 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn201/Makefile +++ b/drivers/gpu/drm/amd/display/dc/dcn201/Makefile @@ -14,9 +14,11 @@ ifdef CONFIG_PPC64 CFLAGS_$(AMDDALPATH)/dc/dcn201/dcn201_resource.o := -mhard-float -maltivec endif +ifdef CONFIG_CC_IS_GCC ifeq ($(call cc-ifversion, -lt, 0701, y), y) IS_OLD_GCC = 1 endif +endif ifdef CONFIG_X86 ifdef IS_OLD_GCC base-commit: b47b99e30cca8906753c83205e8c6179045dd725 -- 2.33.0.591.gddb1055343