Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3431724pxj; Tue, 11 May 2021 04:30:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/YfOT427wZYWZD+MA9hcHuIBcgV7Btyll8LfuJy0lrpvWLTxrZIoFDlRL2As/H23nWJqU X-Received: by 2002:a17:906:e281:: with SMTP id gg1mr30986749ejb.463.1620732624731; Tue, 11 May 2021 04:30:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620732624; cv=none; d=google.com; s=arc-20160816; b=ZSeCeeiKirhwjK+zf/NFGz0KERr9wHRD+kq1AYAOp3DnJt23cX4fzw1zbxog2CsQ4j faqVXnl9Iw+W1b2bw14FELoD8QdlFQc6XoLWrRm6WZLHahRfXlhKK7PiFH4RT1zLtMxP rqE5SNUKwUI+4b4mQ3Uvp+rn+QAqEcbXp5QwJ1dirBQTMd5IJg3m9mW9oXAHEUZO5OmJ C37jXXzVZNPNuNEExYOGsHQRXoj9mPS48gqmX3gPV6Gb8bpnk7O4QnDFQXw1on9pnCm2 OaiG40oZYBgHbuiOdSuDM9CWkaLv03JIQfKamnTUs8GA7XGFvZUpjhn2qFVcWBw89USx J1zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=RH8qGDtw2ESn0qVHbDwkGv8VpZ79/1ZiSl718tobTIM=; b=VyCRr/J/AIRdC+02ICZSiGpFcV4626u4mtqB56KG8reg4ShS9fTG+mIGoOc6pBZJeK p5A0iWoh3KgwFqqodHPN6OloENBJNczOI4qugr1Ri9vih8oTITXUFxR978mEosHnPCed 9iWNtVga+Cr4o5Mgi+833dpktKlrcn5TAjj4hMMsMZ1wRZMpH8SPdRvq3pqW3Iwc7+Z2 zDCV4OXFZnQQn9zvO/Ur1QVdCZ79Zxp5ckOvOqiXbnpgca8jY+qSXXl7q8X9cngqOK/U a8HWvEUK1yK5Xkh03C0zE0Hc8P9ONPf6fNbI3EMW66MwV885+T0ez+xJRNDLHuTj98yj +yBA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d2si16037753edz.404.2021.05.11.04.29.59; Tue, 11 May 2021 04:30:24 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231273AbhEKL2G (ORCPT + 99 others); Tue, 11 May 2021 07:28:06 -0400 Received: from gate.crashing.org ([63.228.1.57]:44179 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230441AbhEKL2G (ORCPT ); Tue, 11 May 2021 07:28:06 -0400 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 14BBKWcY002034; Tue, 11 May 2021 06:20:32 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 14BBKKjC002001; Tue, 11 May 2021 06:20:20 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Tue, 11 May 2021 06:20:19 -0500 From: Segher Boessenkool To: Alexey Kardashevskiy Cc: linuxppc-dev@lists.ozlabs.org, Michal Marek , linux-kbuild@vger.kernel.org, Masahiro Yamada , Nick Desaulniers , linux-kernel@vger.kernel.org, Nathan Chancellor , clang-built-linux@googlegroups.com, Nicholas Piggin Subject: Re: [PATCH kernel v2] powerpc/makefile: Do not redefine $(CPP) for preprocessor Message-ID: <20210511112019.GK10366@gate.crashing.org> References: <20210511044812.267965-1-aik@ozlabs.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210511044812.267965-1-aik@ozlabs.ru> User-Agent: Mutt/1.4.2.3i Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi! On Tue, May 11, 2021 at 02:48:12PM +1000, Alexey Kardashevskiy wrote: > --- a/arch/powerpc/kernel/vdso32/Makefile > +++ b/arch/powerpc/kernel/vdso32/Makefile > @@ -44,7 +44,7 @@ asflags-y := -D__VDSO32__ -s > > obj-y += vdso32_wrapper.o > targets += vdso32.lds > -CPPFLAGS_vdso32.lds += -P -C -Upowerpc > +CPPFLAGS_vdso32.lds += -C > > # link rule for the .so file, .lds has to be first > $(obj)/vdso32.so.dbg: $(src)/vdso32.lds $(obj-vdso32) $(obj)/vgettimeofday.o FORCE > --- a/arch/powerpc/kernel/vdso64/Makefile > +++ b/arch/powerpc/kernel/vdso64/Makefile > @@ -30,7 +30,7 @@ ccflags-y := -shared -fno-common -fno-builtin -nostdlib \ > asflags-y := -D__VDSO64__ -s > > targets += vdso64.lds > -CPPFLAGS_vdso64.lds += -P -C -U$(ARCH) > +CPPFLAGS_vdso64.lds += -C > > # link rule for the .so file, .lds has to be first > $(obj)/vdso64.so.dbg: $(src)/vdso64.lds $(obj-vdso64) $(obj)/vgettimeofday.o FORCE Why are you removing -P and -Upowerpc here? "powerpc" is a predefined macro on powerpc-linux (no underscores or anything, just the bareword). This is historical, like "unix" and "linux". If you use the C preprocessor for things that are not C code (like the kernel does here) you need to undefine these macros, if anything in the files you run through the preprocessor contains those words, or funny / strange / bad things will happen. Presumably at some time in the past it did contain "powerpc" somewhere. -P is to inhibit line number output. Whatever consumes the preprocessor output will have to handle line directives if you remove this flag. Did you check if this will work for everything that uses $(CPP)? In any case, please mention the reasoning (and the fact that you are removing these flags!) in the commit message. Thanks! Segher