Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp490672ybb; Thu, 28 Mar 2019 06:37:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqwGNioLsY6BjUhRE4CuAgF6v30io8obbmQI2u+CSBCa0OnYBoEVveKgGZm+Nlb2CSaX0m9Q X-Received: by 2002:aa7:928d:: with SMTP id j13mr41972306pfa.112.1553780227509; Thu, 28 Mar 2019 06:37:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553780227; cv=none; d=google.com; s=arc-20160816; b=JKYZLu7b0675AweLY+empnxRTbyztfgK80KtwcKr2j4UYX4vSYpn+F1Stj4wGhSp6E tTHBjqmIJc/9N9iNLjDjC5pR89Bd0y3iAke68QSdtjTTfLjHHrCu2glI0llByuJRz1SJ 8aThMD2gGillze/KdLCS/ALwpuQxdgk6GzrO0A9vB/dUm1suUT01QzQ2u0KT9NWDnvGo 8GzMVi4+QbU8IUmbtXn/3B5pjW4ZpDctIFBvinv7LiZ9xJ2p0X6SToRzbQP/4r6/cSZo I5H797i397KYTxMIOK2jRKe5Gk6i4zXF5d6l9tOKZhha9mlsAR0ajbtYABJ/gr8RtQCW +VcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=RDqEup4CRmgrO4bPV9s84ODsCblAdWUmq52rHOMSrL0=; b=uI8SZ1VMy97AZSFl0xXtpPfqyMJE/S584xlDxmxVS3mpD5H89Ih6bm6deUvtGdxlXD mysUGRVDn/btezsNVWarfVENk2pvWKpdFFKULjoxORFc1/r2XJ3l5Dv2jS6QqCOmnump aYsrb/xKworARgneIkxKQxxLztZ+aAVSOvr96yOsJ2IDCkEWyqcGN0Zq6G3Z189rdHlm X7mFYt4165XChWBL4KUfQc8s4XgHi1/V3RfHMY6L8W8NM3omTOp6KiXbrqnm1tX/fomN h42JxISP8Ym/qceQjlDX6J9sXBYWlU1vy8j3cg5eF+m36voqnaH4bERQZexx7rdmsddo UXBQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d19si1165837pfm.1.2019.03.28.06.36.51; Thu, 28 Mar 2019 06:37:07 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726293AbfC1NgV (ORCPT + 99 others); Thu, 28 Mar 2019 09:36:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39764 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725816AbfC1NgV (ORCPT ); Thu, 28 Mar 2019 09:36:21 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A0C6AC0798F9; Thu, 28 Mar 2019 13:36:19 +0000 (UTC) Received: from [10.18.17.208] (dhcp-17-208.bos.redhat.com [10.18.17.208]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B353F5D73F; Thu, 28 Mar 2019 13:36:17 +0000 (UTC) Subject: Re: [PATCH v2] kbuild: strip whitespace in cmd_record_mcount findstring To: Masahiro Yamada Cc: Linux Kbuild mailing list , linuxppc-dev , Linux Kernel Mailing List , Michal Marek , Nicholas Piggin , Steven Rostedt References: <20190325160438.8982-1-joe.lawrence@redhat.com> <20190326173308.GA26546@redhat.com> From: Joe Lawrence Message-ID: <4f13ecb6-9aa8-5037-a18e-150c026254c2@redhat.com> Date: Thu, 28 Mar 2019 09:36:16 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.3 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 28 Mar 2019 13:36:21 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/28/19 8:57 AM, Masahiro Yamada wrote: > Hi Joe, > > OK, confirmed. > > [ ... snip .... ] > > First, I was wondering why I could not reproduce this issue. > Then, I found the reason was I was using the latest GNU Make > compiled from the git source tree. > > I found the following commit: > > commit b90fabc8d6f34fb37d428dc0fb1b8b1951a9fbed > Author: Paul Smith > Date: Sat May 27 20:07:30 2017 -0400 > > * NEWS: Do not insert a space during '+=' if the value is empty. > > * doc/make.texi (Appending): Document this behavior. > * variable.c (do_variable_definition): Only add a space if the variable > value is not empty. > * tests/scripts/variables/flavors: Test this behavior. > > diff --git a/NEWS b/NEWS > index e60644a..6e2c5c6 100644 > --- a/NEWS > +++ b/NEWS > @@ -29,6 +29,12 @@ > http://sv.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=108&set > This was claimed to be fixed in 3.81, but wasn't, for some reason. > To detect this change search for 'nocomment' in the .FEATURES variable. > > +* WARNING: Backward-incompatibility! > + Previously appending using '+=' to an empty variable would result in a value > + starting with a space. Now the initial space is only added if the variable > + already contains some value. Similarly, appending an empty string does not > + add a trailing space. > + > * The previous limit of 63 jobs under -jN on MS-Windows is now > increased to 4095. That limit includes the subprocess started by > the $(shell) function. > > Applied to linux-kbuild/fixes with additional comments. > > [Additional info by masahiro.yamada: > This issue only happens in the released versions of GNU Make. > CC_FLAGS_FTRACE will not contain the trailing space if you use > the latest GNU Make, which contains commit b90fabc8d6f3 > ("* NEWS: Do not insert a space during '+=' if the value is empty.") > ] Wow, this one gets even more specific. I had gone down the rabbit hole on this one, I didn't care to learn how or why that extra space got there :) Now we know, thanks for running that down and adding the note about GNU Make. -- Joe