Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4411341ybb; Tue, 14 Apr 2020 06:50:40 -0700 (PDT) X-Google-Smtp-Source: APiQypKtaovMomrDvsYnJEuNNnAO+qn0eFU+ukMl81gLab3bSmHEbI+uEoEvDkTZySsKBhuYtcor X-Received: by 2002:a17:906:38c:: with SMTP id b12mr182393eja.332.1586872239849; Tue, 14 Apr 2020 06:50:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586872239; cv=none; d=google.com; s=arc-20160816; b=fAED+e2La98sd4vMjSScD/Gxm0vkQ/SK+9MeL8XyyBLRD2RVDuz0jpVl4VYQV1hJJE EZwSS+0MbH4eTVSQK/yuG0ZlPalRCxBySyVjL2/j7whRw/FeFaZH6IcCSmm0ESjqzVdY F2y1iKylADEb9R8V+I/+yWIaA0F0n839GBNpziBPc+D6VV9TUrbBEnnwn5ZoZi7VchPy DKFtpBbepvUKfw/dRYXplVhSxEcRr5VqIxQfFEFCk0YeqaEh+l6x5Rf8YqF2bKeEl5t0 fq9d1uawhKo5IHUQrilGIbHVdKwTgGXwno9ZzLsxkYQz43A6+ljjMUgQkT0j7PSXgXQi heSQ== 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:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=ucg4luoxBe5p5/9cUQj1RfBcJ3voR9LqlqIX5ioc/8o=; b=HgFmm3yuJ7ibYRlsaODbltFn52tW3Cjq/sbf2RrHuFST2XnM2UVdsY3UkqmRdHer4s nsL503otjuoIbrhYwzwl3e5W7bBHNFoOn+/Zn6CvolRSZ33JXUyIOYBuckJvUvutSREl o8r1usEgxOMVBDEduciTNC8PAU+AbMhm0V8+VKL08R/POb0i67gqGOpVy6K++xJmn8nv xdu/X58ZjwBF8WF+Y+YM9ao0q9SZaReZn0kXvgp9N2T7t5kUedCuZEWoLUIIm0Nq8VL0 bSdzmy6fPZiHkIV/TLwIr33mwqDsxhKsCsMM+Zk125wDSDerdW2zq4Dc/UN4VOVaI4hn VVLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@massaru-org.20150623.gappssmtp.com header.s=20150623 header.b=stA0CpFP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a6si8592314edr.242.2020.04.14.06.50.16; Tue, 14 Apr 2020 06:50:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@massaru-org.20150623.gappssmtp.com header.s=20150623 header.b=stA0CpFP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390736AbgDNBVl (ORCPT + 99 others); Mon, 13 Apr 2020 21:21:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728066AbgDNBVl (ORCPT ); Mon, 13 Apr 2020 21:21:41 -0400 Received: from mail-qt1-x841.google.com (mail-qt1-x841.google.com [IPv6:2607:f8b0:4864:20::841]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E961FC0A3BDC for ; Mon, 13 Apr 2020 18:21:39 -0700 (PDT) Received: by mail-qt1-x841.google.com with SMTP id z90so8868209qtd.10 for ; Mon, 13 Apr 2020 18:21:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=massaru-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ucg4luoxBe5p5/9cUQj1RfBcJ3voR9LqlqIX5ioc/8o=; b=stA0CpFPzED8+cDmFDlFOPUc9NOX+a+UVO1kgT140a7AuOQYxHz7mttPD82mqFuEwq W6S8EKZqQIcIz7gfWoLTX5HQL7saCVNRntogBQD+C/1AVTlxYLmT0ZBLzeinkr5a6qCV sUhjkUmFi/hCVurWWSuId2T8rZesUg9lce+xk21coIwuFzF7FiH6svj7C45L2kmkfSQM dw8Eo1+or04uZukAobNvXInrGC8xprR+ScPVIwaI6PkvhHo1j62yxQLJ6rt6nVmBqeFM R8o0PM0fdOiOw6dgRa9brPEw0U5ZK9zu1C4otfg/4MSSerAj1zvvRc6XvPjVhV6l/V1C HFjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ucg4luoxBe5p5/9cUQj1RfBcJ3voR9LqlqIX5ioc/8o=; b=UzLMSKpJkEnT+K5urUnmPXoB5IJlbq2bGH0jPkuTBmj3BBQpBvbVBQqcx4/iPlsSGW uUoBbiw9US555zHAk9MS0+9A5u0E5Yju52pMOe7cmXLnxCQJJyOMZrM17yHHUNh7Dtps 49H+a3i92Pz6HboTzRvdQmXm2WAzw1TetrreyVlg9OeVmLI3bQvU148KQB/jZ8/B5i57 /0oP4yKeXFQzCNIkhIba61Lo+s7cU1pAAA3WVLW0t55r1j8vSOp5YQOP2FUPKpIpIvjt 6fOxH5Blx1DukIYdCQiRd08TUrDhNFs5bIqkWbSvMNQuV1dRQ/4Ll5CA5Xg6fu0JaJjX xp6g== X-Gm-Message-State: AGi0PuY0ZUqs6bMkch3ZpHyUW/R5ex2uJibO79EjHntRL5bS81SotAVt JNuZDSyyFuQpA29G1jEJOdObWA== X-Received: by 2002:ac8:370c:: with SMTP id o12mr13960452qtb.380.1586827298833; Mon, 13 Apr 2020 18:21:38 -0700 (PDT) Received: from bbking.lan ([2804:14c:4a5:36c::cd2]) by smtp.gmail.com with ESMTPSA id b13sm6380638qka.20.2020.04.13.18.21.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Apr 2020 18:21:38 -0700 (PDT) From: Vitor Massaru Iha To: linux-kbuild@vger.kernel.org Cc: masahiroy@kernel.org, michal.lkml@markovi.net, linux-kernel@vger.kernel.org, brendanhiggins@google.com, skhan@linuxfoundation.org Subject: [PATCH v2] kbuild: ensure mrproper removes arch/$(SUBARCH)/include/generated/ Date: Mon, 13 Apr 2020 22:21:32 -0300 Message-Id: <20200414012132.32721-1-vitor@massaru.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In the following use case, when compiling the kernel for the UML architecture, for example: * `make ARCH=um defconfig && make ARCH=um -j8`, SUBARCH files are generated, however when we run the command: * `mrproper ARCH=um` the files `arch/$(SUBARCH)/include/generated/ aren't cleaned up. This generates compilation errors by running the following command: * `make ARCH=um defconfig O=./build_um && make ARCH=um -j8 O=./build_um` This PATCH fix that problem. This makes it possible to compile on different architectures that use the SUBARCH variable, in different build directories and root directory of the linux directory. This is important because we can compile without the object files being overwritten. This reduces the re-compilation time in this use case. Besides that, in the workflow of developing unit tests, using kunit, and compiling in different architectures to develop or test a PATCH, this use case applies. * This bug was introduced in this commit a788b2ed81abe * Related bug: https://bugzilla.kernel.org/show_bug.cgi?id=205219 Signed-off-by: Vitor Massaru Iha Reviewed-by: Brendan Higgins Tested-by: Brendan Higgins --- v2: * Explains what this PATCH does and the importance as suggested by Brendan Higgins. --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 70def4907036..e1a79796032e 100644 --- a/Makefile +++ b/Makefile @@ -532,7 +532,8 @@ outputmakefile: ifdef building_out_of_srctree $(Q)if [ -f $(srctree)/.config -o \ -d $(srctree)/include/config -o \ - -d $(srctree)/arch/$(SRCARCH)/include/generated ]; then \ + -d $(srctree)/arch/$(SRCARCH)/include/generated -o \ + -d $(srctree)/arch/$(SUBARCH)/include/generated ]; then \ echo >&2 "***"; \ echo >&2 "*** The source tree is not clean, please run 'make$(if $(findstring command line, $(origin ARCH)), ARCH=$(ARCH)) mrproper'"; \ echo >&2 "*** in $(abs_srctree)";\ @@ -1388,6 +1389,7 @@ CLEAN_FILES += modules.builtin modules.builtin.modinfo modules.nsdeps # Directories & files removed with 'make mrproper' MRPROPER_DIRS += include/config include/generated \ arch/$(SRCARCH)/include/generated .tmp_objdiff \ + arch/$(SUBARCH)/include/generated \ debian/ snap/ tar-install/ MRPROPER_FILES += .config .config.old .version \ Module.symvers \ -- 2.25.1