Skip to content

Commit e2f4b3b

Browse files
rddunlaptsbogend
authored andcommitted
MIPS: boot/compressed/: add __bswapdi2() to target for ZSTD decompression
For MIPS pre-boot, when CONFIG_KERNEL_ZSTD=y, the decompressor function uses __bswapdi2(), so this object file should be added to the target object file. Fixes these build errors: mips-linux-ld: arch/mips/boot/compressed/decompress.o: in function `xxh64': decompress.c:(.text+0x8be0): undefined reference to `__bswapdi2' mips-linux-ld: decompress.c:(.text+0x8c78): undefined reference to `__bswapdi2' mips-linux-ld: decompress.c:(.text+0x8d04): undefined reference to `__bswapdi2' mips-linux-ld: arch/mips/boot/compressed/decompress.o:decompress.c:(.text+0xa010): more undefined references to `__bswapdi2' follow Fixes: 0652035 ("asm-generic: unaligned: remove byteshift helpers") Fixes: cddc40f ("mips: always link byteswap helpers into decompressor") Signed-off-by: Randy Dunlap <[email protected]> Reported-by: kernel test robot <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Thomas Bogendoerfer <[email protected]> Cc: [email protected] Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
1 parent cca2aac commit e2f4b3b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

arch/mips/boot/compressed/Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ $(obj)/uart-ath79.c: $(srctree)/arch/mips/ath79/early_printk.c
5656

5757
vmlinuzobjs-$(CONFIG_KERNEL_XZ) += $(obj)/ashldi3.o
5858

59+
vmlinuzobjs-$(CONFIG_KERNEL_ZSTD) += $(obj)/bswapdi.o
60+
5961
extra-y += ashldi3.c
6062
$(obj)/ashldi3.c: $(obj)/%.c: $(srctree)/lib/%.c FORCE
6163
$(call if_changed,shipped)
@@ -64,6 +66,10 @@ extra-y += bswapsi.c
6466
$(obj)/bswapsi.c: $(obj)/%.c: $(srctree)/arch/mips/lib/%.c FORCE
6567
$(call if_changed,shipped)
6668

69+
extra-y += bswapdi.c
70+
$(obj)/bswapdi.c: $(obj)/%.c: $(srctree)/arch/mips/lib/%.c FORCE
71+
$(call if_changed,shipped)
72+
6773
targets := $(notdir $(vmlinuzobjs-y))
6874

6975
targets += vmlinux.bin

0 commit comments

Comments
 (0)