mbox series

[v2,0/8] kbuild: various cleanups

Message ID 20220906061313.1445810-1-masahiroy@kernel.org (mailing list archive)
Headers show
Series kbuild: various cleanups | expand

Message

Masahiro Yamada Sept. 6, 2022, 6:13 a.m. UTC
- Refactor single target build to make it work more correctly
 - Link vmlinux and modules in parallel
 - Remove head-y syntax


Masahiro Yamada (8):
  kbuild: fix and refactor single target build
  kbuild: rename modules.order in sub-directories to .modules.order
  kbuild: move core-y and drivers-y to ./Kbuild
  kbuild: move .vmlinux.objs rule to Makefile.modpost
  kbuild: move vmlinux.o rule to the top Makefile
  kbuild: unify two modpost invocations
  kbuild: use obj-y instead extra-y for objects placed at the head
  kbuild: remove head-y syntax

 Documentation/kbuild/makefiles.rst          |  27 ++---
 Kbuild                                      |  23 ++++
 Makefile                                    | 113 ++++++++++++--------
 arch/alpha/Makefile                         |   2 -
 arch/alpha/kernel/Makefile                  |   4 +-
 arch/arc/Makefile                           |   2 -
 arch/arc/kernel/Makefile                    |   4 +-
 arch/arm/Makefile                           |   3 -
 arch/arm/kernel/Makefile                    |   4 +-
 arch/arm64/Makefile                         |   3 -
 arch/arm64/kernel/Makefile                  |   4 +-
 arch/csky/Makefile                          |   2 -
 arch/csky/kernel/Makefile                   |   4 +-
 arch/hexagon/Makefile                       |   2 -
 arch/hexagon/kernel/Makefile                |   3 +-
 arch/ia64/Makefile                          |   1 -
 arch/ia64/kernel/Makefile                   |   4 +-
 arch/loongarch/Makefile                     |   2 -
 arch/loongarch/kernel/Makefile              |   4 +-
 arch/m68k/68000/Makefile                    |   2 +-
 arch/m68k/Makefile                          |   9 --
 arch/m68k/coldfire/Makefile                 |   2 +-
 arch/m68k/kernel/Makefile                   |  21 ++--
 arch/microblaze/Makefile                    |   1 -
 arch/microblaze/kernel/Makefile             |   4 +-
 arch/mips/Makefile                          |   2 -
 arch/mips/kernel/Makefile                   |   4 +-
 arch/nios2/Makefile                         |   1 -
 arch/nios2/kernel/Makefile                  |   2 +-
 arch/openrisc/Makefile                      |   2 -
 arch/openrisc/kernel/Makefile               |   4 +-
 arch/parisc/Makefile                        |   2 -
 arch/parisc/kernel/Makefile                 |   4 +-
 arch/powerpc/Makefile                       |  12 ---
 arch/powerpc/kernel/Makefile                |  22 ++--
 arch/riscv/Makefile                         |   2 -
 arch/riscv/kernel/Makefile                  |   2 +-
 arch/s390/Makefile                          |   2 -
 arch/s390/kernel/Makefile                   |   4 +-
 arch/sh/Makefile                            |   2 -
 arch/sh/kernel/Makefile                     |   4 +-
 arch/sparc/Makefile                         |   2 -
 arch/sparc/kernel/Makefile                  |   3 +-
 arch/x86/Makefile                           |   5 -
 arch/x86/kernel/Makefile                    |  10 +-
 arch/xtensa/Makefile                        |   2 -
 arch/xtensa/kernel/Makefile                 |   4 +-
 scripts/Makefile.build                      |  70 +++++-------
 scripts/Makefile.lib                        |  10 +-
 scripts/Makefile.modfinal                   |   2 +-
 scripts/Makefile.modpost                    | 112 +++++++++----------
 scripts/Makefile.vmlinux_o                  |   6 +-
 scripts/clang-tools/gen_compile_commands.py |  19 +---
 scripts/head-object-list.txt                |  53 +++++++++
 scripts/link-vmlinux.sh                     |  34 +-----
 55 files changed, 304 insertions(+), 349 deletions(-)
 create mode 100644 scripts/head-object-list.txt

Comments

