diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2020-05-19 16:13:50 +0900 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-05-25 08:51:37 +0200 |
commit | dc4cff0209ba243c5438fb278c46cbdb7889f44c (patch) | |
tree | 29828fb0a1a264d41a4ac1714385e807321ddd84 /images/Makefile | |
parent | f74113df7e90c07951c60ed01a6828c64cdcd9bb (diff) | |
download | barebox-dc4cff0209ba243c5438fb278c46cbdb7889f44c.tar.gz barebox-dc4cff0209ba243c5438fb278c46cbdb7889f44c.tar.xz |
kbuild: unify barebox and pbl build commands
The current Linux uses the unified build command for built-in objects
and module objects. This is possible because part-of-module is set to
y when the target is being built for a module. If so, quiet_modtag is
set to [M], and modkern_cflags is set to KBUILD_CFLAGS_MODULE instead
of KBUILD_CFLAGS_KERNEL.
Currently, barebox uses a separate build command for pbl, but the
difference between cmd_cc_o_c and cmd_pbl_cc_o_c is just
"-D__PBL__ $(PBL_CPPFLAGS)".
By using the same approach as Linux, they can be unified.
Set part-of-pbl flag to y when the target is being built for pbl.
Merge cmd_as_o_S and cmd_link_o_target as well.
This also changes the shortlog style as follows:
PBLCC -> CC [P]
PBLAS -> AS [P]
PBLLD -> LD [P]
This is more consistent with the policy in the Linux build system.
In Linux, a capital letter enclosed square blackets indicates which
target the object is being built for.
CC object built for built-in
CC [M] object built for modules
CC [U] object built for userspace (proposed for Linux 5.8-rc1)
The idea behind this is we use the same compiler $(CC) for them.
Only the difference is the compiler flags. On the other hand, host
programs are compiled by a different tool, $(HOSTCC), hence the
shortlog is 'HOSTCC'.
Barebox supports module builds (it seems), but the [P] notation does
not conflict with [M] because pbl has a limited memory footprint.
We never expect pbl can support the module feature.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'images/Makefile')
0 files changed, 0 insertions, 0 deletions