Skip to content

Commit fc975b8

Browse files
t-8chgregkh
authored andcommitted
tools/nolibc: powerpc: limit stack-protector workaround to GCC
[ Upstream commit 1daea15 ] As mentioned in the comment, the workaround for __attribute__((no_stack_protector)) is only necessary on GCC. Avoid applying the workaround on clang, as clang does not recognize __attribute__((__optimize__)) and would fail. Acked-by: Willy Tarreau <w@1wt.eu> Link: https://lore.kernel.org/r/20240807-nolibc-llvm-v2-3-c20f2f5fc7c2@weissschuh.net Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 6cc4e5e commit fc975b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/include/nolibc/arch-powerpc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@
172172
_ret; \
173173
})
174174

175-
#ifndef __powerpc64__
175+
#if !defined(__powerpc64__) && !defined(__clang__)
176176
/* FIXME: For 32-bit PowerPC, with newer gcc compilers (e.g. gcc 13.1.0),
177177
* "omit-frame-pointer" fails with __attribute__((no_stack_protector)) but
178178
* works with __attribute__((__optimize__("-fno-stack-protector")))

0 commit comments

Comments
 (0)