From patchwork Tue Nov 20 01:05:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 151530 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3380411ljp; Mon, 19 Nov 2018 17:06:51 -0800 (PST) X-Google-Smtp-Source: AJdET5fSysbs+Wvqg69Jpioh1aRsvFsXYkLEejOEheFUGm7gwj/xyAJOh89ykT4vX6mxo4nq5PdG X-Received: by 2002:a62:292:: with SMTP id 140-v6mr12885pfc.16.1542676011353; Mon, 19 Nov 2018 17:06:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542676011; cv=none; d=google.com; s=arc-20160816; b=peTpGLZoaoZiYGhfnLGDCDA3AVRsoblJz3D1p0ODfAjyw8mabBCy9X5a5kwu9S9nB2 eRXoz8GrZtm490eKZUcnJ8DdidiXFtcQy22yZoACv0Um7psUk60Y0d7uXDt8sx3I3uOB x06t2d7NpgdElliTkHgyc+DaoSPPLniIjQ2iJq8uKLD4nmNrJdv+kdNShbf5Knjdfwj6 sTlOS01b7UKCsSw8EZw/o83XMmsPTeeutH8zDxxr0tfahHnHjfZieEHBFTX2VZeDHfnj NgMUyzOFj8goRkKgZ8auPHMiEL1b5rzGW7sFm9zc5PWd7Dq1PtLRyZF9CGxrTajkdI79 hCbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=f2BtdiU0GitGOassCnUVM6KJqG2sSFpHgHMxZ5FKCpo=; b=uV8gjCuHUR7D0xIN5xWUdEv9DZG1/hNJoSg6kq5V3zCRuuq9aHSuDYchEkWcwhAOZg 9UKzB8575A/DJx6AaKuYja7JIerbEYbDMRLkXc1SJuK6Pl173DDT/AIKkFTORdL9aPXw /m5E9IWMFBsx7natfgEkN21VCz41gtWK/IoaLYtRWEioaiJwW184hENBvvvKYAa4hRJq GCh/f7tYfFITPujelgsn5AElIahPk7eiIR9yY5cpJLu8Ce++dpxhXXBkcvd5P8jvS2Xz VSdUWMtLxgfm470OpxvrcSA2GKO+iiJ59rUyM/GRjW/XHl5Whrex8r5GtBG+V/bGvk2q hZDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=iiUdRthQ; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1-v6si44296348plj.53.2018.11.19.17.06.50; Mon, 19 Nov 2018 17:06:51 -0800 (PST) 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; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=iiUdRthQ; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732406AbeKTLdP (ORCPT + 32 others); Tue, 20 Nov 2018 06:33:15 -0500 Received: from conuserg-11.nifty.com ([210.131.2.78]:34066 "EHLO conuserg-11.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732092AbeKTLdO (ORCPT ); Tue, 20 Nov 2018 06:33:14 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-11.nifty.com with ESMTP id wAK15ZEY029284; Tue, 20 Nov 2018 10:05:37 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com wAK15ZEY029284 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1542675937; bh=f2BtdiU0GitGOassCnUVM6KJqG2sSFpHgHMxZ5FKCpo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iiUdRthQrzwUu1zD6p5unciaLi1lLIwuUno+PlMUownsdL9HTS6G/09ttOmOOe7Hq 2Qt3NvTog6REbo1S6Qr/fWZuhbVCUMEGpqSCVwIzGwsrOuwHIBDvz3h9mYRISPUsRb gTH6HgKb3mkrDkVbE/gGIqVmrGk220HPxDir1bowtzOOsN4bPs4JcxgcVcjd6BWTm5 I/DSWsdqi2FR0z3+Onb+YoA99iNkhHnfhiEHFNj0ioez0DQiUczgorSwM1UGFnt3w4 zHS7dC5/WZ3K00mAFZ91rc5LWo/t4pbRybqIQAMUZCsdpS9VCekuCU2NIsLbciQyfE Ux1OIj+FFAaJA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Sam Ravnborg , Nicolas Pitre , Rasmus Villemoes , Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH v2 1/9] kbuild: let fixdep directly write to .*.cmd files Date: Tue, 20 Nov 2018 10:05:22 +0900 Message-Id: <1542675930-21114-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1542675930-21114-1-git-send-email-yamada.masahiro@socionext.com> References: <1542675930-21114-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently, fixdep writes dependencies to .*.tmp, which is renamed to .*.cmd after everything succeeds. This is a very safe way to avoid corrupted .*.cmd files. The if_changed_dep has carried this safety mechanism since it was added in 2002. If fixdep fails for some reasons or a user terminates the build while fixdep is running, the incomplete output from the fixdep could be troublesome. This is my insight about some bad scenarios: [1] If the compiler succeeds to generate *.o file, but fixdep fails to write necessary dependencies to .*.cmd file, Make will miss to rebuild the object when headers or CONFIG options are changed. In this case, fixdep should not generate .*.cmd file at all so that 'arg-check' will surely trigger the rebuild of the object. [2] A partially constructed .*.cmd file may not be a syntactically correct makefile. The next time Make runs, it would include it, then fail to parse it. Once this happens, 'make clean' is be the only way to fix it. In fact, [1] is no longer a problem since 9c2af1c7377a ("kbuild: add .DELETE_ON_ERROR special target"). Make deletes a target file on any failure in its recipe. Because fixdep is a part of the recipe of *.o target, if it fails, the *.o is deleted anyway. However, I am a bit worried about the slight possibility of [2]. So, here is a solution. Let fixdep directly write to a .*.cmd file, but allow makefiles to include it only when its corresponding target exists. This effectively reverts commit 2982c953570b ("kbuild: remove redundant $(wildcard ...) for cmd_files calculation"), and commit 00d78ab2ba75 ("kbuild: remove dead code in cmd_files calculation in top Makefile") because now we must check the presence of targets. Signed-off-by: Masahiro Yamada --- Changes in v2: - New patch Makefile | 13 +++++++------ scripts/Kbuild.include | 10 ++++------ scripts/Makefile.build | 10 ++++------ 3 files changed, 15 insertions(+), 18 deletions(-) -- 2.7.4 diff --git a/Makefile b/Makefile index ddbf627..b78cc97 100644 --- a/Makefile +++ b/Makefile @@ -1039,6 +1039,8 @@ ifdef CONFIG_GDB_SCRIPTS endif +$(call if_changed,link-vmlinux) +targets := vmlinux + # Build samples along the rest of the kernel. This needs headers_install. ifdef CONFIG_SAMPLES vmlinux-dirs += samples @@ -1760,13 +1762,12 @@ quiet_cmd_depmod = DEPMOD $(KERNELRELEASE) cmd_crmodverdir = $(Q)mkdir -p $(MODVERDIR) \ $(if $(KBUILD_MODULES),; rm -f $(MODVERDIR)/*) -# read all saved command lines -cmd_files := $(wildcard .*.cmd) +# read saved command lines for existing targets +exist-targets := $(wildcard $(sort $(targets))) -ifneq ($(cmd_files),) - $(cmd_files): ; # Do not try to update included dependency files - include $(cmd_files) -endif +cmd_files := $(foreach f,$(exist-targets),$(dir $(f)).$(notdir $(f)).cmd) +$(cmd_files): ; # Do not try to update included dependency files +-include $(cmd_files) endif # ifeq ($(config-targets),1) endif # ifeq ($(mixed-targets),1) diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index bb01555..6cf6a8b 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -264,9 +264,8 @@ ifndef CONFIG_TRIM_UNUSED_KSYMS cmd_and_fixdep = \ $(echo-cmd) $(cmd_$(1)); \ - scripts/basic/fixdep $(depfile) $@ '$(make-cmd)' > $(dot-target).tmp;\ - rm -f $(depfile); \ - mv -f $(dot-target).tmp $(dot-target).cmd; + scripts/basic/fixdep $(depfile) $@ '$(make-cmd)' > $(dot-target).cmd;\ + rm -f $(depfile); else @@ -289,9 +288,8 @@ cmd_and_fixdep = \ $(echo-cmd) $(cmd_$(1)); \ $(ksym_dep_filter) | \ scripts/basic/fixdep -e $(depfile) $@ '$(make-cmd)' \ - > $(dot-target).tmp; \ - rm -f $(depfile); \ - mv -f $(dot-target).tmp $(dot-target).cmd; + > $(dot-target).cmd; \ + rm -f $(depfile); endif diff --git a/scripts/Makefile.build b/scripts/Makefile.build index a8e7ba9..c909588 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -529,17 +529,15 @@ FORCE: # optimization, we don't need to read them if the target does not # exist, we will rebuild anyway in that case. -cmd_files := $(wildcard $(foreach f,$(sort $(targets)),$(dir $(f)).$(notdir $(f)).cmd)) +exist-targets := $(wildcard $(sort $(targets))) -ifneq ($(cmd_files),) - include $(cmd_files) -endif +-include $(foreach f,$(exist-targets),$(dir $(f)).$(notdir $(f)).cmd) ifneq ($(KBUILD_SRC),) # Create directories for object files if they do not exist obj-dirs := $(sort $(obj) $(patsubst %/,%, $(dir $(targets)))) -# If cmd_files exist, their directories apparently exist. Skip mkdir. -exist-dirs := $(sort $(patsubst %/,%, $(dir $(cmd_files)))) +# If targets exist, their directories apparently exist. Skip mkdir. +exist-dirs := $(sort $(patsubst %/,%, $(dir $(exist-targets)))) obj-dirs := $(strip $(filter-out $(exist-dirs), $(obj-dirs))) ifneq ($(obj-dirs),) $(shell mkdir -p $(obj-dirs)) From patchwork Tue Nov 20 01:05:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 151536 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3381214ljp; Mon, 19 Nov 2018 17:07:40 -0800 (PST) X-Google-Smtp-Source: AJdET5d/Lr8JSUzSAAK78pPHkxVF1D3Nz1ox9Rc4+zbgGcRgtB29HbAmflSYD2pOMKQ8pTrOLzv4 X-Received: by 2002:a62:fc52:: with SMTP id e79mr16637pfh.8.1542676060098; Mon, 19 Nov 2018 17:07:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542676060; cv=none; d=google.com; s=arc-20160816; b=E+um61Fe+cxCHh8h3qtYo/rJxaSEVlHiX6TP61WVONO1qzjIBuuEMtG/y8lK6tLP4X C48rsmlI0xVyulkcMwzk2OyRge7siES8+3k2KIGTstPAR0Pr4HG0dscGdvJYqL1ITpdH IiVvszfnikrPiiAYNsLezBT0HH87GteVn2JsUFRtKqMikCVl4o68T2ZHWsHRyIdW178x tsOB30MIthyWjGIl0/MI9fCHlrvxP7Iezui8xlzaCeM8uBiSsAcCzHiuK+T3bcscjOKl Y0tSF6iq/amgvCHWWnvI/m5fJve5dQrbbMFEDyrRSXhCLPNArm7wfZodXQykFgUtfpy6 amkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=DcxqWVdkNj8Wczcg0ZI9J/L3Bu3CGzT+kUES+YoZcV8=; b=b+7lAX+MeWzE2bNfcqGdrY+iuLgCsGqGpsXvYQPNbrKg7JUUTcDCh6ZWpfrgOhUsiH gjFS9d8qB4IP8BdnTyo0ZeqMCSPB01/yHr5aGbdWwV5TX6Vdxz063CgHtTzc19nU/LM2 1L8RL4WhtZMemvnH/dMKCr2fo51solnqDbzNfnr71K4WMJgaFYITC50K+zQS9R1bmccJ CU/P1USY3wLxnZn3qSzXoIqouqGoNH8AOAL2kfVtBUfwvAb5GPsCR1oS1alYC6cit+t9 WwWOaKGbdOpreXmq/hRm19jEt84D1NiZJWg3CO9ZSBKGYzjxlv6dDRskQtCBpxeFXLH6 0ayw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b="OzRsh/ul"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1-v6si43558667plv.205.2018.11.19.17.07.39; Mon, 19 Nov 2018 17:07:40 -0800 (PST) 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; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b="OzRsh/ul"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732623AbeKTLeE (ORCPT + 32 others); Tue, 20 Nov 2018 06:34:04 -0500 Received: from conuserg-11.nifty.com ([210.131.2.78]:35780 "EHLO conuserg-11.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730331AbeKTLeE (ORCPT ); Tue, 20 Nov 2018 06:34:04 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-11.nifty.com with ESMTP id wAK15ZEZ029284; Tue, 20 Nov 2018 10:05:37 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com wAK15ZEZ029284 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1542675938; bh=DcxqWVdkNj8Wczcg0ZI9J/L3Bu3CGzT+kUES+YoZcV8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OzRsh/ul2gyDxuvbaiLE3LBQCzuMN9rhUWJPoqZjLflNzxslwOrwcooVaeifMwafZ wMJcq8pvGcyoGJlhSzd3Y54962UH0HCPWi59g3SLPC9gRetb3YhEycCFrb0nwje8UU DqcPA6pnLV7kCaS9Oic0xx20ZEVor0iStDCYo6UF9aQZwE4IZ0CzxCzyYLM8guvm+Y H+7TcacU1jiGwU6OsQF+ZXoDo/Pb2+i16p4XypHTb7NUlSOVic7nQNVXkXUxRBJkXF 0LfviB/MKeaB/T4qojoqXfMaD7OtHsPGecvgk5e25WCVRlkBX6zWIfMto0V5xy0oaw 42tOTGGxv+e2A== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Sam Ravnborg , Nicolas Pitre , Rasmus Villemoes , Masahiro Yamada , linux-um@lists.infradead.org, linux-kernel@vger.kernel.org, Michal Marek , Richard Weinberger , Jeff Dike Subject: [PATCH v2 2/9] kbuild: remove redundant 'set -e' from filechk_* defines Date: Tue, 20 Nov 2018 10:05:23 +0900 Message-Id: <1542675930-21114-3-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1542675930-21114-1-git-send-email-yamada.masahiro@socionext.com> References: <1542675930-21114-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The filechk macro in scripts/Kbuild.include already sets 'set -e'. Signed-off-by: Masahiro Yamada --- Changes in v2: None arch/um/Makefile | 2 +- scripts/Makefile.lib | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/arch/um/Makefile b/arch/um/Makefile index ab1066c..71ff3d0 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile @@ -152,7 +152,7 @@ $(HOST_DIR)/um/user-offsets.s: __headers FORCE $(Q)$(MAKE) $(build)=$(HOST_DIR)/um $@ define filechk_gen-asm-offsets - (set -e; \ + ( \ echo "/*"; \ echo " * DO NOT MODIFY."; \ echo " *"; \ diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 8fe4468..ae3ae97 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -406,7 +406,7 @@ endef # Use filechk to avoid rebuilds when a header changes, but the resulting file # does not define filechk_offsets - (set -e; \ + ( \ echo "#ifndef $2"; \ echo "#define $2"; \ echo "/*"; \ From patchwork Tue Nov 20 01:05:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 151535 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3380976ljp; Mon, 19 Nov 2018 17:07:26 -0800 (PST) X-Google-Smtp-Source: AJdET5frNUUgaT+Q7xsU7HEEtNPVYcR1AxVOds6PUyaooB2ZRZU06VAjIxLLVo3dqqhbmYWSMRKj X-Received: by 2002:a63:e247:: with SMTP id y7mr11151pgj.84.1542676046071; Mon, 19 Nov 2018 17:07:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542676046; cv=none; d=google.com; s=arc-20160816; b=GhdKpnR2u2zJq27B3tbNg7xW/1NHkeoqMO+OIpZ0cUU6ode5lKkWZXZtF0uSY58aeg P4nBvxNle5yciJl+jZVFU17MaLrE4IgRRoI6ESPV4HOSOZvfuD0P677ksSrfOTkKfQuC mdULr4XJXq6PBuLhs37HwB6tUeT/0qqIv0rFglrQuROKpnUJUwzbKUUm17Hk3tFNKd26 P2pseJM1QLCV8I0FS5qbWrexpm58L/G26GMkF9M+0GD/ydbMq5VK02dCp65flRJNk7LW NS8NBG1IqCjQ0fqgwVQ4dZjx4kcKQdGis/WxsFfk3BSAurPyafbfSWyarJp1teVCMVjC BoHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=pGdxXPMFJICcooZeVubL7ooLTpq7ihXk5MfVNt/to8g=; b=j5zZz/Mkn5nKw77N/y//hG7/rohTbqhrsMqh0AOB/d3jtdf4p3b+45yFKFydIZ5sRM qXir/eARyS9OeLkB1cAfMx1Fln6cXPqZ3xEL4DCTXZmoCEpet1jLB5ao5+rBgFFgFih/ L+vG5RbSB8bwVj95ImqxrCdJv3Ol5r7x4FdyYE20TUAf/P2kpE4hYAhqTGj3zbEITG4h F2yzhI2Xxx7HwgWWolAM01zxZ5Tf65NL0Y+QKS7roStxE+Sweo8v+2StBQdee/pqwgVg a+gfXTAzAMbJTWPe6qZR7ZsJy5l7GbG98GDW+jbyERUURFd7pnbZbmIS5QkYGVCqAqLn oSbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=Fscb42md; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v1-v6si40586076plo.134.2018.11.19.17.07.25; Mon, 19 Nov 2018 17:07:26 -0800 (PST) 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; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=Fscb42md; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732039AbeKTLdM (ORCPT + 32 others); Tue, 20 Nov 2018 06:33:12 -0500 Received: from conuserg-11.nifty.com ([210.131.2.78]:34008 "EHLO conuserg-11.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730112AbeKTLdM (ORCPT ); Tue, 20 Nov 2018 06:33:12 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-11.nifty.com with ESMTP id wAK15ZEa029284; Tue, 20 Nov 2018 10:05:38 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com wAK15ZEa029284 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1542675939; bh=pGdxXPMFJICcooZeVubL7ooLTpq7ihXk5MfVNt/to8g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Fscb42mdF0Q4wsuMIK/cEQWvxAddZk4vFI2PsQVievpVZ2eavMvkg4aSjpbqjCJYE qecwWu3ypsa6JCgjE+WUNp/xdxT5s+Sv4ssGjdLUjmauGAQ+VhKG1B9M9d2AcqkLEK GPHdQART7YmG7YjvfVk6TnaI7E4TkxUOxWnaSnBXZ0245tEPEK0FaNwQ1OUkQLF7en A3b/2uwV/kTKT+ljb0np8z6++fZ9f2NHtxwdy+CG2qu/z3/V9VG8FT1fU8WdQzuwQn 5ozi+x2rSidQLJtyZUOH9MP68B94f/2KA4h3L0e947Nw9/JjO1T2gbBAuzIrp/3dTm og4ELn4+X5PwQ== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Sam Ravnborg , Nicolas Pitre , Rasmus Villemoes , Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH v2 3/9] kbuild: remove redundant 'set -e' from sub_cmd_record_mcount Date: Tue, 20 Nov 2018 10:05:24 +0900 Message-Id: <1542675930-21114-4-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1542675930-21114-1-git-send-email-yamada.masahiro@socionext.com> References: <1542675930-21114-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is executed inside the if_changed_rule, which already sets 'set -e'. Signed-off-by: Masahiro Yamada --- Changes in v2: None scripts/Makefile.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 diff --git a/scripts/Makefile.build b/scripts/Makefile.build index c909588..032ca24 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -204,7 +204,7 @@ sub_cmd_record_mcount = \ recordmcount_source := $(srctree)/scripts/recordmcount.c \ $(srctree)/scripts/recordmcount.h else -sub_cmd_record_mcount = set -e ; perl $(srctree)/scripts/recordmcount.pl "$(ARCH)" \ +sub_cmd_record_mcount = perl $(srctree)/scripts/recordmcount.pl "$(ARCH)" \ "$(if $(CONFIG_CPU_BIG_ENDIAN),big,little)" \ "$(if $(CONFIG_64BIT),64,32)" \ "$(OBJDUMP)" "$(OBJCOPY)" "$(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS)" \ From patchwork Tue Nov 20 01:05:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 151529 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3380398ljp; Mon, 19 Nov 2018 17:06:50 -0800 (PST) X-Google-Smtp-Source: AJdET5fS+9d5XfnbZp1X7/Cn2xxsGinUlofNGO7b/rtgHtosVGNTiQaDAjdZH0rS0C5LkW0+8fvW X-Received: by 2002:a63:d40a:: with SMTP id a10mr21889804pgh.394.1542676010840; Mon, 19 Nov 2018 17:06:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542676010; cv=none; d=google.com; s=arc-20160816; b=H8CMuCwK/0Nbm8m7tMU19InYO5T4+cB6Q2Yl8Mw1LetfoFzb3wxDdmAfVUDQPyuqGX jS0Io9EvbKVHJ5EhIBiJ8/yrAqazkVJsJUgt0/rfWOyRqvIfcxJ8egsgmen1yyNVTdM3 YEH8hUVUo6EX20CX0ZLPdaOUR3jDOTLkL+jtMQRKWWCdYakwNUGe2wToh49TsjNvpr1U ZD/fvVlfT4YXH9D4JugFk86bl53vpuU7rsMdX/nDRVeZ3gNcCkslWf5b7PNKLu3re7yI E8R8E56Bo9gKJfkCA6Wjny5vXQmirZzpiU5pcwenekdsBskkyamyjkdceP509TruNtHj y7eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=USfyhX+rqGI9oQ0DObF8yDoNu3wKqgsd8kSvjeFqJ7I=; b=mfHAtocLp2pyObm7gouhKWF9A77HDJV97NlSaiCbJ5JFlv5mNocalKZsVh7XUJOjOE d+IIcHhV0oke4Q+FPXGGyc/h9F594/AMmxQer7iX0iT5KI/JcFVoAmMge2BdLj//5/y5 pGYOTQfuh/5Ow4VwZkxU/6rKtQsbQFk3iEDWpnxHKdOWps9IhC7fGvkPKNywNEbKClhf iiVLgRLFEdPlvo7R+Vt1nsv9vSPc5wpAN3UEQc48P2bqoHBO6Gke99WV2oyJrjnFQih7 uYpsNMru8wzKEUwHCdhMdAtGTf3vNcVixx2f0vREyUpOGEwxNUo6SBzNe436S5d2jl5e tZ5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=R2ZSoOri; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1-v6si44296348plj.53.2018.11.19.17.06.50; Mon, 19 Nov 2018 17:06:50 -0800 (PST) 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; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=R2ZSoOri; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732325AbeKTLdN (ORCPT + 32 others); Tue, 20 Nov 2018 06:33:13 -0500 Received: from conuserg-11.nifty.com ([210.131.2.78]:34015 "EHLO conuserg-11.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730154AbeKTLdN (ORCPT ); Tue, 20 Nov 2018 06:33:13 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-11.nifty.com with ESMTP id wAK15ZEb029284; Tue, 20 Nov 2018 10:05:39 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com wAK15ZEb029284 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1542675939; bh=USfyhX+rqGI9oQ0DObF8yDoNu3wKqgsd8kSvjeFqJ7I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=R2ZSoOriF5+MnPBNVJaY+XuVGCSegggPlHso6wSM+y929L1hK81m0B+bnAn97ZJaW OKZaOJC9Sy6eWy0p72M1v8bF2f9obFhB5zLjBsiVBACYr6o2aAGAaNu87bDzUbHdEp CWFWhMMOqKMqMtXOlsVoz9vWVvqu+hv1Bbvoo5RAx1iRLY6zXhqc9wGxsLSdS2dhuB PAQU/tWX3o5DrEqkwKAaPbSUCqDSPD3uEJpL6FgUeIg3bHjM/WFJ+TXRaNw+ZSn414 9PXkyrT29jlascFcXBQlHATz4a/m1dLwliH9bXF4061BYiBsilanM5v0ilSH126QOF vlUEvza0l0t5w== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Sam Ravnborg , Nicolas Pitre , Rasmus Villemoes , Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH v2 4/9] kbuild: refactor modversions build rules Date: Tue, 20 Nov 2018 10:05:25 +0900 Message-Id: <1542675930-21114-5-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1542675930-21114-1-git-send-email-yamada.masahiro@socionext.com> References: <1542675930-21114-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Let $(CC) compile objects into normal files *.o instead of .tmp_*.o whether CONFIG_MODVERSIONS is enabled or not. With this, the input file for objtool is always *.o so objtool_o can go away. I guess the reason of using .tmp_*.o for intermediate objects was to avoid leaving incomplete *.o file (, whose timestamp says it is up-to-date) when the genksyms tool failed for some reasons. It no longer matters because any targets are deleted on errors since commit 9c2af1c7377a ("kbuild: add .DELETE_ON_ERROR special target"). Signed-off-by: Masahiro Yamada --- Changes in v2: - Clarify the benefit of this patch It is nice to delete objtool_o and ease the following commits scripts/Makefile.build | 54 ++++++++++++++++---------------------------------- 1 file changed, 17 insertions(+), 37 deletions(-) -- 2.7.4 diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 032ca24..4f94579 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -154,35 +154,30 @@ $(obj)/%.ll: $(src)/%.c FORCE # (See cmd_cc_o_c + relevant part of rule_cc_o_c) quiet_cmd_cc_o_c = CC $(quiet_modtag) $@ + cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $< -ifndef CONFIG_MODVERSIONS -cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $< - -else +ifdef CONFIG_MODVERSIONS # When module versioning is enabled the following steps are executed: -# o compile a .tmp_.o from .c -# o if .tmp_.o doesn't contain a __ksymtab version, i.e. does -# not export symbols, we just rename .tmp_.o to .o and -# are done. +# o compile a .o from .c +# o if .o doesn't contain a __ksymtab version, i.e. does +# not export symbols, it's done. # o otherwise, we calculate symbol versions using the good old # genksyms on the preprocessed source and postprocess them in a way # that they are usable as a linker script -# o generate .o from .tmp_.o using the linker to +# o generate .tmp_.o from .o using the linker to # replace the unresolved symbols __crc_exported_symbol with # the actual value of the checksum generated by genksyms - -cmd_cc_o_c = $(CC) $(c_flags) -c -o $(@D)/.tmp_$(@F) $< +# o remove .tmp_.o to .o cmd_modversions_c = \ - if $(OBJDUMP) -h $(@D)/.tmp_$(@F) | grep -q __ksymtab; then \ + if $(OBJDUMP) -h $@ | grep -q __ksymtab; then \ $(call cmd_gensymtypes_c,$(KBUILD_SYMTYPES),$(@:.o=.symtypes)) \ > $(@D)/.tmp_$(@F:.o=.ver); \ \ - $(LD) $(KBUILD_LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \ + $(LD) $(KBUILD_LDFLAGS) -r -o $(@D)/.tmp_$(@F) $@ \ -T $(@D)/.tmp_$(@F:.o=.ver); \ - rm -f $(@D)/.tmp_$(@F) $(@D)/.tmp_$(@F:.o=.ver); \ - else \ mv -f $(@D)/.tmp_$(@F) $@; \ + rm -f $(@D)/.tmp_$(@F:.o=.ver); \ fi; endif @@ -241,19 +236,12 @@ ifneq ($(RETPOLINE_CFLAGS),) endif endif - -ifdef CONFIG_MODVERSIONS -objtool_o = $(@D)/.tmp_$(@F) -else -objtool_o = $(@) -endif - # 'OBJECT_FILES_NON_STANDARD := y': skip objtool checking for a directory # 'OBJECT_FILES_NON_STANDARD_foo.o := 'y': skip objtool checking for a file # 'OBJECT_FILES_NON_STANDARD_foo.o := 'n': override directory skip for a file cmd_objtool = $(if $(patsubst y%,, \ $(OBJECT_FILES_NON_STANDARD_$(basetarget).o)$(OBJECT_FILES_NON_STANDARD)n), \ - $(__objtool_obj) $(objtool_args) "$(objtool_o)";) + $(__objtool_obj) $(objtool_args) $@;) objtool_obj = $(if $(patsubst y%,, \ $(OBJECT_FILES_NON_STANDARD_$(basetarget).o)$(OBJECT_FILES_NON_STANDARD)n), \ $(__objtool_obj)) @@ -357,34 +345,26 @@ $(obj)/%.s: $(src)/%.S FORCE $(call if_changed_dep,cpp_s_S) quiet_cmd_as_o_S = AS $(quiet_modtag) $@ + cmd_as_o_S = $(CC) $(a_flags) -c -o $@ $< -ifndef CONFIG_MODVERSIONS -cmd_as_o_S = $(CC) $(a_flags) -c -o $@ $< - -else +ifdef CONFIG_MODVERSIONS ASM_PROTOTYPES := $(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/asm-prototypes.h) -ifeq ($(ASM_PROTOTYPES),) -cmd_as_o_S = $(CC) $(a_flags) -c -o $@ $< - -else +ifneq ($(ASM_PROTOTYPES),) # versioning matches the C process described above, with difference that # we parse asm-prototypes.h C header to get function definitions. -cmd_as_o_S = $(CC) $(a_flags) -c -o $(@D)/.tmp_$(@F) $< - cmd_modversions_S = \ - if $(OBJDUMP) -h $(@D)/.tmp_$(@F) | grep -q __ksymtab; then \ + if $(OBJDUMP) -h $@ | grep -q __ksymtab; then \ $(call cmd_gensymtypes_S,$(KBUILD_SYMTYPES),$(@:.o=.symtypes)) \ > $(@D)/.tmp_$(@F:.o=.ver); \ \ - $(LD) $(KBUILD_LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \ + $(LD) $(KBUILD_LDFLAGS) -r -o $(@D)/.tmp_$(@F) $@ \ -T $(@D)/.tmp_$(@F:.o=.ver); \ - rm -f $(@D)/.tmp_$(@F) $(@D)/.tmp_$(@F:.o=.ver); \ - else \ mv -f $(@D)/.tmp_$(@F) $@; \ + rm -f $(@D)/.tmp_$(@F:.o=.ver); \ fi; endif endif From patchwork Tue Nov 20 01:05:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 151534 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3380743ljp; Mon, 19 Nov 2018 17:07:12 -0800 (PST) X-Google-Smtp-Source: AJdET5evBz9whMXjubeI9yQbKJn75HZg6CAwU0DcrmSNNqww3UMsVAiIwvOo+rDk0rlUBLYLQDPD X-Received: by 2002:a17:902:f24:: with SMTP id 33-v6mr25427082ply.228.1542676032609; Mon, 19 Nov 2018 17:07:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542676032; cv=none; d=google.com; s=arc-20160816; b=EszKwhWHc5fU+EIhvzl27ah+Ru007GW2jVTR1PfqYL/tUiWcx5jxI9hjYQ/Vylr8Vc 8w4KyxueqA+kZMtj7fT+QwG5Wo1tmxgDaVu5UpKhrUEe7+KCcwFxOR4xpBx29Jzb1ZMm 4g+BDfd2nTPyGTQOxaekMzs4KHbVzCGAg/ILqrauO0seTf6L782e4tc/qwC4BoAuFOIo 1ldqHPX6SZhhvy9YbqDRNBMCMthp+msOwLGjb8Yc1m9zw3kx0qvZdowrgKvRdWFyJ7yT ZFm9habMYJxvXfFcdv0WZNCmuMLEBi2AX8bNPpz4KSDnbeJLG0qaIT3qemri/0UyKZ8H BPpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=wILs/jCFE4M+ZMmlQ+LQNN5sZo97KGOWxwtpzXfKeLE=; b=mYSLzKEzxQft5CmhI+P9e/VsZChVmTgKt+6byT6r4AsPdraU4u6THcAnMQZHgphPTk O0Q3zuKjWSH1yB3ctEeRVRJNfjK8+UJ8PUx5x3/CcFqsz+c6SbOh51jybvAHvOYRTCDo CnveZWZy8zY62zDYE1UeTNjMQzoPq6lhjCtX1g0lAMjNa72+5Coa6I7ALkaFDqBNiKpK W6nHYOhPI0d37wCgnv/fcfoL7Q3Dfw6gLGcnyLaGjBVACXaUiPV/ex5ymfLY4cdf442k pnP+ALBWLvY6Ox5/PQEuKWPK36B4Wh+AmmOpx3RZ4VWwBq5+fUMKLLriLm3z+nbVITbk 6lNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=ZPeonO61; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j20si39392994pgg.162.2018.11.19.17.07.12; Mon, 19 Nov 2018 17:07:12 -0800 (PST) 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; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=ZPeonO61; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732613AbeKTLdg (ORCPT + 32 others); Tue, 20 Nov 2018 06:33:36 -0500 Received: from conuserg-11.nifty.com ([210.131.2.78]:34850 "EHLO conuserg-11.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730331AbeKTLdg (ORCPT ); Tue, 20 Nov 2018 06:33:36 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-11.nifty.com with ESMTP id wAK15ZEc029284; Tue, 20 Nov 2018 10:05:40 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com wAK15ZEc029284 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1542675940; bh=wILs/jCFE4M+ZMmlQ+LQNN5sZo97KGOWxwtpzXfKeLE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZPeonO61Am3xQAnlKi4AWW28Iv++4Jh0rrA5/vw/WgfFWB6HPzN4x0JEWMQkUwSe1 jnns6FNrgkesZe3MGz+EOooGES/u5/4kclgwI9sU7JqKgzhqBbyTXhJhvsBE6BlkLu eHQ58NEWqsI0UuzxX2198rAurMKU+WDDnD5mwCvulZw/OEKSy721fPQXI+NJrBcoNL OIB4lqMakJv+pmpe7o0QOsBYBz4QHN8zUJ8H/eDJ197EbtLxzNxP66ZqZkZxIZqZGx 1euQ6W9AUJSSFEpRorn9ESWEFveM0Yuv2lWx/JvkgY+lcR+ZBbcxZi56UwOMqk4Moz taaQkIjw0pPnw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Sam Ravnborg , Nicolas Pitre , Rasmus Villemoes , Masahiro Yamada , linux-arch@vger.kernel.org, Arnd Bergmann , Michael Ellerman , linux-kernel@vger.kernel.org, Michal Marek , Will Deacon , Ard Biesheuvel , Andrew Morton Subject: [PATCH v2 5/9] kbuild: simplify dependency generation for CONFIG_TRIM_UNUSED_KSYMS Date: Tue, 20 Nov 2018 10:05:26 +0900 Message-Id: <1542675930-21114-6-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1542675930-21114-1-git-send-email-yamada.masahiro@socionext.com> References: <1542675930-21114-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org My main motivation of this commit is to clean up scripts/Kbuild.include and scripts/Makefile.build. Currently, CONFIG_TRIM_UNUSED_KSYMS works with a tricky gimmick; possibly exported symbols are detected by letting $(CPP) replace EXPORT_SYMBOL* with a special string '=== __KSYM_*===', which is post-processed by sed, and passed to fixdep. The extra preprocessing is costly, and hacking cmd_and_fixdep is ugly. I came up with a new way to find exported symbols; insert a dummy symbol __ksym_marker_* to each potentially exported symbol. Those dummy symbols are picked up by $(NM), post-processed by sed, then appended to .*.cmd files. I collected the post-process part to a new shell script scripts/gen_ksymdeps.sh for readability. The dummy symbols are put into the .discard.* section so that the linker script rips them off the final vmlinux or modules. A nice side-effect is building with CONFIG_TRIM_UNUSED_KSYMS will be much faster. Signed-off-by: Masahiro Yamada --- Changes in v2: - Let gen_ksymdeps.sh add dependencies to .*.cmd file directly - Fix typos include/asm-generic/export.h | 13 ++++++++----- include/linux/export.h | 18 +++++++++--------- scripts/Kbuild.include | 28 ---------------------------- scripts/Makefile.build | 7 +++++++ scripts/basic/fixdep.c | 31 ++++--------------------------- scripts/gen_ksymdeps.sh | 25 +++++++++++++++++++++++++ 6 files changed, 53 insertions(+), 69 deletions(-) create mode 100755 scripts/gen_ksymdeps.sh -- 2.7.4 Reviewed-by: Nicolas Pitre diff --git a/include/asm-generic/export.h b/include/asm-generic/export.h index 4d73e6e..294d6ae 100644 --- a/include/asm-generic/export.h +++ b/include/asm-generic/export.h @@ -59,16 +59,19 @@ __kcrctab_\name: .endm #undef __put -#if defined(__KSYM_DEPS__) - -#define __EXPORT_SYMBOL(sym, val, sec) === __KSYM_##sym === - -#elif defined(CONFIG_TRIM_UNUSED_KSYMS) +#if defined(CONFIG_TRIM_UNUSED_KSYMS) #include #include +.macro __ksym_marker sym + .section ".discard.ksym","a" +__ksym_marker_\sym: + .previous +.endm + #define __EXPORT_SYMBOL(sym, val, sec) \ + __ksym_marker sym; \ __cond_export_sym(sym, val, sec, __is_defined(__KSYM_##sym)) #define __cond_export_sym(sym, val, sec, conf) \ ___cond_export_sym(sym, val, sec, conf) diff --git a/include/linux/export.h b/include/linux/export.h index ce764a5..fd8711e 100644 --- a/include/linux/export.h +++ b/include/linux/export.h @@ -92,22 +92,22 @@ struct kernel_symbol { */ #define __EXPORT_SYMBOL(sym, sec) -#elif defined(__KSYM_DEPS__) +#elif defined(CONFIG_TRIM_UNUSED_KSYMS) + +#include /* * For fine grained build dependencies, we want to tell the build system * about each possible exported symbol even if they're not actually exported. - * We use a string pattern that is unlikely to be valid code that the build - * system filters out from the preprocessor output (see ksym_dep_filter - * in scripts/Kbuild.include). + * We use a symbol pattern __ksym_marker_ that the build system filters + * from the $(NM) output (see scripts/gen_ksymdeps.sh). These symbols are + * discarded in the final link stage. */ -#define __EXPORT_SYMBOL(sym, sec) === __KSYM_##sym === - -#elif defined(CONFIG_TRIM_UNUSED_KSYMS) - -#include +#define __ksym_marker(sym) \ + static int __ksym_marker_##sym[0] __section(".discard.ksym") __used #define __EXPORT_SYMBOL(sym, sec) \ + __ksym_marker(sym); \ __cond_export_sym(sym, sec, __is_defined(__KSYM_##sym)) #define __cond_export_sym(sym, sec, conf) \ ___cond_export_sym(sym, sec, conf) diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 6cf6a8b..4b943f4 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -260,39 +260,11 @@ if_changed_dep = $(if $(strip $(any-prereq) $(arg-check) ), \ @set -e; \ $(cmd_and_fixdep), @:) -ifndef CONFIG_TRIM_UNUSED_KSYMS - cmd_and_fixdep = \ $(echo-cmd) $(cmd_$(1)); \ scripts/basic/fixdep $(depfile) $@ '$(make-cmd)' > $(dot-target).cmd;\ rm -f $(depfile); -else - -# Filter out exported kernel symbol names from the preprocessor output. -# See also __KSYM_DEPS__ in include/linux/export.h. -# We disable the depfile generation here, so as not to overwrite the existing -# depfile while fixdep is parsing it. -flags_nodeps = $(filter-out -Wp$(comma)-M%, $($(1))) -ksym_dep_filter = \ - case "$(1)" in \ - cc_*_c|cpp_i_c) \ - $(CPP) $(call flags_nodeps,c_flags) -D__KSYM_DEPS__ $< ;; \ - as_*_S|cpp_s_S) \ - $(CPP) $(call flags_nodeps,a_flags) -D__KSYM_DEPS__ $< ;; \ - boot*|build*|cpp_its_S|*cpp_lds_S|dtc|host*|vdso*) : ;; \ - *) echo "Don't know how to preprocess $(1)" >&2; false ;; \ - esac | tr ";" "\n" | sed -n 's/^.*=== __KSYM_\(.*\) ===.*$$/_\1/p' - -cmd_and_fixdep = \ - $(echo-cmd) $(cmd_$(1)); \ - $(ksym_dep_filter) | \ - scripts/basic/fixdep -e $(depfile) $@ '$(make-cmd)' \ - > $(dot-target).cmd; \ - rm -f $(depfile); - -endif - # Usage: $(call if_changed_rule,foo) # Will check if $(cmd_foo) or any of the prerequisites changed, # and if so will execute $(rule_foo). diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 4f94579..c23ee45 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -254,9 +254,15 @@ objtool_dep = $(objtool_obj) \ $(wildcard include/config/orc/unwinder.h \ include/config/stack/validation.h) +ifdef CONFIG_TRIM_UNUSED_KSYMS +cmd_gen_ksymdeps = \ + $(CONFIG_SHELL) $(srctree)/scripts/gen_ksymdeps.sh $@ >> $(dot-target).cmd; +endif + define rule_cc_o_c $(call echo-cmd,checksrc) $(cmd_checksrc) \ $(call cmd_and_fixdep,cc_o_c) \ + $(cmd_gen_ksymdeps) \ $(cmd_checkdoc) \ $(call echo-cmd,objtool) $(cmd_objtool) \ $(cmd_modversions_c) \ @@ -265,6 +271,7 @@ endef define rule_as_o_S $(call cmd_and_fixdep,as_o_S) \ + $(cmd_gen_ksymdeps) \ $(call echo-cmd,objtool) $(cmd_objtool) \ $(cmd_modversions_S) endef diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c index 850966f3..facbd60 100644 --- a/scripts/basic/fixdep.c +++ b/scripts/basic/fixdep.c @@ -105,8 +105,7 @@ static void usage(void) { - fprintf(stderr, "Usage: fixdep [-e] \n"); - fprintf(stderr, " -e insert extra dependencies given on stdin\n"); + fprintf(stderr, "Usage: fixdep \n"); exit(1); } @@ -131,21 +130,6 @@ static void print_dep(const char *m, int slen, const char *dir) printf(".h) \\\n"); } -static void do_extra_deps(void) -{ - char buf[80]; - - while (fgets(buf, sizeof(buf), stdin)) { - int len = strlen(buf); - - if (len < 2 || buf[len - 1] != '\n') { - fprintf(stderr, "fixdep: bad data on stdin\n"); - exit(1); - } - print_dep(buf, len - 1, "include/ksym"); - } -} - struct item { struct item *next; unsigned int len; @@ -293,7 +277,7 @@ static int is_ignored_file(const char *s, int len) * assignments are parsed not only by make, but also by the rather simple * parser in scripts/mod/sumversion.c. */ -static void parse_dep_file(char *m, const char *target, int insert_extra_deps) +static void parse_dep_file(char *m, const char *target) { char *p; int is_last, is_target; @@ -369,9 +353,6 @@ static void parse_dep_file(char *m, const char *target, int insert_extra_deps) exit(1); } - if (insert_extra_deps) - do_extra_deps(); - printf("\n%s: $(deps_%s)\n\n", target, target); printf("$(deps_%s):\n", target); } @@ -379,13 +360,9 @@ static void parse_dep_file(char *m, const char *target, int insert_extra_deps) int main(int argc, char *argv[]) { const char *depfile, *target, *cmdline; - int insert_extra_deps = 0; void *buf; - if (argc == 5 && !strcmp(argv[1], "-e")) { - insert_extra_deps = 1; - argv++; - } else if (argc != 4) + if (argc != 4) usage(); depfile = argv[1]; @@ -395,7 +372,7 @@ int main(int argc, char *argv[]) printf("cmd_%s := %s\n\n", target, cmdline); buf = read_file(depfile); - parse_dep_file(buf, target, insert_extra_deps); + parse_dep_file(buf, target); free(buf); return 0; diff --git a/scripts/gen_ksymdeps.sh b/scripts/gen_ksymdeps.sh new file mode 100755 index 0000000..1324986 --- /dev/null +++ b/scripts/gen_ksymdeps.sh @@ -0,0 +1,25 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 + +set -e + +# List of exported symbols +ksyms=$($NM $1 | sed -n 's/.*__ksym_marker_\(.*\)/\1/p' | tr A-Z a-z) + +if [ -z "$ksyms" ]; then + exit 0 +fi + +echo +echo "ksymdeps_$1 := \\" + +for s in $ksyms +do + echo $s | sed -e 's:^_*: $(wildcard include/ksym/:' \ + -e 's:__*:/:g' -e 's/$/.h) \\/' +done + +echo +echo "$1: \$(ksymdeps_$1)" +echo +echo "\$(ksymdeps_$1):" From patchwork Tue Nov 20 01:05:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 151533 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3380723ljp; Mon, 19 Nov 2018 17:07:10 -0800 (PST) X-Google-Smtp-Source: AJdET5f65DzTMmx0WApy6DqzmPPeMDjZHsO30zDqqQtmSX2JRtqsC7tK5Um/odAl2JdhmGtkfW/3 X-Received: by 2002:a63:1157:: with SMTP id 23mr22414193pgr.245.1542676030818; Mon, 19 Nov 2018 17:07:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542676030; cv=none; d=google.com; s=arc-20160816; b=Kd8I8XsHmTrbHgpMopdtt6wZBveSkyTbCxlgzpVdKTsoAgx3KNLxn3Oqa01KDUtLw0 IJL4nkdLDlXvNsm9kEyX8LKT7g7qcUiKgXZ+l8nbBVqFs5hL/b3ihyDs+tGdlR+kSIru TjfnpBnXFuwpGdT8nDwSAxkeFV47G7lNSDSTUnpFmENvYhqsilq98+ouZHEEce/Vw3+b 5FnaPbOSk28IfhVOg6r8tXHK9ZH8YYou5aLlFHX7nGDhl/qpKDXex06V6ygUcXrJMBWM g0M0xZiAXpAMKd29iUQKyETEAdhhLCbbQhLwnud9pTedU79JcJnzY3Wtf6OLnyse1yRR Tsfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=NMzBvf7Uf/mcroQkxmHDTE9wi2Zk1t9cWFR9t5jzbfs=; b=NuLWeNRGuy7TODaxtx5IWUis7nw6jlQWmj9DaX6P6aRozXqH2U42A4YcUe5138YJLm XfRa0tXXgR5vNexFTQa7RQ7W4AknJNc3ugiJ8duIwV7UnVN4SNh4y4USahAExmWFO/Z3 h+fDXgi1wElvNo5f8bY8AaZiADMgsBTBcumzozC5524Ssl/6xsY1yxnjiVu3JSaHIKxQ GA0K3ifKSmmABa3qCXHDbGOMrX604Ex5YBrt9UgdzVY3tVDxt9+dvdV+xerurwPtIl/S ryYvSyVwweWtVqZanhSxVBNYs5ckd9yKqtVgdNFQy2KT9pqDaVXpsjtVssif1enR7YYm XRSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b="UEo/OL5T"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p18si38502554pgb.469.2018.11.19.17.07.09; Mon, 19 Nov 2018 17:07:10 -0800 (PST) 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; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b="UEo/OL5T"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732455AbeKTLdV (ORCPT + 32 others); Tue, 20 Nov 2018 06:33:21 -0500 Received: from conuserg-11.nifty.com ([210.131.2.78]:34065 "EHLO conuserg-11.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732058AbeKTLdO (ORCPT ); Tue, 20 Nov 2018 06:33:14 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-11.nifty.com with ESMTP id wAK15ZEd029284; Tue, 20 Nov 2018 10:05:41 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com wAK15ZEd029284 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1542675941; bh=NMzBvf7Uf/mcroQkxmHDTE9wi2Zk1t9cWFR9t5jzbfs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UEo/OL5T0IkD8dM6AYpu2WlSsebYq5WBxvpsz74pZwcfpSxJAyOR+s8U5ueThtKbq qbxfRCRqBXN/a38zfvxt1sA8qeEwQj5f76bk2HW0QEITeG43IcGmah9h7E/AMWpluP Hcd9vVpItWq8cZtbeoi5ZT/ylClPSbpb5tizeIZJw6rzhGU8/3EVp/WqQGFiygry89 HJY3EfgTYfgLJUa4tdqpZukBCvBFjRPauVJyKoX3rE40BqArs9/nIJ65lXmznDF6hc X9cbQOk1jOB4VLXcqciWuKkT3L6bZF3QvVFTKaVB0OROW2mFN0G0Y1CZiEEmUfx4qJ GZ9VFRpkFmOCg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Sam Ravnborg , Nicolas Pitre , Rasmus Villemoes , Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH v2 6/9] kbuild: change if_changed_rule for multi-line recipe Date: Tue, 20 Nov 2018 10:05:27 +0900 Message-Id: <1542675930-21114-7-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1542675930-21114-1-git-send-email-yamada.masahiro@socionext.com> References: <1542675930-21114-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The 'define' ... 'endef' directive can describe a recipe that consists of multiple lines. For example, all: @echo hello @echo world ... can be written as: define greeting @echo hello @echo world endif all: $(greeting) This is useful to confine a series of shell commands into a single macro without losing readability. However, rule_cc_o_c and rule_as_o_S in scripts/Makefile.build are written like this (with a trailing semicolon in each cmd_*): define rule_cc_o_c [action1] ; \ [action2] ; \ [action3] ; endef All shell commands are concatenated with '; \' so that it looks like a single command from the Makefile point of view. This does not exploit the benefits of 'define' ... 'endef' form because a single shell command can be simply written, like this: rule_cc_o_c = \ [action1] ; \ [action2] ; \ [action3] ; I guess the intention for the command concatenation was to let the '@set -e' in if_changed_rule cover all the commands. We can improve the readability by moving '@set -e' to the 'cmd' macro. The combo of $(call echo-cmd,*) $(cmd_*) in rule_cc_o_c and rule_as_o_S have been replaced with $(call cmd,*). The trailing back-slashes have been removed. Here is a note about the performance: the commands in rule_cc_o_c and rule_as_o_S were previously executed all together in a single subshell, but now each line in a separate subshell. This means Make will spawn extra subshells [1]. I measured the build performance for x86_64_defconfig + CONFIG_MODVERSIONS + CONFIG_TRIM_UNUSED_KSYMS and I saw slight performance regression, but I believe code readability and maintainability wins. [1] Precisely, GNU Make may optimize this by executing the command directly instead of forking a subshell, if no shell special characters are found in the command line and omitting the subshell will not change the behavior. Signed-off-by: Masahiro Yamada --- Changes in v2: - Rewrite commit message more precisely, and mention about the build performance scripts/Kbuild.include | 6 ++---- scripts/Makefile.build | 22 +++++++++++----------- 2 files changed, 13 insertions(+), 15 deletions(-) -- 2.7.4 diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 4b943f4..978d72b 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -215,7 +215,7 @@ echo-cmd = $(if $($(quiet)cmd_$(1)),\ echo ' $(call escsq,$($(quiet)cmd_$(1)))$(echo-why)';) # printing commands -cmd = @$(echo-cmd) $(cmd_$(1)) +cmd = @set -e; $(echo-cmd) $(cmd_$(1)) # Add $(obj)/ for paths that are not absolute objectify = $(foreach o,$(1),$(if $(filter /%,$(o)),$(o),$(obj)/$(o))) @@ -268,9 +268,7 @@ cmd_and_fixdep = \ # Usage: $(call if_changed_rule,foo) # Will check if $(cmd_foo) or any of the prerequisites changed, # and if so will execute $(rule_foo). -if_changed_rule = $(if $(strip $(any-prereq) $(arg-check) ), \ - @set -e; \ - $(rule_$(1)), @:) +if_changed_rule = $(if $(strip $(any-prereq) $(arg-check)), $(rule_$(1)), @:) ### # why - tell why a target got built diff --git a/scripts/Makefile.build b/scripts/Makefile.build index c23ee45..e445b3e 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -260,20 +260,20 @@ cmd_gen_ksymdeps = \ endif define rule_cc_o_c - $(call echo-cmd,checksrc) $(cmd_checksrc) \ - $(call cmd_and_fixdep,cc_o_c) \ - $(cmd_gen_ksymdeps) \ - $(cmd_checkdoc) \ - $(call echo-cmd,objtool) $(cmd_objtool) \ - $(cmd_modversions_c) \ - $(call echo-cmd,record_mcount) $(cmd_record_mcount) + $(call cmd,checksrc) + @$(call cmd_and_fixdep,cc_o_c) + $(call cmd,gen_ksymdeps) + $(call cmd,checkdoc) + $(call cmd,objtool) + $(call cmd,modversions_c) + $(call cmd,record_mcount) endef define rule_as_o_S - $(call cmd_and_fixdep,as_o_S) \ - $(cmd_gen_ksymdeps) \ - $(call echo-cmd,objtool) $(cmd_objtool) \ - $(cmd_modversions_S) + @$(call cmd_and_fixdep,as_o_S) + $(call cmd,gen_ksymdeps) + $(call cmd,objtool) + $(call cmd,modversions_S) endef # List module undefined symbols (or empty line if not enabled) From patchwork Tue Nov 20 01:05:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 151532 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3380621ljp; Mon, 19 Nov 2018 17:07:03 -0800 (PST) X-Google-Smtp-Source: AJdET5cl0rBAnEQSnVj8zRjWi+XbptJ4FKZKN4xoqREgZe8EPqmz7N/jm3RvQfMCVk7yDvDvDTAh X-Received: by 2002:a63:da14:: with SMTP id c20mr21393599pgh.233.1542676023457; Mon, 19 Nov 2018 17:07:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542676023; cv=none; d=google.com; s=arc-20160816; b=OnJYgcr3j1i7y4W/5q2RGpswsopnUzYNiDyjjIutzBiIhmpQ2wL6p3VuExdXFIQkkx L8smQy557OYQvO43ukK9bAzXWojVu4a5XeTYIwHsm6XbZHYphJ9jc/kjjRe1dS/5J1/o 0sw2yA/rX80FKh9dtuIAximZ9f5u9UAIEjEKGRhODNJda2W6kvVUGMLOsbqR9lbpgpkb ylO1gSm3ICSRvDWxZ73Fjcow6vg4etqmLPYwcNgZyksMm39SyhQT1V5hzi3lsTMC/eR1 MzOAK3B3JgdH9zkg4LiicwayDlneYq9CkBhbn5wK5kuEbbF1vrxqdEX9LNYBEzNk00Lt PaXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=5BzTqVAJb2FAdAx//unkzpW5FFm31SMMv6bkjPNROS0=; b=IHkv46PE1RUtXchsGjB2LFUpVIhJxb1eN/vXMF3WMQW8znrU0d1KONoYtS3k5ZJN6V anLIuizHoNSZaa35mUhKKEyLjmDdqAp4cwlDZbHrSFUUm7YFZxZU9u5Fgq91/4Bl3hmu XmxN+MSi12ZCubie36UpZh6xCBkME+Lce2RU9/D+oRCWnDBlnHxdyHF+P/vK04D9P8Wg FQIaIMyAR7Ua/bBnRmEQYyWteWQXSVR36Dp8ZHYe48ApLkfCfMq2mYJ2UD2I51ZPoi1w 8B9eXtFSQliNXIQc8+Sp10EfGWuzXBfoHp9AUCjClko0Yq7xV0OZg9W4GB1EHeAdQm7l WOJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=cHA3IUKR; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j189si38467046pgd.185.2018.11.19.17.07.03; Mon, 19 Nov 2018 17:07:03 -0800 (PST) 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; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=cHA3IUKR; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732524AbeKTLdV (ORCPT + 32 others); Tue, 20 Nov 2018 06:33:21 -0500 Received: from conuserg-11.nifty.com ([210.131.2.78]:34063 "EHLO conuserg-11.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732157AbeKTLdO (ORCPT ); Tue, 20 Nov 2018 06:33:14 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-11.nifty.com with ESMTP id wAK15ZEe029284; Tue, 20 Nov 2018 10:05:41 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com wAK15ZEe029284 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1542675942; bh=5BzTqVAJb2FAdAx//unkzpW5FFm31SMMv6bkjPNROS0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cHA3IUKRfbj6FNW5cHvTQdHge2z3GjAJgzwVaeTtNXhLVoiXEEugtwTOy4DbCvZ1y wwP4jaSzCMaqr75B2zSJYa/mthziDYqV+TF4/B5yhvBpJ/fHJzx6s4dkKgRLoFpCZD SuXZNqy/fR5QtelvR8tq1U1WqrCIyBJ2Loofpuxa/VWmvL/BVbxfwHmlI+m8ejqBq+ h3fjRf7Pe9SAbkvAsR1Gb7Tchj/zHj+mLVtHC/E4r8fgUYT9A/MPKlEgXK20suXdp1 efLf+aEOyFFDtvYDWqyORO4kZmnzoG20Sml9oAyv6HnOrUb4HaCUNcFgboVYbf5zwb TBNyUEUbNshsg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Sam Ravnborg , Nicolas Pitre , Rasmus Villemoes , Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH v2 7/9] kbuild: remove trailing semicolon from cmd_* passed to if_changed_rule Date: Tue, 20 Nov 2018 10:05:28 +0900 Message-Id: <1542675930-21114-8-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1542675930-21114-1-git-send-email-yamada.masahiro@socionext.com> References: <1542675930-21114-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org With the change of rule_cc_o_c / rule_as_o_S in the last commit, each command is executed in a separate subshell. Rip off unneeded semicolons. Signed-off-by: Masahiro Yamada --- Changes in v2: - Clean up cmd_and_fixdep as well scripts/Kbuild.include | 2 +- scripts/Makefile.build | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) -- 2.7.4 diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 978d72b..79c4875 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -263,7 +263,7 @@ if_changed_dep = $(if $(strip $(any-prereq) $(arg-check) ), \ cmd_and_fixdep = \ $(echo-cmd) $(cmd_$(1)); \ scripts/basic/fixdep $(depfile) $@ '$(make-cmd)' > $(dot-target).cmd;\ - rm -f $(depfile); + rm -f $(depfile) # Usage: $(call if_changed_rule,foo) # Will check if $(cmd_foo) or any of the prerequisites changed, diff --git a/scripts/Makefile.build b/scripts/Makefile.build index e445b3e..ffd2fe4 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -75,14 +75,14 @@ __build: $(if $(KBUILD_BUILTIN),$(builtin-target) $(lib-target) $(extra-y)) \ # Linus' kernel sanity checking tool ifeq ($(KBUILD_CHECKSRC),1) quiet_cmd_checksrc = CHECK $< - cmd_checksrc = $(CHECK) $(CHECKFLAGS) $(c_flags) $< ; + cmd_checksrc = $(CHECK) $(CHECKFLAGS) $(c_flags) $< else ifeq ($(KBUILD_CHECKSRC),2) quiet_cmd_force_checksrc = CHECK $< - cmd_force_checksrc = $(CHECK) $(CHECKFLAGS) $(c_flags) $< ; + cmd_force_checksrc = $(CHECK) $(CHECKFLAGS) $(c_flags) $< endif ifneq ($(KBUILD_ENABLE_EXTRA_GCC_CHECKS),) - cmd_checkdoc = $(srctree)/scripts/kernel-doc -none $< ; + cmd_checkdoc = $(srctree)/scripts/kernel-doc -none $< endif # Do section mismatch analysis for each module/built-in.a @@ -178,7 +178,7 @@ cmd_modversions_c = \ -T $(@D)/.tmp_$(@F:.o=.ver); \ mv -f $(@D)/.tmp_$(@F) $@; \ rm -f $(@D)/.tmp_$(@F:.o=.ver); \ - fi; + fi endif ifdef CONFIG_FTRACE_MCOUNT_RECORD @@ -211,7 +211,7 @@ cmd_record_mcount = \ if [ "$(findstring $(CC_FLAGS_FTRACE),$(_c_flags))" = \ "$(CC_FLAGS_FTRACE)" ]; then \ $(sub_cmd_record_mcount) \ - fi; + fi endif # CC_USING_RECORD_MCOUNT endif # CONFIG_FTRACE_MCOUNT_RECORD @@ -241,7 +241,7 @@ endif # 'OBJECT_FILES_NON_STANDARD_foo.o := 'n': override directory skip for a file cmd_objtool = $(if $(patsubst y%,, \ $(OBJECT_FILES_NON_STANDARD_$(basetarget).o)$(OBJECT_FILES_NON_STANDARD)n), \ - $(__objtool_obj) $(objtool_args) $@;) + $(__objtool_obj) $(objtool_args) $@) objtool_obj = $(if $(patsubst y%,, \ $(OBJECT_FILES_NON_STANDARD_$(basetarget).o)$(OBJECT_FILES_NON_STANDARD)n), \ $(__objtool_obj)) @@ -256,7 +256,7 @@ objtool_dep = $(objtool_obj) \ ifdef CONFIG_TRIM_UNUSED_KSYMS cmd_gen_ksymdeps = \ - $(CONFIG_SHELL) $(srctree)/scripts/gen_ksymdeps.sh $@ >> $(dot-target).cmd; + $(CONFIG_SHELL) $(srctree)/scripts/gen_ksymdeps.sh $@ >> $(dot-target).cmd endif define rule_cc_o_c @@ -372,7 +372,7 @@ cmd_modversions_S = \ -T $(@D)/.tmp_$(@F:.o=.ver); \ mv -f $(@D)/.tmp_$(@F) $@; \ rm -f $(@D)/.tmp_$(@F:.o=.ver); \ - fi; + fi endif endif From patchwork Tue Nov 20 01:05:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 151528 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3380361ljp; Mon, 19 Nov 2018 17:06:50 -0800 (PST) X-Google-Smtp-Source: AJdET5e597poJdyvealGrmp0wV6A22izJMfAPfAiiuWwZORUc8w1Qr95HMjaU31Ue7A6yevHV4s7 X-Received: by 2002:a63:4d:: with SMTP id 74mr22755840pga.248.1542676010127; Mon, 19 Nov 2018 17:06:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542676010; cv=none; d=google.com; s=arc-20160816; b=ISUh+3Yka1Sm1e6iasFmVukp79aQ79Yn1BtaNRh9S+XY21vG9T9ZYy/+6dIVNJWyQc K3RyFNhfyNQh3qZuUYlyYRrZLSof9Js9/1O3ErR2f4va3VtdBphJ+Eap47Ls9cnyuRuu aXYEfXxyXrGtxEenEVPsn/ZJivFGyz2m7/Tn4DktUV7vCY9TsCDlpdkdTt/9MFMOYRTY pwLDhJ8qay+2aZv5JsIeXie514Pl1XHhRASPBc+rFA03urlAdRA/mPLAT7t8PqwyfmWN pXZZifJvzj/6zo3BRzVWW+4yF0flr8BIHvAGCK5kzx77OB+fg7QuZCE/dLflnBKzh07n Xozw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=KJmwS6MbYmJ1WbmfGLl6TuhqELJgJCDBAtGlg+95JGo=; b=KWb5Oiht1kCsMVC5UvC+H42rQRX5ncislLY4RqfT3z08gt8G5eP0TsQlI70aWc5Ggm UBqn/67U+RxRfU6IPNlRFQBwjgx1TyrdryaKw6FRs1/58nfENkC08OzxYrl5uF8JSWwy miIHKoT+Tfmums8OMJ8ccflmSd8x1iHYlrOUNn7oHcHruwTUNhwxfWobpoqD31uoGB5N nGOGS2VasOggM840n353mdn5qL9lIIhzyF9eBGg8h+UpsUL+0HBztvFLkkqhxdles6M5 5odeTW3lsPTouBBHBygQx9utP3D6mp1PcE6xM6VgAh5yCJ65LWuFAQbXc9o+CLIUcQdQ +y3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=nXgMWnSZ; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1-v6si44296348plj.53.2018.11.19.17.06.49; Mon, 19 Nov 2018 17:06:50 -0800 (PST) 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; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=nXgMWnSZ; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732296AbeKTLdM (ORCPT + 32 others); Tue, 20 Nov 2018 06:33:12 -0500 Received: from conuserg-11.nifty.com ([210.131.2.78]:34012 "EHLO conuserg-11.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726146AbeKTLdM (ORCPT ); Tue, 20 Nov 2018 06:33:12 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-11.nifty.com with ESMTP id wAK15ZEf029284; Tue, 20 Nov 2018 10:05:42 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com wAK15ZEf029284 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1542675942; bh=KJmwS6MbYmJ1WbmfGLl6TuhqELJgJCDBAtGlg+95JGo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nXgMWnSZXCm7DOHBeK1+o4teEQZLXLHIZ6tS8ULeZzehT4aj0ZUo5eZNiISx//iBS RGRTsi5emiE2Z7VA34Sc+obY8UFQcL3F1Wn/Rb4UJseZCai4Fw05g/8/Ge9fJMv8Em xD05gxVIpc8I8ZBkzfZJ/hEfsBpQbn9PuSAOyDu2nzNohUH5vKH9sSuerjOVlROQHa adGokQ4XhBZ4hEzZv1fk7ewlJAQUO1MmT+Z/FKTUIWenTguVIMwh/H0veSEp6xHO0q tPat9sKtnH42Lyg/8vK/Usxb78mmRpp44zJPvbYWvrCr9rccgM72kPCQdgDCgHo5Ga slYmvTs4Wn7hw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Sam Ravnborg , Nicolas Pitre , Rasmus Villemoes , Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH v2 8/9] kbuild: refactor if_changed and if_changed_dep Date: Tue, 20 Nov 2018 10:05:29 +0900 Message-Id: <1542675930-21114-9-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1542675930-21114-1-git-send-email-yamada.masahiro@socionext.com> References: <1542675930-21114-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org '@set -e; $(echo-cmd) $(cmd_$(1)' can be replaced with '$(cmd)'. Signed-off-by: Masahiro Yamada --- Changes in v2: None scripts/Kbuild.include | 9 +++------ scripts/Makefile.build | 4 ++-- 2 files changed, 5 insertions(+), 8 deletions(-) -- 2.7.4 diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 79c4875..33aacca 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -251,17 +251,14 @@ any-prereq = $(filter-out $(PHONY),$?) $(filter-out $(PHONY) $(wildcard $^),$^) # Execute command if command has changed or prerequisite(s) are updated. if_changed = $(if $(strip $(any-prereq) $(arg-check)), \ - @set -e; \ - $(echo-cmd) $(cmd_$(1)); \ + $(cmd); \ printf '%s\n' 'cmd_$@ := $(make-cmd)' > $(dot-target).cmd, @:) # Execute the command and also postprocess generated .d dependencies file. -if_changed_dep = $(if $(strip $(any-prereq) $(arg-check) ), \ - @set -e; \ - $(cmd_and_fixdep), @:) +if_changed_dep = $(if $(strip $(any-prereq) $(arg-check)), $(cmd_and_fixdep), @:) cmd_and_fixdep = \ - $(echo-cmd) $(cmd_$(1)); \ + $(cmd); \ scripts/basic/fixdep $(depfile) $@ '$(make-cmd)' > $(dot-target).cmd;\ rm -f $(depfile) diff --git a/scripts/Makefile.build b/scripts/Makefile.build index ffd2fe4..3bad2aa 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -261,7 +261,7 @@ endif define rule_cc_o_c $(call cmd,checksrc) - @$(call cmd_and_fixdep,cc_o_c) + $(call cmd_and_fixdep,cc_o_c) $(call cmd,gen_ksymdeps) $(call cmd,checkdoc) $(call cmd,objtool) @@ -270,7 +270,7 @@ define rule_cc_o_c endef define rule_as_o_S - @$(call cmd_and_fixdep,as_o_S) + $(call cmd_and_fixdep,as_o_S) $(call cmd,gen_ksymdeps) $(call cmd,objtool) $(call cmd,modversions_S) From patchwork Tue Nov 20 01:05:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 151531 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3380526ljp; Mon, 19 Nov 2018 17:06:58 -0800 (PST) X-Google-Smtp-Source: AJdET5dbVzNDgSu3GNn9rcA0RUJ0uxa4Z+NQ+I9uHz6TuoyS43kO5dYoY9eMjkEZn15ZK+qn1vEY X-Received: by 2002:a17:902:2aaa:: with SMTP id j39mr16764782plb.335.1542676018467; Mon, 19 Nov 2018 17:06:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542676018; cv=none; d=google.com; s=arc-20160816; b=il/nXZgc+Ke51iVA1LVMxTPLHWrb1toyU/gjuvGjG2c5U5NSEWnAuCd7NzMg2xVqDU jbZM0gtYnDdkjg4B/DhHZKW1OuT7LzcrRTt0uEWg4eWJYDEhiDpRJEOSW/YkN2etxaYc gjKSM5MyCRjnoEAdk+8fCD2q3FBP6VViMqsdnIs0tJ7WAzVUSLLWjoPmKKcj5rbAOdY5 Wd/hHB60UpULbU8qt0Y8k0X27HLes7Z96yeAVHX4Ryp6NV2peoGRvKu6RNWF8JfacS45 jwWid7wU0zGGRDQXQsh97k6UVO6/lIK2WzAPK24a4NVzSuB4L0LHS22kq4+yqY6f1BeI zdiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=Gseq30r3u/E8mjPjZAPFpPP9wW2F4by4Djgv+EJRb08=; b=V++81mBkPNNqHxyaQUwt07WAPaSLGOs7gMML+R01uZ9XvRoTXAuvS87TpyssjvlhH5 2Cj3gwVZmssXOyfyUUJVpGVEeWEDO8DTG7XZGUUpU5D21YzTw/G3BEz8HzhBlBKdF1FO WXdCF4nkyjvGYFjyYzYleuCejau5gTAEoIuptWNoB+Ms0342Q8h9RtNNvbtG+uqJqFSM S27cy5MCnf8ZCI8pT9e5b9jmd1yJbGxxZ7B7p7eXBRJMy1kSXSODb6M4ZEytsyyPXpVf 6uI8IIIC6rHbYzJk327+SWJ33rLgYyS1jq58OmFTJQ+qjBon459Sbd6G/QiSPn0WnWoy BY0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=zv6UQOYE; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o3-v6si40339319plk.360.2018.11.19.17.06.58; Mon, 19 Nov 2018 17:06:58 -0800 (PST) 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; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=zv6UQOYE; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732566AbeKTLdV (ORCPT + 32 others); Tue, 20 Nov 2018 06:33:21 -0500 Received: from conuserg-11.nifty.com ([210.131.2.78]:34062 "EHLO conuserg-11.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732133AbeKTLdO (ORCPT ); Tue, 20 Nov 2018 06:33:14 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-11.nifty.com with ESMTP id wAK15ZEg029284; Tue, 20 Nov 2018 10:05:43 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com wAK15ZEg029284 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1542675943; bh=Gseq30r3u/E8mjPjZAPFpPP9wW2F4by4Djgv+EJRb08=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zv6UQOYEnXX5OYGVqkmb+ymgIFfJUyds4IPOeVtyYP2Q/kZTtj7YDCRf76tdno4B5 p9DODhSNQzzrInKxZZLNSUhxLIg21NS8sXNuPJhLt+zj0XY3QKqSD3AX3VCF4Nu5Vl YPx/uXBYmRbsr+WSciMuA1espMi99uPwrQv0o/4TekrGKv/u2Jbfvrf2ZQWp0KSeFi 0DX6OjGPAFOPhAZfZxjMp8LcXr2id92svbBPkfDGiJg3bVnDosxO5Qh2Aq5Ix0cQkG CSA8Xq69KQeDmPrUaDZ0RWV5xEUPo/AITm7g0IiR+HBrzZiITLhrgQ9gUIErEj1o4a RzZZDv1ifuRdw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Sam Ravnborg , Nicolas Pitre , Rasmus Villemoes , Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH v2 9/9] kbuild: remove redundant 'set -e' from cmd_* defines Date: Tue, 20 Nov 2018 10:05:30 +0900 Message-Id: <1542675930-21114-10-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1542675930-21114-1-git-send-email-yamada.masahiro@socionext.com> References: <1542675930-21114-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org These three cmd_* are invoked in the $(call cmd,*) form. Now that 'set -e' moved to the 'cmd' macro, they do not need to explicitly give 'set -e'. Signed-off-by: Masahiro Yamada --- Changes in v2: None scripts/Makefile.build | 2 -- scripts/package/Makefile | 1 - 2 files changed, 3 deletions(-) -- 2.7.4 diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 3bad2aa..d589d57 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -134,7 +134,6 @@ cmd_gensymtypes_c = \ quiet_cmd_cc_symtypes_c = SYM $(quiet_modtag) $@ cmd_cc_symtypes_c = \ - set -e; \ $(call cmd_gensymtypes_c,true,$@) >/dev/null; \ test -s $@ || rm -f $@ @@ -337,7 +336,6 @@ cmd_gensymtypes_S = \ quiet_cmd_cc_symtypes_S = SYM $(quiet_modtag) $@ cmd_cc_symtypes_S = \ - set -e; \ $(call cmd_gensymtypes_S,true,$@) >/dev/null; \ test -s $@ || rm -f $@ diff --git a/scripts/package/Makefile b/scripts/package/Makefile index 73503eb..453fece 100644 --- a/scripts/package/Makefile +++ b/scripts/package/Makefile @@ -33,7 +33,6 @@ MKSPEC := $(srctree)/scripts/package/mkspec quiet_cmd_src_tar = TAR $(2).tar.gz cmd_src_tar = \ -set -e; \ if test "$(objtree)" != "$(srctree)"; then \ echo >&2; \ echo >&2 " ERROR:"; \