linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] um: ensure `make ARCH=um mrproper` removes arch/$(SUBARCH)/include/generated/
@ 2020-04-22  0:48 Vitor Massaru Iha
  2020-04-22 15:42 ` Masahiro Yamada
  0 siblings, 1 reply; 2+ messages in thread
From: Vitor Massaru Iha @ 2020-04-22  0:48 UTC (permalink / raw)
  To: kunit-dev
  Cc: masahiroy, linux-kselftest, linux-kernel, brendanhiggins, skhan,
	linux-kernel-mentees

In this workflow:

$ make ARCH=um defconfig && make ARCH=um -j8
  [snip]
$ make ARCH=um mrproper
  [snip]
$ make ARCH=um defconfig O=./build_um && make ARCH=um -j8 O=./build_um
  [snip]
  CC      scripts/mod/empty.o
In file included from ../include/linux/types.h:6,
                 from ../include/linux/mod_devicetable.h:12,
                 from ../scripts/mod/devicetable-offsets.c:3:
../include/uapi/linux/types.h:5:10: fatal error: asm/types.h: No such file or directory
    5 | #include <asm/types.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
make[2]: *** [../scripts/Makefile.build:100: scripts/mod/devicetable-offsets.s] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/home/iha/sdb/opensource/lkmp/linux-kselftest.git/Makefile:1140: prepare0] Error 2
make[1]: Leaving directory '/home/iha/sdb/opensource/lkmp/linux-kselftest.git/build_um'
make: *** [Makefile:180: sub-make] Error 2

The cause of the error was because arch/$(SUBARCH)/include/generated files
weren't properly cleaned by `make ARCH=um mrproper`.

Fixes: a788b2ed81ab ("kbuild: check arch/$(SRCARCH)/include/generated
before out-of-tree build").
Reported-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Vitor Massaru Iha <vitor@massaru.org>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Tested-by: Brendan Higgins <brendanhiggins@google.com>
Suggested-by: Masahiro Yamada <masahiroy@kernel.org>
Link: https://groups.google.com/forum/#!msg/kunit-dev/QmA27YEgEgI/hvS1kiz2CwAJ
---
v2:
 * Explains what this PATCH does and the importance as suggested
   by Brendan Higgins.
v3:
 * This problem only affects ARCH=um builds then arch/um/Makefile has
   been changed as suggested by Masahiro Yamada;
 * And with that the description has also been changed, and also to explain
   missing points and correct the tags as suggested by Masahiro Yamada:
   - Fix missing command `make ARCH=um mrproper`;
   - Add build error message; 
   - Add "Fixes" tag instead of "This bug was ...";
   - Add "Link" tag instead of "Related bug ...";
   - Add Reported-by and Suggested-by;
---
 arch/um/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/um/Makefile b/arch/um/Makefile
index d2daa206872d..275f5ffdf6f0 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -140,6 +140,7 @@ export CFLAGS_vmlinux := $(LINK-y) $(LINK_WRAPS) $(LD_FLAGS_CMDLINE)
 # When cleaning we don't include .config, so we don't include
 # TT or skas makefiles and don't clean skas_ptregs.h.
 CLEAN_FILES += linux x.i gmon.out
+MRPROPER_DIRS += arch/$(SUBARCH)/include/generated
 
 archclean:
 	@find . \( -name '*.bb' -o -name '*.bbg' -o -name '*.da' \
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v3] um: ensure `make ARCH=um mrproper` removes arch/$(SUBARCH)/include/generated/
  2020-04-22  0:48 [PATCH v3] um: ensure `make ARCH=um mrproper` removes arch/$(SUBARCH)/include/generated/ Vitor Massaru Iha
@ 2020-04-22 15:42 ` Masahiro Yamada
  0 siblings, 0 replies; 2+ messages in thread
