linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masahiro Yamada <masahiroy@kernel.org>
To: Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-arch <linux-arch@vger.kernel.org>
Subject: Re: [PATCH v2 7/8] kbuild: use obj-y instead extra-y for objects placed at the head
Date: Thu, 8 Sep 2022 16:15:50 +0900	[thread overview]
Message-ID: <CAK7LNAR_nbuzH6Cj8E7jgZq+wuKEt9ra6RiRE2dUwPi1ZJOoWw@mail.gmail.com> (raw)
In-Reply-To: <20220906061313.1445810-8-masahiroy@kernel.org>

On Tue, Sep 6, 2022 at 3:13 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> The objects placed at the head of vmlinux need special treatments:
>
>  - arch/$(SRCARCH)/Makefile adds them to head-y in order to place
>    them before other archives in the linker command line.
>
>  - arch/$(SRCARCH)/kernel/Makefile adds them to extra-y instead of
>    obj-y to avoid them going into built-in.a.
>
> This commit gets rid of the latter.
>
> Create vmlinux.a to collect all the objects that are unconditionally
> linked to vmlinux. The objects listed in head-y are moved to the head
> of vmlinux.a by using 'ar m'.
>
> With this, arch/$(SRCARCH)/kernel/Makefile can consistently use obj-y
> for builtin objects.
>
> There is no *.o that is directly linked to vmlinux. Drop unneeded code
> in scripts/clang-tools/gen_compile_commands.py.
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
>
> (no changes since v1)
>




> @@ -198,12 +198,12 @@ KCOV_INSTRUMENT_paca.o := n
>  CFLAGS_setup_64.o              += -fno-stack-protector
>  CFLAGS_paca.o                  += -fno-stack-protector
>
> -extra-$(CONFIG_PPC_FPU)                += fpu.o
> -extra-$(CONFIG_ALTIVEC)                += vector.o
> -extra-$(CONFIG_PPC64)          += entry_64.o
> -extra-$(CONFIG_PPC_OF_BOOT_TRAMPOLINE) += prom_init.o
> +obj-$(CONFIG_PPC_FPU)          += fpu.o
> +obj-$(CONFIG_ALTIVEC)          += vector.o
> +obj-$(CONFIG_PPC64)            += entry_64.o
> +obj-$(CONFIG_PPC_OF_BOOT_TRAMPOLINE)   += prom_init.o
>
> -extra-$(CONFIG_PPC_OF_BOOT_TRAMPOLINE) += prom_init_check
> +obj-$(CONFIG_PPC_OF_BOOT_TRAMPOLINE)   += prom_init_check


This line should not be changed.

I fixed it up locally.

https://lore.kernel.org/lkml/CAK7LNARzFmJjpyUciy1LRvaFo72aZcqRbzY-63ArpeszC+HfmQ@mail.gmail.com/






-- 
Best Regards
Masahiro Yamada

  reply	other threads:[~2022-09-08  7:16 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-06  6:13 [PATCH v2 0/8] kbuild: various cleanups Masahiro Yamada
2022-09-06  6:13 ` [PATCH v2 1/8] kbuild: fix and refactor single target build Masahiro Yamada
2022-09-06  6:13 ` [PATCH v2 2/8] kbuild: rename modules.order in sub-directories to .modules.order Masahiro Yamada
2022-09-06  6:13 ` [PATCH v2 3/8] kbuild: move core-y and drivers-y to ./Kbuild Masahiro Yamada
2022-09-21  4:39   ` Guenter Roeck
     [not found]     ` <CGME20220922121655eucas1p11822db5dbd1455bcbdba901f543b8e6b@eucas1p1.samsung.com>
2022-09-22 12:16       ` Marek Szyprowski
     [not found]         ` <CGME20220923113907eucas1p2b33fa5cf73646401089f96a69cf9b745@eucas1p2.samsung.com>
2022-09-23 11:39           ` Marek Szyprowski
2022-09-23 11:41             ` Masahiro Yamada
2022-09-23 12:09             ` Masahiro Yamada
2022-09-06  6:13 ` [PATCH v2 4/8] kbuild: move .vmlinux.objs rule to Makefile.modpost Masahiro Yamada
2022-09-06  6:13 ` [PATCH v2 5/8] kbuild: move vmlinux.o rule to the top Makefile Masahiro Yamada
2022-09-06  6:13 ` [PATCH v2 6/8] kbuild: unify two modpost invocations Masahiro Yamada
2022-09-06  6:13 ` [PATCH v2 7/8] kbuild: use obj-y instead extra-y for objects placed at the head Masahiro Yamada
2022-09-08  7:15   ` Masahiro Yamada [this message]
2022-09-19  8:10   ` Geert Uytterhoeven
2022-09-19 12:17     ` Masahiro Yamada
2022-09-19 12:28       ` Geert Uytterhoeven
2022-09-19 22:50   ` Guenter Roeck
2022-09-20  6:56     ` Geert Uytterhoeven
2022-09-20 13:33       ` Guenter Roeck
2022-09-06  6:13 ` [PATCH v2 8/8] kbuild: remove head-y syntax Masahiro Yamada
2022-09-06  7:59   ` Arnd Bergmann
2022-09-06  8:16     ` Ard Biesheuvel
2022-09-06  9:08     ` Masahiro Yamada
2022-09-07 20:15 ` [PATCH v2 0/8] kbuild: various cleanups Nicolas Schier
2022-09-07 20:18   ` Nicolas Schier
2022-09-08  2:00     ` Masahiro Yamada
2022-09-24 18:05 ` Masahiro Yamada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAK7LNAR_nbuzH6Cj8E7jgZq+wuKEt9ra6RiRE2dUwPi1ZJOoWw@mail.gmail.com \
    --to=masahiroy@kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).