Re: powerpc: Disable -Wbuiltin-requires-header when setjmp is used

From
Michael Ellerman <hidden>
Date
2018-10-15 04:14:09
Reply to
Joel Stanley, 2018-09-17
On Mon, 2018-09-17 at 07:46:21 UTC, Joel Stanley wrote:
The powerpc kernel uses setjmp which causes a warning when building with
clang:

    CC      arch/powerpc/xmon/xmon.o
  In file included from arch/powerpc/xmon/xmon.c:51:
  ./arch/powerpc/include/asm/setjmp.h:15:13: error: declaration of
  built-in function 'setjmp' requires inclusion of the header <setjmp.h>
        [-Werror,-Wbuiltin-requires-header]
  extern long setjmp(long *);
              ^
  ./arch/powerpc/include/asm/setjmp.h:16:13: error: declaration of
  built-in function 'longjmp' requires inclusion of the header <setjmp.h>
        [-Werror,-Wbuiltin-requires-header]
  extern void longjmp(long *, long);
              ^

This *is* the header and we're not using the built-in setjump but
rather the one in arch/powerpc/kernel/misc.S. As the compiler warning
does not make sense, it for the files where setjmp is used.

Signed-off-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/aea447141c7e7824b81b49acd1bc78

cheers
Thread (3 messages) 3 messages, 3 authors, last reply 2018-10-15
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help