void-packages/srcpkgs/linux6.0/patches/ppc64-be-elfv2.patch

38 lines
1.3 KiB
Diff

This makes the Linux kernel build as ELFv2 on big endian ppc64. The upstream
doesn't seem to be interested in this but it's a small patch that is unlikely
to break/easy to remake and in worst case can always be ditched.
Using ELFv2 has some potential performance benefits and is already always used
on little endian. It requires a relatively modern toolchain, which we already
have.
Ping q66 if it does not apply.
--- a/drivers/crypto/vmx/Makefile
+++ b/drivers/crypto/vmx/Makefile
@@ -3,7 +3,7 @@ obj-$(CONFIG_CRYPTO_DEV_VMX_ENCRYPT) +=
vmx-crypto-objs := vmx.o aesp8-ppc.o ghashp8-ppc.o aes.o aes_cbc.o aes_ctr.o aes_xts.o ghash.o
quiet_cmd_perl = PERL $@
- cmd_perl = $(PERL) $< $(if $(CONFIG_CPU_LITTLE_ENDIAN), linux-ppc64le, linux-ppc64) > $@
+ cmd_perl = $(PERL) $< $(if $(CONFIG_CPU_LITTLE_ENDIAN), linux-ppc64le, linux-ppc64v2) > $@
targets += aesp8-ppc.S ghashp8-ppc.S
--- a/arch/powerpc/platforms/Kconfig.cputype
+++ b/arch/powerpc/platforms/Kconfig.cputype
@@ -554,10 +554,11 @@ config CPU_LITTLE_ENDIAN
endchoice
config PPC64_ELF_ABI_V1
- def_bool PPC64 && CPU_BIG_ENDIAN
+ def_bool n
+ depends on PPC64 && CPU_BIG_ENDIAN
config PPC64_ELF_ABI_V2
- def_bool PPC64 && CPU_LITTLE_ENDIAN
+ def_bool PPC64
config PPC64_BOOT_WRAPPER
def_bool n