diff options
author | Thomas Weißschuh <linux@weissschuh.net> | 2024-08-08 00:51:39 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-10-10 12:57:30 +0300 |
commit | fc975b8daba2333b2988a4d1670fe37acfed6c00 (patch) | |
tree | 49de0651cf740640ab30580f9cc38eb411baeafb /tools | |
parent | 6cc4e5eaadae4654963081685fe368c01aeedfb3 (diff) | |
download | linux-fc975b8daba2333b2988a4d1670fe37acfed6c00.tar.xz |
tools/nolibc: powerpc: limit stack-protector workaround to GCC
[ Upstream commit 1daea158d0aae0770371f3079305a29fdb66829e ]
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>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/include/nolibc/arch-powerpc.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/include/nolibc/arch-powerpc.h b/tools/include/nolibc/arch-powerpc.h index ac212e6185b2..41ebd394b90c 100644 --- a/tools/include/nolibc/arch-powerpc.h +++ b/tools/include/nolibc/arch-powerpc.h @@ -172,7 +172,7 @@ _ret; \ }) -#ifndef __powerpc64__ +#if !defined(__powerpc64__) && !defined(__clang__) /* FIXME: For 32-bit PowerPC, with newer gcc compilers (e.g. gcc 13.1.0), * "omit-frame-pointer" fails with __attribute__((no_stack_protector)) but * works with __attribute__((__optimize__("-fno-stack-protector"))) |