From: "Andreas Düring via buildroot" <buildroot@buildroot.org>
To: buildroot@buildroot.org
Subject: [Buildroot] Buildroot does not use ccache for compiling Linux kernel?
Date: Sat, 14 Sep 2024 20:19:37 +0200 [thread overview]
Message-ID: <20240914201937.567067fd@devuanPc.fritz.box> (raw)
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
next reply other threads:[~2024-09-14 18:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-14 18:19 Andreas Düring via buildroot [this message]
2024-09-14 18:25 ` [Buildroot] Buildroot does not use ccache for compiling Linux kernel? Thomas Petazzoni via buildroot
2024-09-14 18:35 ` Andreas Düring via buildroot
2024-09-14 19:51 ` Arnout Vandecappelle via buildroot
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=20240914201937.567067fd@devuanPc.fritz.box \
--to=buildroot@buildroot.org \
--cc=brpi@duering-andreas.de \
/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 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.