Skip to content

Commit bf6cbd0

Browse files
committed
powerpc: Fix stackprotector detection for non-glibc toolchains
If GCC is not built with glibc support then we must explicitly tell it which register to use for TLS mode stack protector, otherwise it will error out and the cc-option check will fail. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
1 parent 50530f5 commit bf6cbd0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎arch/powerpc/Kconfig‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,8 @@ config PPC
180180
select HAVE_ARCH_SECCOMP_FILTER
181181
select HAVE_ARCH_TRACEHOOK
182182
select HAVE_CBPF_JIT if !PPC64
183-
select HAVE_STACKPROTECTOR if $(cc-option,-mstack-protector-guard=tls)
183+
select HAVE_STACKPROTECTOR if PPC64 && $(cc-option,-mstack-protector-guard=tls -mstack-protector-guard-reg=r13)
184+
select HAVE_STACKPROTECTOR if PPC32 && $(cc-option,-mstack-protector-guard=tls -mstack-protector-guard-reg=r2)
184185
select HAVE_CONTEXT_TRACKING if PPC64
185186
select HAVE_DEBUG_KMEMLEAK
186187
select HAVE_DEBUG_STACKOVERFLOW

0 commit comments

Comments
 (0)