Commit 69114be1 authored by Koakuma's avatar Koakuma Committed by Andreas Larsson
Browse files

sparc/build: Put usage of -fcall-used* flags behind cc-option



Place -fcall-used* flags behind cc-option so that clang (which doesn't
support them) can still compile the kernel.

This is a safe change, the reasoning is as follows:

In the (normal) 32-bit ABI, %g5 and %g7 is normally reserved, and in
the 64-bit ABI, %g7 is the reserved one.
Linux turns them into volatile registers by the way of -fcall-used-*,
but on the other hand, omitting the flags shouldn't be harmful;
compilers will now simply refuse to touch them, and any assembly
code that happens to touch them would still work like usual (because
Linux' conventions already treats them as volatile anyway).

Signed-off-by: default avatarKoakuma <koachan@protonmail.com>
Reviewed-by: default avatarNathan Chancellor <nathan@kernel.org>
Tested-by: default avatarNathan Chancellor <nathan@kernel.org>
Reviewed-by: default avatarAndreas Larsson <andreas@gaisler.com>
Link: https://lore.kernel.org/r/20241029-sparc-cflags-v3-1-b28745a6bd71@protonmail.com


Signed-off-by: default avatarAndreas Larsson <andreas@gaisler.com>
parent 9852d85e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment