From: Kees Cook <kees@kernel.org>
To: Tadhg McDonald-Jensen <tadhgmister@gmail.com>
Cc: linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: cross compile fails with GCC_PLUGIN_LATENT_ENTROPY
Date: Fri, 4 Apr 2025 10:32:10 -0700 [thread overview]
Message-ID: <202504041030.FDB5E355F@keescook> (raw)
In-Reply-To: <d8375c5b-03d6-4c24-83c1-483f0093c48d@gmail.com>
On Tue, Apr 01, 2025 at 05:34:05PM -0400, Tadhg McDonald-Jensen wrote:
> Hello,
>
> When cross compiling the linux kernel with
> `CONFIG_GCC_PLUGIN_LATENT_ENTROPY=y` it tries to compile the plugin for
> the target platform instead of for the host machine causing the
> compilation to fail.
>
> I've opened a bug on bugzilla:
> https://bugzilla.kernel.org/show_bug.cgi?id=219973
>
> Specifically I am using GNU guix and trying to compile with `ARCH=arm`
> and `CROSS_COMPILE=arm-linux-gnueabihf`, in guix the include paths are
> setup in a non typical way so if that is relevant to this error I am
> happy to provide more detail, but hopefully just the output of make
> showing `CC scripts/gcc-plugins/latent_entropy_plugin.o` instead of
> `HOSTCC` like many other files in the scripts folder is sufficient to
> reproduce and solve this issue.
If the kernel's build system can't find the right includes, that would
explain it. I'd check final depends line from scripts/gcc-plugins/Kconfig:
bool "GCC plugins"
depends on HAVE_GCC_PLUGINS
depends on CC_IS_GCC
depends on $(success,test -e $(shell,$(CC) -print-file-name=plugin)/include/plugin-version.h)
Which validates the Makefile's use of that:
GCC_PLUGINS_DIR = $(shell $(CC) -print-file-name=plugin)
--
Kees Cook
next prev parent reply other threads:[~2025-04-04 17:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-01 21:34 cross compile fails with GCC_PLUGIN_LATENT_ENTROPY Tadhg McDonald-Jensen
2025-04-04 17:32 ` Kees Cook [this message]
2025-04-09 21:20 ` Tadhg McDonald-Jensen
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=202504041030.FDB5E355F@keescook \
--to=kees@kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tadhgmister@gmail.com \
/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.