From: Masahiro Yamada @ 2020-04-22 15:42 UTC (permalink / raw)
  To: Vitor Massaru Iha
  Cc: kunit-dev, open list:KERNEL SELFTEST FRAMEWORK,
	Linux Kernel Mailing List, Brendan Higgins, Shuah Khan,
	linux-kernel-mentees

On Wed, Apr 22, 2020 at 9:48 AM Vitor Massaru Iha <vitor@massaru.org> wrote:
>
> In this workflow:
>
> $ make ARCH=um defconfig && make ARCH=um -j8
>   [snip]
> $ make ARCH=um mrproper
>   [snip]
> $ make ARCH=um defconfig O=./build_um && make ARCH=um -j8 O=./build_um
>   [snip]
>   CC      scripts/mod/empty.o
> In file included from ../include/linux/types.h:6,
>                  from ../include/linux/mod_devicetable.h:12,
>                  from ../scripts/mod/devicetable-offsets.c:3:
> ../include/uapi/linux/types.h:5:10: fatal error: asm/types.h: No such file or directory
>     5 | #include <asm/types.h>
>       |          ^~~~~~~~~~~~~
> compilation terminated.
> make[2]: *** [../scripts/Makefile.build:100: scripts/mod/devicetable-offsets.s] Error 1
> make[2]: *** Waiting for unfinished jobs....
> make[1]: *** [/home/iha/sdb/opensource/lkmp/linux-kselftest.git/Makefile:1140: prepare0] Error 2
> make[1]: Leaving directory '/home/iha/sdb/opensource/lkmp/linux-kselftest.git/build_um'
> make: *** [Makefile:180: sub-make] Error 2
>
> The cause of the error was because arch/$(SUBARCH)/include/generated files
> weren't properly cleaned by `make ARCH=um mrproper`.
>
> Fixes: a788b2ed81ab ("kbuild: check arch/$(SRCARCH)/include/generated
> before out-of-tree build").
> Reported-by: Theodore Ts'o <tytso@mit.edu>
> Signed-off-by: Vitor Massaru Iha <vitor@massaru.org>
> Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
> Tested-by: Brendan Higgins <brendanhiggins@google.com>
> Suggested-by: Masahiro Yamada <masahiroy@kernel.org>
> Link: https://groups.google.com/forum/#!msg/kunit-dev/QmA27YEgEgI/hvS1kiz2CwAJ


Applied to linux-kbuild/fixes.
Thanks.



> ---
> v2:
>  * Explains what this PATCH does and the importance as suggested
>    by Brendan Higgins.
> v3:
>  * This problem only affects ARCH=um builds then arch/um/Makefile has
>    been changed as suggested by Masahiro Yamada;
>  * And with that the description has also been changed, and also to explain
>    missing points and correct the tags as suggested by Masahiro Yamada:
>    - Fix missing command `make ARCH=um mrproper`;
>    - Add build error message;
>    - Add "Fixes" tag instead of "This bug was ...";
>    - Add "Link" tag instead of "Related bug ...";
>    - Add Reported-by and Suggested-by;
> ---
>  arch/um/Makefile | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/um/Makefile b/arch/um/Makefile
> index d2daa206872d..275f5ffdf6f0 100644
> --- a/arch/um/Makefile
> +++ b/arch/um/Makefile
> @@ -140,6 +140,7 @@ export CFLAGS_vmlinux := $(LINK-y) $(LINK_WRAPS) $(LD_FLAGS_CMDLINE)
>  # When cleaning we don't include .config, so we don't include
>  # TT or skas makefiles and don't clean skas_ptregs.h.
>  CLEAN_FILES += linux x.i gmon.out
> +MRPROPER_DIRS += arch/$(SUBARCH)/include/generated
>
>  archclean:
>         @find . \( -name '*.bb' -o -name '*.bbg' -o -name '*.da' \
> --
> 2.25.1
>


-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-04-22 15:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-22  0:48 [PATCH v3] um: ensure `make ARCH=um mrproper` removes arch/$(SUBARCH)/include/generated/ Vitor Massaru Iha
2020-04-22 15:42 ` 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).