From patchwork Tue Nov 20 17:13: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: 151612 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp859354ljp; Tue, 20 Nov 2018 09:13:43 -0800 (PST) X-Google-Smtp-Source: AFSGD/WePIcZrgQqOzuuc99yiJB4SVud3gSZeGYGaaK7jSHdFmaTU98+fh5ltFrHvP6Xqh9gvf2W X-Received: by 2002:a63:6782:: with SMTP id b124mr2677479pgc.151.1542734023554; Tue, 20 Nov 2018 09:13:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542734023; cv=none; d=google.com; s=arc-20160816; b=jeo+mWhSR8lz60ic0WambQTvFN+CDKyIBufY7CkHrBLCoSsf933/RPX9ZYpGcxJ/vg PjmYJrbsOZ1X7ZS8JUQTICYuG591t/OdR2Ckwnm5caCBiKLHPfCbPRe308M8nHUBzZpC EkLAFQD+RAngv7xdmDulEcOjfWE/lpqh4NMIiv3UJ2pzc5WjWhMwJNLy4wbqJZPVIk+m xuzgp2FWklVuD5kg4hDFiqLIqOhNALAbONkHHJgGWyjr7g1k07RBsFuPTwB2lafrQA1w jBdsbeaZwO6jUZiMLs/dTYUm0pZn2mRN9eA7+lMfoylcFeRSObKixuxFIOdns63cUzgb +5/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=HiyW/Q0RXc4dHdrRRySoaw5wSTNJQhz5gwAPhJMcFrQ=; b=rU2YOPteNe38C8xPzUkSFeNVkpgopmZDJFBJl7+zAuyNU/eoyrYr6pG3VqCxuv96+X biqsALt/0cTTuBwiiGuDk2B2Aq9wr25h4roLay7g+7LZMUql2JUXOnXdBuJUO7GyjKYJ gEsaoyucH5tERbVdrj85LbiMr6ZA9B7S+BOIVBD+A55E4leqW3OrJtoLU18vbfZHFL5j ULAqQuGK8jEx30u/iX3sK/WV1x/g/5H6YPYSN36Z/zOcDA+dlpDOvC/MwBDICxD0BpzG RkmgcqBaPteY5t565RiEMpQ3puaVs1ow31GBF1KfYQPfWPHBROomM5wfEVJm1jM7XGqt 3h+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=MC10FD+j; 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 u4si42111628pga.91.2018.11.20.09.13.42; Tue, 20 Nov 2018 09:13:43 -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=MC10FD+j; 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 S1730102AbeKUDnw (ORCPT + 32 others); Tue, 20 Nov 2018 22:43:52 -0500 Received: from conuserg-11.nifty.com ([210.131.2.78]:35503 "EHLO conuserg-11.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726426AbeKUDnw (ORCPT ); Tue, 20 Nov 2018 22:43:52 -0500 Received: from grover.tkatk1.zaq.ne.jp (zaqdadce369.zaq.ne.jp [218.220.227.105]) (authenticated) by conuserg-11.nifty.com with ESMTP id wAKHDTcN010172; Wed, 21 Nov 2018 02:13:30 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com wAKHDTcN010172 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1542734010; bh=HiyW/Q0RXc4dHdrRRySoaw5wSTNJQhz5gwAPhJMcFrQ=; h=From:To:Cc:Subject:Date:From; b=MC10FD+jy6SePztbztH2z8Z4fpujWIY5oQLAnSNPchOvkH3duDNsbEEQulC6EZIpO H40lkbgkGILdELA5jf63s8G2mzOfQoxq9m1OkZXfB3qEYqXViCtcDcaxL8fuMzTg0S Tt2meeZVcKg9WENu/BX8XNYAvM9frHo4MISGCiMitDVEadEI6G6Bp+FNyYofzXFfqU c/vi+2mbxHCqCC40T78NKF4MN9nkwJivy6lVqAOWjZyf2vgiTBXVy73becNQD+LG6x EH3rnSYYFzb5Wk+rqcTv81yjMCFN6OSSF4cqJhOmiu9WOPz/jNXUu3xPyf2mjKlUNO e1bdyis2YQ+SA== X-Nifty-SrcIP: [218.220.227.105] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH] kbuild: move modpost out of 'scripts' target Date: Wed, 21 Nov 2018 02:13:24 +0900 Message-Id: <1542734004-2673-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I am eagar to build under the scripts/ directory only with $(HOSTCC), but scripts/mod/ highly depends on the $(CC) and target arch headers. That it why the 'scripts' target must depend on 'asm-generic', 'gcc-plugins', and $(autoksyms_h). Move it to the 'prepare0' stage. I know this is a cheesy workaround, but better than the current situation. Signed-off-by: Masahiro Yamada --- Makefile | 3 ++- scripts/Makefile | 3 +-- scripts/mod/Makefile | 2 -- 3 files changed, 3 insertions(+), 5 deletions(-) -- 2.7.4 diff --git a/Makefile b/Makefile index b78cc97..21a7729 100644 --- a/Makefile +++ b/Makefile @@ -1073,7 +1073,7 @@ include/config/kernel.release: $(srctree)/Makefile FORCE # Carefully list dependencies so we do not try to build scripts twice # in parallel PHONY += scripts -scripts: scripts_basic scripts_dtc asm-generic gcc-plugins $(autoksyms_h) +scripts: scripts_basic scripts_dtc $(Q)$(MAKE) $(build)=$(@) # Things we need to do before we recursively start building the kernel @@ -1111,6 +1111,7 @@ macroprepare: prepare1 archmacros archprepare: archheaders archscripts macroprepare scripts_basic prepare0: archprepare gcc-plugins + $(Q)$(MAKE) $(build)=scripts/mod $(Q)$(MAKE) $(build)=. # All the preparing.. diff --git a/scripts/Makefile b/scripts/Makefile index ece52ff..b48259d 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -37,9 +37,8 @@ build_unifdef: $(obj)/unifdef @: subdir-$(CONFIG_MODVERSIONS) += genksyms -subdir-y += mod subdir-$(CONFIG_SECURITY_SELINUX) += selinux subdir-$(CONFIG_GDB_SCRIPTS) += gdb # Let clean descend into subdirs -subdir- += basic dtc kconfig package gcc-plugins +subdir- += basic dtc kconfig mod package gcc-plugins diff --git a/scripts/mod/Makefile b/scripts/mod/Makefile index a5b4af4..42c5d50 100644 --- a/scripts/mod/Makefile +++ b/scripts/mod/Makefile @@ -4,8 +4,6 @@ OBJECT_FILES_NON_STANDARD := y hostprogs-y := modpost mk_elfconfig always := $(hostprogs-y) empty.o -CFLAGS_REMOVE_empty.o := $(ASM_MACRO_FLAGS) - modpost-objs := modpost.o file2alias.o sumversion.o devicetable-offsets-file := devicetable-offsets.h