Re: [RFC PATCH kernel] powerpc/stack_protector: Fix external modules building
From: Michael Ellerman
Date: Fri Jan 11 2019 - 00:25:39 EST
Masahiro Yamada <yamada.masahiro@xxxxxxxxxxxxx> writes:
> On Thu, Jan 10, 2019 at 2:44 PM Alexey Kardashevskiy <aik@xxxxxxxxx> 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