[RFC PATCH kernel] powerpc/stack_protector: Fix external modules building

Michael Ellerman mpe at ellerman.id.au
Fri Jan 11 16:25:33 AEDT 2019


Masahiro Yamada <yamada.masahiro at socionext.com> writes:
> On Thu, Jan 10, 2019 at 2:44 PM Alexey Kardashevskiy <aik at ozlabs.ru> wrote:
...
>> diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
>> index 488c9ed..0492f62 100644
>> --- a/arch/powerpc/Makefile
>> +++ b/arch/powerpc/Makefile
>> @@ -419,7 +419,11 @@ archheaders:
>>  ifdef CONFIG_STACKPROTECTOR
>>  prepare: stack_protector_prepare
>>
>> +ifeq ($(KBUILD_EXTMOD),)
>>  stack_protector_prepare: prepare0
>> +else
>> +stack_protector_prepare:
>> +endif
>
>
> Honestly, I think this is ugly.

Yes I would call it a hack :)

> Do you want me to send an alternative solution?

I don't grok how external modules are built well enough to work out what
the right solution is. So if you can come up with something better that
would be awesome.

cheers


More information about the Linuxppc-dev mailing list