Thread (11 messages) 11 messages, 5 authors, 2020-04-01

Re: [PATCH v2] powerpc: Make setjmp/longjmp signature standard

From: Nathan Chancellor <hidden>
Date: 2020-03-30 07:57:54
Also in: lkml, stable

On Mon, Mar 30, 2020 at 08:43:19AM +0200, Clement Courbet wrote:
Declaring setjmp()/longjmp() as taking longs makes the signature
non-standard, and makes clang complain. In the past, this has been
worked around by adding -ffreestanding to the compile flags.

The implementation looks like it only ever propagates the value
(in longjmp) or sets it to 1 (in setjmp), and we only call longjmp
with integer parameters.

This allows removing -ffreestanding from the compilation flags.

Context:
https://lore.kernel.org/patchwork/patch/1214060
https://lore.kernel.org/patchwork/patch/1216174

Signed-off-by: Clement Courbet <redacted>
Reviewed-by: Nathan Chancellor <redacted>
Tested-by: Nathan Chancellor <redacted>

---

v2:
Use and array type as suggested by Segher Boessenkool
Cc: stable@vger.kernel.org # v4.14+
Fixes: c9029ef9c957 ("powerpc: Avoid clang warnings around setjmp and longjmp")
Actual diff itself looks good but these two tags need to be above your
signoff to be included in the final changelog. Not sure if Michael will
want a v3 with that or if it can manually be done when applying.

Cheers,
Nathan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help