c3ff2a519 "powerpc/32: add stack protector support" addes stack protector
support so now powerpc's "prepare" target depends on prepare0 (via
stack_protector_prepare target).
It works fine until we try build an external module where it fails with:
Run: 'make -j128 SYSSRC=/home/aik/p/kernel SYSOUT=/home/aik/pbuild/kernel-le-pseries/ ARCH=powerpc'
make[1]: Entering directory '/home/aik/p/kernel'
make[2]: Entering directory '/home/aik/pbuild/kernel-le-pseries'
make[2]: *** No rule to make target 'prepare0', needed by 'stack_protector_prepare'. Stop.
The reason for that is that the main Linux Makefile defines "prepare0"
only if KBUILD_EXTMOD=="".
This hacks powerpc's Makefile to make external modules build again.
Fixes: c3ff2a519 "powerpc/32: add stack protector support"
Signed-off-by: Alexey Kardashevskiy <redacted>
---
It has been suggested that there is a better way of fixing this hence RFC.
---
arch/powerpc/Makefile | 4 ++++
1 file changed, 4 insertions(+)
On Thu, Jan 10, 2019 at 2:44 PM Alexey Kardashevskiy [off-list ref] wrote:
quoted hunk
c3ff2a519 "powerpc/32: add stack protector support" addes stack protector
support so now powerpc's "prepare" target depends on prepare0 (via
stack_protector_prepare target).
It works fine until we try build an external module where it fails with:
Run: 'make -j128 SYSSRC=/home/aik/p/kernel SYSOUT=/home/aik/pbuild/kernel-le-pseries/ ARCH=powerpc'
make[1]: Entering directory '/home/aik/p/kernel'
make[2]: Entering directory '/home/aik/pbuild/kernel-le-pseries'
make[2]: *** No rule to make target 'prepare0', needed by 'stack_protector_prepare'. Stop.
The reason for that is that the main Linux Makefile defines "prepare0"
only if KBUILD_EXTMOD=="".
This hacks powerpc's Makefile to make external modules build again.
Fixes: c3ff2a519 "powerpc/32: add stack protector support"
Signed-off-by: Alexey Kardashevskiy <redacted>
---
It has been suggested that there is a better way of fixing this hence RFC.
---
arch/powerpc/Makefile | 4 ++++
1 file changed, 4 insertions(+)
On Thu, Jan 10, 2019 at 2:44 PM Alexey Kardashevskiy [off-list ref] wrote:
quoted
c3ff2a519 "powerpc/32: add stack protector support" addes stack protector
support so now powerpc's "prepare" target depends on prepare0 (via
stack_protector_prepare target).
It works fine until we try build an external module where it fails with:
Run: 'make -j128 SYSSRC=/home/aik/p/kernel SYSOUT=/home/aik/pbuild/kernel-le-pseries/ ARCH=powerpc'
make[1]: Entering directory '/home/aik/p/kernel'
make[2]: Entering directory '/home/aik/pbuild/kernel-le-pseries'
make[2]: *** No rule to make target 'prepare0', needed by 'stack_protector_prepare'. Stop.
The reason for that is that the main Linux Makefile defines "prepare0"
only if KBUILD_EXTMOD=="".
This hacks powerpc's Makefile to make external modules build again.
Fixes: c3ff2a519 "powerpc/32: add stack protector support"
Signed-off-by: Alexey Kardashevskiy <redacted>
---
It has been suggested that there is a better way of fixing this hence RFC.
---
arch/powerpc/Makefile | 4 ++++
1 file changed, 4 insertions(+)
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