From patchwork Wed Sep 19 02:35:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 146994 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp153248ljw; Tue, 18 Sep 2018 19:37:26 -0700 (PDT) X-Google-Smtp-Source: ANB0VdY8CTyxnm4UTjL4acClceZv6IhrWMhzhgAHKBPDVtmtlCsFyOBZ1110L6dDp5jHb5oGB0NY X-Received: by 2002:aa7:ca51:: with SMTP id j17-v6mr57237749edt.45.1537324646540; Tue, 18 Sep 2018 19:37:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537324646; cv=none; d=google.com; s=arc-20160816; b=nCEDave86ZRyckdiCR6fEpBKo8vEEdl80lqFaxRDf03ER44YLwWjp2UvjQHknU9ajk 4LXtqvq4WDUxrISQYqP/UZdZ8URBfIfVEuTz+my6S0RhgxYH8BlD6dGA+o29da9FnYgu h8+uFBhqEumSozsCZfR2Hku5y15u2gCjSOvBm8U7DuIZDze9kXNWGBvJrcRxK/Cfs9ei krfWYqn0SfOCBvUnnuUGl+KmGprFLm3gKQUUiXOlKcKZYosPERsJokwh/paB13rdjE/o IOVpBloewhEggITrj7K+Z1WbOqyrVIWsuRpmh/KVYooDgKJOS2YRg/0hlL/15Qtpin5J hoaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :cc:mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-filter; bh=1U1F/ENPJ1a8wMAVe8IR+mOPz62zOAUVm+8Aap7Tmu0=; b=pLQIhMI7vxQoFkYuMzzTSouX/TKX06rScw0qGGRlB9NMD7Y2wD/8ySCJs6pxMynlbB AH7d4O1ZBIVvoTdiL9R3VZItsmWLB2ZQsAxedB8OEhUipIFSCOaaa1PK6lMmnMkSLvDZ +A8KVRzHFS3id93mhmLxj6bFC1nQUQxs4mgtiMYwrtlz3Cmzwk74hCB4mLSsAZ9jPGQn cNwhCS7uD4cDoN4/WHI3IZtSdXkLQ7ysC02UXUOJ172MNi4ncyPMcqBquei9I3ts/8p4 WL4w/aHoLYK+bVI4E1XwZlQjqkztx7DTvd2xFEcd4A8T6/p8g4muuR/GdqECzqRZcGLr QdLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b="ENSPyW7/"; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id q57-v6si21696579edq.188.2018.09.18.19.37.26; Tue, 18 Sep 2018 19:37:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b="ENSPyW7/"; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by lists.denx.de (Postfix, from userid 105) id 2A7D6C21C2C; Wed, 19 Sep 2018 02:37:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=RCVD_IN_RP_RNBL, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 47C41C21DED; Wed, 19 Sep 2018 02:37:19 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 59881C21E73; Wed, 19 Sep 2018 02:36:48 +0000 (UTC) Received: from conuserg-08.nifty.com (conuserg-08.nifty.com [210.131.2.75]) by lists.denx.de (Postfix) with ESMTPS id 2022CC21E1E for ; Wed, 19 Sep 2018 02:36:47 +0000 (UTC) Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id w8J2ZxD3027177; Wed, 19 Sep 2018 11:36:00 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com w8J2ZxD3027177 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1537324560; bh=Ww5BFutPs4hporoKLovo8Sq7FNZVRdRG9CXMsbWi2dU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ENSPyW7/3XuSV7mfkO4tvUNWubap7540bAzEAJ8reEoHBqphN+Ens6LzIgDrsZyXk Eiofzt4dLNWMCMpt6vT0xty3hY5piWuS8ZdsysA9wn5IQBs/HjmjfwpG8hrqoVUFdh qXoShWQkuWWWP1o7HcPEgIcsC9Md9bdvENT0mbUQTr3w/vynDhjzF2UPF49QHPFQAU 66/oaUVWpjFpRORlIv0DumNQUOjIT9ttfipLFGGIbeN4Qtx2R/p7ZivRy6BTnKWaTT aMsdpZtUOSP9JEvaHlyEBcmDyyZncETbRGUEgvIpco4X+IXSiiO62sfcPSQW9+ukIU tA1uqXfHg18zw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Wed, 19 Sep 2018 11:35:56 +0900 Message-Id: <1537324557-27033-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537324557-27033-1-git-send-email-yamada.masahiro@socionext.com> References: <1537324557-27033-1-git-send-email-yamada.masahiro@socionext.com> MIME-Version: 1.0 Cc: Randy Dunlap , Rasmus Villemoes Subject: [U-Boot] [PATCH 1/2] Kbuild: fix # escaping in .cmd files for future Make X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Rasmus Villemoes [ commit 9564a8cf422d7b58f6e857e3546d346fa970191e in Linux ] I tried building using a freshly built Make (4.2.1-69-g8a731d1), but already the objtool build broke with orc_dump.c: In function ‘orc_dump’: orc_dump.c:106:2: error: ‘elf_getshnum’ is deprecated [-Werror=deprecated-declarations] if (elf_getshdrnum(elf, &nr_sections)) { Turns out that with that new Make, the backslash was not removed, so cpp didn't see a #include directive, grep found nothing, and -DLIBELF_USE_DEPRECATED was wrongly put in CFLAGS. Now, that new Make behaviour is documented in their NEWS file: * WARNING: Backward-incompatibility! Number signs (#) appearing inside a macro reference or function invocation no longer introduce comments and should not be escaped with backslashes: thus a call such as: foo := $(shell echo '#') is legal. Previously the number sign needed to be escaped, for example: foo := $(shell echo '\#') Now this latter will resolve to "\#". If you want to write makefiles portable to both versions, assign the number sign to a variable: C := \# foo := $(shell echo '$C') 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. This also fixes up the two make-cmd instances to replace # with $(pound) rather than with \#. There might very well be other places that need similar fixup in preparation for whatever future Make release contains the above change, but at least this builds an x86_64 defconfig with the new make. Link: https://bugzilla.kernel.org/show_bug.cgi?id=197847 Cc: Randy Dunlap Signed-off-by: Rasmus Villemoes Signed-off-by: Masahiro Yamada --- scripts/Kbuild.include | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 2c7918a..13ebddd 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -7,6 +7,7 @@ quote := " squote := ' empty := space := $(empty) $(empty) +pound := \# ### # Name of target with a '.' as filename prefix. foo/bar.o => foo/.bar.o @@ -242,11 +243,11 @@ endif # Replace >$< with >$$< to preserve $ when reloading the .cmd file # (needed for make) -# Replace >#< with >\#< to avoid starting a comment in the .cmd file +# Replace >#< with >$(pound)< to avoid starting a comment in the .cmd file # (needed for make) # Replace >'< with >'\''< to be able to enclose the whole string in '...' # (needed for the shell) -make-cmd = $(call escsq,$(subst \#,\\\#,$(subst $$,$$$$,$(cmd_$(1))))) +make-cmd = $(call escsq,$(subst $(pound),$$(pound),$(subst $$,$$$$,$(cmd_$(1))))) # Find any prerequisites that is newer than target or that does not exist. # PHONY targets skipped in both cases. From patchwork Wed Sep 19 02:35:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 146992 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp152505ljw; Tue, 18 Sep 2018 19:36:17 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaTxiMafJfx0mIyAoioF3JrfEQ1niwpAv34nako3GrsBX8nVIlK/pvjy0TgDBkyp+A4lUFm X-Received: by 2002:a50:a844:: with SMTP id j62-v6mr56641262edc.210.1537324577268; Tue, 18 Sep 2018 19:36:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537324577; cv=none; d=google.com; s=arc-20160816; b=sQRig8GtlYJJFUX6E/VSiyvi5JWrTO5n+ocjj5k/Gi76qFvheCEKUsdMT9DlnpAshj 3UCgJ3kCUv/OU8xGBFEJyfvM5EW6VtuFg8AF1Hycf/lDlGTJX/7lQhAAWFQj4KX/SpmN E6DuL8ngJe3jmZXyAdEQKb2MBJdH/732LjYJH3+uvay/Gyw18DYBVbrC5oCTP2hAx617 1//USvje4hZeU6fbQjtQIwHx3IEaPLddukPs0sthonMOQ3uj8mnn/SJvYBSFRGhPChJk r3WmEixNiCCJliVm7X/OHO6+InkOQCAov24iGXR6tfy8ClmToqjjyULHuxDOn3oOPUdI ETag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:dkim-filter; bh=n4ZVXHSg73Ur1rkcpEAocXqltfSRiWnCw+X8tL6HyXE=; b=bxbGkPMO/kQKMyDFd5bCqMfW5Fi2Lps/c/3WdP+spaDDyu/LJPl+ukWOUDVBD5QzkT Bl5G/3V17DtFBbfgALHIHlCxKTaVzxuQJrn+vjRsQn5pfVa8B0cUejga4o8aeQL3EuQT 2hxWX3ybhGP6a5rmX4LxLk0XLA4vUiQMQhmcE2pBUNIwr8CrB9SjomA//Ve917MLfUfI Bz+o9BbNCZWMduP6wWHNipW8S2lq5zrX9Tf47Qz4kcER5G90P+Q+viubqXV1kW7zyKmo QylAxTAEym4+SOFkj/Uc3zq6Rf7tumQ/DsuytiGv5t9rPjgYHI2YT10JSZrVdxBZWrgp 9BGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b="J/zXxlA/"; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id q15-v6si19821998edd.134.2018.09.18.19.36.16; Tue, 18 Sep 2018 19:36:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b="J/zXxlA/"; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by lists.denx.de (Postfix, from userid 105) id BD579C21E30; Wed, 19 Sep 2018 02:36:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=RCVD_IN_RP_RNBL, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id BBB82C21C2F; Wed, 19 Sep 2018 02:36:10 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id AD422C21C4A; Wed, 19 Sep 2018 02:36:08 +0000 (UTC) Received: from conuserg-08.nifty.com (conuserg-08.nifty.com [210.131.2.75]) by lists.denx.de (Postfix) with ESMTPS id C1772C21C2F for ; Wed, 19 Sep 2018 02:36:07 +0000 (UTC) Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id w8J2ZxD4027177; Wed, 19 Sep 2018 11:36:01 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com w8J2ZxD4027177 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1537324561; bh=dyhyv6MB5cWcuT6L/Eax/bXLgoMd2e79/a8OLObfnrQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J/zXxlA/KnoirqQV1o7x4lZFgymSEtFTHdn81RFnv4C1bcLv4t7qrtL65x9xcMoLN rroqubqv+6xKGVPuo78cqrgtExZipNfbMrCxf8ippYq1hmMJnSKOXBb7/1cspx3shc 1UXw0JE3aSojNUU09CMUGEN8EgthaaELF+UW9Tt/xzDGFicSnNUS3J+L5E8zv+Kqyy EecNkWGTHxrNSz45m7JjubBNUiHoCjWUaQTrWURAhUehBFRXBu9UeIg4cwFm31ot/N T/7pYSjVBfX43utUWGUj4IuXiqldrO3AxTok3gCJC4VV7e7TITUa9rNRt7vmPAuHgY zegLPhiCCgi+g== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Wed, 19 Sep 2018 11:35:57 +0900 Message-Id: <1537324557-27033-3-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537324557-27033-1-git-send-email-yamada.masahiro@socionext.com> References: <1537324557-27033-1-git-send-email-yamada.masahiro@socionext.com> Subject: [U-Boot] [PATCH 2/2] kbuild: fix # escaping in appending U-Boot own DT X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The escape sequence '\#' does not work for the latest GNU Make from the git tree. Replace it with $(pound) as Linux did. Signed-off-by: Masahiro Yamada --- scripts/Makefile.lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index f8c3fff..4dceb6d 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -299,7 +299,7 @@ quiet_cmd_dtc = DTC $@ # Modified for U-Boot # Bring in any U-Boot-specific include at the end of the file cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \ - (cat $<; $(if $(u_boot_dtsi),echo '\#include "$(u_boot_dtsi)"')) > $(pre-tmp); \ + (cat $<; $(if $(u_boot_dtsi),echo '$(pound)include "$(u_boot_dtsi)"')) > $(pre-tmp); \ $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $(pre-tmp) ; \ $(DTC) -O dtb -o $@ -b 0 \ -i $(dir $<) $(DTC_FLAGS) \