Nicolas Schier Sept. 7, 2022, 8:15 p.m. UTC | #1
On Tue,  6 Sep 2022 15:13:05 +0900 Masahiro Yamada wrote:
> 
>  - Refactor single target build to make it work more correctly
>  - Link vmlinux and modules in parallel
>  - Remove head-y syntax
> 
> 
> Masahiro Yamada (8):
>   kbuild: fix and refactor single target build
>   kbuild: rename modules.order in sub-directories to .modules.order
>   kbuild: move core-y and drivers-y to ./Kbuild
>   kbuild: move .vmlinux.objs rule to Makefile.modpost
>   kbuild: move vmlinux.o rule to the top Makefile
>   kbuild: unify two modpost invocations
>   kbuild: use obj-y instead extra-y for objects placed at the head
>   kbuild: remove head-y syntax

I'm not able to apply the patchset, neither on your current kbuild 
branch nor on for-next.  What am I missing here?  Could you give me a 
hint for a patchset base?

Thanks and kind regards,
Nicolas
Nicolas Schier Sept. 7, 2022, 8:18 p.m. UTC | #2
On Wed, 7 Sep 2022 22:15:57 +0200 Nicolas Schier wrote:
> On Tue,  6 Sep 2022 15:13:05 +0900 Masahiro Yamada wrote:
> > 
> >  - Refactor single target build to make it work more correctly
> >  - Link vmlinux and modules in parallel
> >  - Remove head-y syntax
> > 
> > 
> > Masahiro Yamada (8):
> >   kbuild: fix and refactor single target build
> >   kbuild: rename modules.order in sub-directories to .modules.order
> >   kbuild: move core-y and drivers-y to ./Kbuild
> >   kbuild: move .vmlinux.objs rule to Makefile.modpost
> >   kbuild: move vmlinux.o rule to the top Makefile
> >   kbuild: unify two modpost invocations
> >   kbuild: use obj-y instead extra-y for objects placed at the head
> >   kbuild: remove head-y syntax
> 
> I'm not able to apply the patchset, neither on your current kbuild 
> branch nor on for-next.  What am I missing here?  Could you give me a 
> hint for a patchset base?
> 
> Thanks and kind regards,
> Nicolas


ooops.  It _is_ already on kbuild, sorry for the noise.
Masahiro Yamada Sept. 8, 2022, 2 a.m. UTC | #3
On Thu, Sep 8, 2022 at 5:18 AM Nicolas Schier <nicolas@fjasle.eu> wrote:
>
> On Wed, 7 Sep 2022 22:15:57 +0200 Nicolas Schier wrote:
> > On Tue,  6 Sep 2022 15:13:05 +0900 Masahiro Yamada wrote:
> > >
> > >  - Refactor single target build to make it work more correctly
> > >  - Link vmlinux and modules in parallel
> > >  - Remove head-y syntax
> > >
> > >
> > > Masahiro Yamada (8):
> > >   kbuild: fix and refactor single target build
> > >   kbuild: rename modules.order in sub-directories to .modules.order
> > >   kbuild: move core-y and drivers-y to ./Kbuild
> > >   kbuild: move .vmlinux.objs rule to Makefile.modpost
> > >   kbuild: move vmlinux.o rule to the top Makefile
> > >   kbuild: unify two modpost invocations
> > >   kbuild: use obj-y instead extra-y for objects placed at the head
> > >   kbuild: remove head-y syntax
> >
> > I'm not able to apply the patchset, neither on your current kbuild
> > branch nor on for-next.  What am I missing here?  Could you give me a
> > hint for a patchset base?
> >
> > Thanks and kind regards,
> > Nicolas
>
>
> ooops.  It _is_ already on kbuild, sorry for the noise.


Yes.
If you are happy to review and/or test the branch,
I will add Reviewed-by/Tested-by when I rebase it.
Masahiro Yamada Sept. 24, 2022, 6:05 p.m. UTC | #4
On Tue, Sep 6, 2022 at 3:13 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
>
>  - Refactor single target build to make it work more correctly
>  - Link vmlinux and modules in parallel
>  - Remove head-y syntax
>
>
> Masahiro Yamada (8):
>   kbuild: fix and refactor single target build
>   kbuild: rename modules.order in sub-directories to .modules.order
>   kbuild: move core-y and drivers-y to ./Kbuild
>   kbuild: move .vmlinux.objs rule to Makefile.modpost
>   kbuild: move vmlinux.o rule to the top Makefile
>   kbuild: unify two modpost invocations
>   kbuild: use obj-y instead extra-y for objects placed at the head
>   kbuild: remove head-y syntax


Various bugs have been reported for v2.


I applied 1/8.
dropped 2/8.
will send v3 for the rest.