[PATCH 0/2] kbuild: Fallout from moving '-mfentry' check into Kconfig stage

From: Nathan Chancellor

Date: Tue Oct 20 2026 - 17:56:01 EST


Hi all,

Ricardo reported an issue from moving the compiler test for '-mfentry'
into Kconfig. In testing that patch, I noticed that the kernel.org GCC
builds for s390 were not probing correctly for '-mfentry' support.

The first patch moves the check for '-mfentry' back into Kbuild where we
have the proper information for whether this flag is actually supported.

The second patch documents the reasons for these issues for future
travelers to hopefully avoid these problems.

I plan to take this via kbuild-fixes after sufficient review/comments.

---
Nathan Chancellor (2):
kbuild: Move testing of '-mfentry' back to Makefile from Kconfig
scripts/Kconfig.toolchain: Highlight cc-option differences between Kconfig and Kbuild

Makefile | 3 ++-
scripts/Kconfig.toolchain | 23 +++++++++++++++++++----
2 files changed, 21 insertions(+), 5 deletions(-)
---
base-commit: 997208ce9f43f01febac956cf9aeffe89945e3c1
change-id: 20261020-kconfig-fix-mfentry-check-50525bc5a6ca

Best regards,
--
Cheers,
Nathan