Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp680172pxb; Thu, 30 Sep 2021 14:54:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxk6mvL1zk0E0ol0CiykbAantko+X2cLU6EwD3IydNXtUfslSUbuJ+lqvbL2d6dwM68OlT6 X-Received: by 2002:a05:6a00:216f:b0:44b:6212:4967 with SMTP id r15-20020a056a00216f00b0044b62124967mr7692078pff.23.1633038847128; Thu, 30 Sep 2021 14:54:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633038847; cv=none; d=google.com; s=arc-20160816; b=pVVbSCx5hiB7eeKj09wDygpSe/oBmh90H/CUAQGhNasNv2ud8e+jNbTnAD3JE0DYoH fVPpfVS4Hz/d7UfNFDkwUv7edbWnw1DmEZrXM3Bs/KIPkOo24Po/XkM7keKbFKvntI0d qzTYlvKptaNXxSIKJ9AJd5ATIjxKkCd5H7muxyK33xMBZCfWI4vMaZgU1Ep5BLc6KPgM 5D9514VDK5Op7llSBjjmOuGIDTFh7YV0XIHhwHz4usvp12SwUKB9PILZ4ixE8LzjRPVv jdZbiheqjm3oe22GK6H3T4TD3RYPdA9s3dE6D/LeJNy5s69xC4pXX0Hj6WXy1g3ip7+4 WOLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=yZQ9+ptpmGZPeIgxp8JUYclciB8//BIrr9G2Q/xQRpI=; b=Xd3255ZCRjRKqFS6D7+1Mv7c9LitAC18OidP3No0jAJ0NSVmmKv/qlpeF5bpFM4sjO yX6yPSHnofi/EG0oEORRofX4OVc6K4Cif1LwVaEy7YLQN4tbHgdhr3Z7zdw3V7tT0Ugh pkBSDgXMXVjaIJNhlnQTQoayVA6ul0BvtItnpLX1YAM7LTVDB7kpkaxO0/5SxYa/ptXp 9cvMQA5WbSLHWK+4rfBDKyKF4MoyxJFBam/vXxsaG9SIF+SHDRJhdBDjsfv4D4feCm3b VV3REde22fxSgKr6HnvL62eFOSAWb9JjXv/Jsd1jrcUG2fXeXdmvhrpCyDQHGssy6Vs2 FASg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=L5lkL0l6; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id nh12si6406945pjb.121.2021.09.30.14.53.53; Thu, 30 Sep 2021 14:54:07 -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=@gmail.com header.s=20210112 header.b=L5lkL0l6; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352985AbhI3SCv (ORCPT + 99 others); Thu, 30 Sep 2021 14:02:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352969AbhI3SCu (ORCPT ); Thu, 30 Sep 2021 14:02:50 -0400 Received: from mail-oi1-x233.google.com (mail-oi1-x233.google.com [IPv6:2607:f8b0:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1BD1C06176A for ; Thu, 30 Sep 2021 11:01:07 -0700 (PDT) Received: by mail-oi1-x233.google.com with SMTP id u22so8384731oie.5 for ; Thu, 30 Sep 2021 11:01:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yZQ9+ptpmGZPeIgxp8JUYclciB8//BIrr9G2Q/xQRpI=; b=L5lkL0l6KtT5agnJdUQekOZPgWMZ0FQsY02b7YU0lwUgKl6cw6/Ib735DMgIFQrF+d P03cs2riMQ5Wr7yZHIIGQ4bPt2aSo38AE3EQiSb6k2/DJ6XJR5U5YDsSwM5lzUWTlpuM sT+wfKmv2UZu/6i0vfXH/JtiLZx+ZaonnIPjYD2rUKf7Gzq614FM9WFRVd/4KYQWZVaO OywtzTV969OrJBkpZWn/6FA4BOZczstYSv+KllGGnqPkK/bOOeB2pHqTbilUcBYPjezA neGf1eHNG03ig12fbBFc+YqIyBVfb9UvUUwu/bSb7efwyRIHMxw1kTn9itC/oCrgHDOH DLXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yZQ9+ptpmGZPeIgxp8JUYclciB8//BIrr9G2Q/xQRpI=; b=aitkyLFtyVCh+99hjqKj4xLRGCkQtR8uinrazacirXTQpZcfcwvIggXgQ88nIo6HXn irFXRmFZUB06xKqJBJUVGEdq3FBA8Zqlq5qTzjQg9ia8E/VaL0cIBPjjcuTw7ZsPDbct AxgABR5DEaTr5Hxf4An6RGTJ7XJqIXyUASdDLeLGk7HlDH+R8801A0GWUmJ8crVLz8M2 Qqu37GoDLgl++xCBBaF2XJUVuSCXpin1xqotMFsumxzTsJsX0+1Qt//gQuBdT3JzY7PY 5CljPIkWEFDa0FISqkzytkDnTvBPgJlymd3lKma+inJ16Wd/Q6NvMPoMBeKpgpRSxCR6 3zkQ== X-Gm-Message-State: AOAM530ZIlPN80/Mz0D4EZCw7T7/2ngLfJ4xo9nYicmET7lzJKiNyMNt 1vRZMusFa5P1kdndVyO39xjifovxQyJRvJJGeVo= X-Received: by 2002:a05:6808:1141:: with SMTP id u1mr444880oiu.123.1633024867391; Thu, 30 Sep 2021 11:01:07 -0700 (PDT) MIME-Version: 1.0 References: <20210930160142.2301257-1-nathan@kernel.org> In-Reply-To: <20210930160142.2301257-1-nathan@kernel.org> From: Alex Deucher Date: Thu, 30 Sep 2021 14:00:56 -0400 Message-ID: Subject: Re: [PATCH] drm/amd: Guard IS_OLD_GCC assignment with CONFIG_CC_IS_GCC To: Nathan Chancellor Cc: Harry Wentland , Leo Li , Alex Deucher , =?UTF-8?Q?Christian_K=C3=B6nig?= , "Pan, Xinhui" , Nick Desaulniers , amd-gfx list , Maling list - DRI developers , LKML , llvm@lists.linux.dev Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 30, 2021 at 12:02 PM Nathan Chancellor wrote: > > 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 Harry beat you to the punch by a little bit. Thanks! Alex > --- > 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 >