* [PATCH] kbuild: Inform user to pass ARCH= for make mrproper
@ 2019-07-09 13:26 Geert Uytterhoeven
2019-07-09 13:34 ` Masahiro Yamada
2019-07-09 16:30 ` Christoph Hellwig
0 siblings, 2 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2019-07-09 13:26 UTC (permalink / raw)
To: Masahiro Yamada, Michal Marek
Cc: linux-kbuild, linux-kernel, Geert Uytterhoeven
When cross-compiling an out-of-tree build with an unclean source tree
directory, the build fails with:
/path/to/kernel/source/tree is not clean, please run 'make mrproper'
in the '/path/to/kernel/source/tree' directory.
However, doing so does not fix the problem, as "make mrproper" now
requires passing the target architecture to the make command, else it
won't remove $(srctree)/arch/$(SRCARCH)/include/generated.
"git ls-files -o" doesn't give a clue, as it doesn't list (empty)
directories, only files.
Improve usability by including the ARCH= option in the error output.
Fixes: a788b2ed81abeb94 ("kbuild: check arch/$(SRCARCH)/include/generated before out-of-tree build")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 3e4868a6498b2224..704e193c16472be1 100644
--- a/Makefile
+++ b/Makefile
@@ -1101,7 +1101,7 @@ ifneq ($(srctree),.)
$(Q)if [ -f $(srctree)/.config -o \
-d $(srctree)/include/config -o \
-d $(srctree)/arch/$(SRCARCH)/include/generated ]; then \
- echo >&2 " $(srctree) is not clean, please run 'make mrproper'"; \
+ echo >&2 " $(srctree) is not clean, please run 'make ARCH=$(ARCH) mrproper'"; \
echo >&2 " in the '$(srctree)' directory.";\
/bin/false; \
fi;
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] kbuild: Inform user to pass ARCH= for make mrproper
2019-07-09 13:26 [PATCH] kbuild: Inform user to pass ARCH= for make mrproper Geert Uytterhoeven
@ 2019-07-09 13:34 ` Masahiro Yamada
2019-07-09 16:30 ` Christoph Hellwig
1 sibling, 0 replies; 4+ messages in thread
From: Masahiro Yamada @ 2019-07-09 13:34 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Michal Marek, Linux Kbuild mailing list, Linux Kernel Mailing List
On Tue, Jul 9, 2019 at 10:26 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>
> When cross-compiling an out-of-tree build with an unclean source tree
> directory, the build fails with:
>
> /path/to/kernel/source/tree is not clean, please run 'make mrproper'
> in the '/path/to/kernel/source/tree' directory.
>
> However, doing so does not fix the problem, as "make mrproper" now
> requires passing the target architecture to the make command, else it
> won't remove $(srctree)/arch/$(SRCARCH)/include/generated.
> "git ls-files -o" doesn't give a clue, as it doesn't list (empty)
> directories, only files.
>
> Improve usability by including the ARCH= option in the error output.
>
> Fixes: a788b2ed81abeb94 ("kbuild: check arch/$(SRCARCH)/include/generated before out-of-tree build")
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> ---
Applied to linux-kbuild. Thanks.
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] kbuild: Inform user to pass ARCH= for make mrproper
2019-07-09 13:26 [PATCH] kbuild: Inform user to pass ARCH= for make mrproper Geert Uytterhoeven
2019-07-09 13:34 ` Masahiro Yamada
@ 2019-07-09 16:30 ` Christoph Hellwig
2019-07-11 4:14 ` Masahiro Yamada
1 sibling, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2019-07-09 16:30 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Masahiro Yamada, Michal Marek, linux-kbuild, linux-kernel
Is there any chance we could save ARCH in .config? That would make
cross compile builds so much easier.. Same for CROSS_COMPILE.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] kbuild: Inform user to pass ARCH= for make mrproper
2019-07-09 16:30 ` Christoph Hellwig
@ 2019-07-11 4:14 ` Masahiro Yamada
0 siblings, 0 replies; 4+ messages in thread
From: Masahiro Yamada @ 2019-07-11 4:14 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Geert Uytterhoeven, Michal Marek, Linux Kbuild mailing list,
Linux Kernel Mailing List
On Wed, Jul 10, 2019 at 1:30 AM Christoph Hellwig <hch@infradead.org> wrote:
>
> Is there any chance we could save ARCH in .config? That would make
> cross compile builds so much easier.. Same for CROSS_COMPILE.
Then, I have no idea how "make clean", "make help", etc. should work.
If a user has configured the kernel, do they work for CONFIG_ARCH
stored in the .config file or still for the host-arch?
If not yet, do they fall-back to host-arch?
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-07-11 4:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-09 13:26 [PATCH] kbuild: Inform user to pass ARCH= for make mrproper Geert Uytterhoeven
2019-07-09 13:34 ` Masahiro Yamada
2019-07-09 16:30 ` Christoph Hellwig
2019-07-11 4:14 ` Masahiro Yamada
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).