All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Buildroot does not use ccache for compiling Linux kernel?
@ 2024-09-14 18:19 Andreas Düring via buildroot
  2024-09-14 18:25 ` Thomas Petazzoni via buildroot
  2024-09-14 19:51 ` Arnout Vandecappelle via buildroot
  0 siblings, 2 replies; 4+ messages in thread
From: Andreas Düring via buildroot @ 2024-09-14 18:19 UTC (permalink / raw)
  To: buildroot

Hello,

I am currently experimenting with building a minimal image for my
Raspberry Pi.

During this process, I realized that ccache, although enabled, is not
used for compiling the Linux kernel. I think this is because of the
recipe in linux/linux.mk:

LINUX_MAKE_FLAGS = \
        HOSTCC="$(HOSTCC) $(subst -I/,-isystem /,$(subst -I /,-isystem /,$(HOST_CFLAGS))) $(HOST_LDFLAGS)" \
        ARCH=$(KERNEL_ARCH) \
        INSTALL_MOD_PATH=$(TARGET_DIR) \
        CROSS_COMPILE="$(TARGET_CROSS)" \
        WERROR=0 \
        REGENERATE_PARSERS=1 \
        DEPMOD=$(HOST_DIR)/sbin/depmod


The linux kernel seems to assemble the compiler using TARGET_CROSS,
e.g.
CC = $(TARGET_CROSS)gcc

As a very crude solution, I changed the corresponding line to
        CROSS_COMPILE="ccache $(TARGET_CROSS)"
but this is probably not the optimal solution. (I didn't carefully
check where else CROSS_COMPILE is used).

If this is a known limitation? Should this be added to the
documentation?
https://buildroot.org/downloads/manual/manual.html#ccache
("This will automatically build ccache and use it for every host and
target compilation.")

With best regards,
Andreas
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2024-09-14 19:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-14 18:19 [Buildroot] Buildroot does not use ccache for compiling Linux kernel? Andreas Düring via buildroot
2024-09-14 18:25 ` Thomas Petazzoni via buildroot
2024-09-14 18:35   ` Andreas Düring via buildroot
2024-09-14 19:51 ` Arnout Vandecappelle via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.