]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
tools/nolibc: powerpc: limit stack-protector workaround to GCC
authorThomas Weißschuh <linux@weissschuh.net>
Wed, 7 Aug 2024 21:51:39 +0000 (23:51 +0200)
committerThomas Weißschuh <linux@weissschuh.net>
Sat, 10 Aug 2024 15:08:15 +0000 (17:08 +0200)
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>
tools/include/nolibc/arch-powerpc.h

index ac212e6185b26d7bd6c647a660a66140609f0959..41ebd394b90c7ace7229302960e7440927841dd6 100644 (file)
        _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")))