On Mon, Dec 08, 2025 at 09:32:06PM +0530, Hari Bathini wrote: > Thanks for the review, Naveen. > > On 24/11/25 11:19 am, Naveen N Rao wrote: > > On Sun, Nov 09, 2025 at 02:34:03AM +0530, Hari Bathini wrote: > > > ARCH_USING_PATCHABLE_FUNCTION_ENTRY depends on toolchain support for > > > -fpatchable-function-entry option. The current script that checks > > > for this support only handles GCC. Rename the script and extend it > > > to detect support for -fpatchable-function-entry with Clang as well, > > > allowing clean cross-compilation with Clang toolchains. > > > > > > Signed-off-by: Hari Bathini <[email protected]> > > > --- > > > arch/powerpc/Kconfig | 5 +++-- > > > ...-function-entry.sh => check-fpatchable-function-entry.sh} | 0 > > > 2 files changed, 3 insertions(+), 2 deletions(-) > > > rename arch/powerpc/tools/{gcc-check-fpatchable-function-entry.sh => > > > check-fpatchable-function-entry.sh} (100%) > > > > > > diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig > > > index 325c1171894d..dfb62e211c92 100644 > > > --- a/arch/powerpc/Kconfig > > > +++ b/arch/powerpc/Kconfig > > > @@ -568,8 +568,9 @@ config ARCH_USING_PATCHABLE_FUNCTION_ENTRY > > > depends on FUNCTION_TRACER && (PPC32 || PPC64_ELF_ABI_V2) > > > depends on $(cc-option,-fpatchable-function-entry=2) > > > def_bool y if PPC32 > > > - def_bool > > > $(success,$(srctree)/arch/powerpc/tools/gcc-check-fpatchable-function-entry.sh > > > $(CC) -mlittle-endian) if PPC64 && CPU_LITTLE_ENDIAN > > > - def_bool > > > $(success,$(srctree)/arch/powerpc/tools/gcc-check-fpatchable-function-entry.sh > > > $(CC) -mbig-endian) if PPC64 && CPU_BIG_ENDIAN > > > + def_bool > > > $(success,$(srctree)/arch/powerpc/tools/check-fpatchable-function-entry.sh > > > $(CC) -mlittle-endian) if PPC64 && CPU_LITTLE_ENDIAN && CC_IS_GCC > > > + def_bool > > > $(success,$(srctree)/arch/powerpc/tools/check-fpatchable-function-entry.sh > > > $(CC) -target ppc64le -mlittle-endian) if PPC64 && CPU_LITTLE_ENDIAN && > > > CC_IS_CLANG > > > > Can you instead pass $(CLANG_FLAGS) to retain the same command across > > gcc/clang? > > Should work, I guess. > But do I need to test for any additional clang flags that > may interfere with what we are trying to check here?
>From what I can tell, $(CLANG_FLAGS) includes a fairly static set of flags which will be included alongside other $CFLAGS. So, I don't think anything special should be needed there. - Naveen
