[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1453797509-14604-1-git-send-email-albeu@free.fr>
Date: Tue, 26 Jan 2016 09:38:27 +0100
From: Alban Bedel <albeu@...e.fr>
To: linux-mips@...ux-mips.org
Cc: Ralf Baechle <ralf@...ux-mips.org>,
Andrew Bresticker <abrestic@...omium.org>,
Alex Smith <alex.smith@...tec.com>,
Wu Zhangjin <wuzhangjin@...il.com>,
linux-kernel@...r.kernel.org, Alban Bedel <albeu@...e.fr>
Subject: [PATCH v3 1/3] MIPS: zboot: Fix the build with XZ compression on older GCC versions
Some older GCC version (at least 4.6) emits calls to __bswapsi2() when
building the XZ decompressor. The link of the compressed image then
fails with the following error:
arch/mips/boot/compressed/decompress.o: In function '__fswab32':
include/uapi/linux/swab.h:60: undefined reference to '__bswapsi2'
Add bswapsi.o to the link to fix the build with these versions.
Signed-off-by: Alban Bedel <albeu@...e.fr>
---
Changelog:
v2: * Added CC to stable as the patch hasn't been merged in 4.4
v3: * Updated to 4.5-rc1
* Removed CC to stable as this version of the patch doesn't
apply to 4.4.
---
arch/mips/boot/compressed/Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile
index 4eff1ef..acfc3ce 100644
--- a/arch/mips/boot/compressed/Makefile
+++ b/arch/mips/boot/compressed/Makefile
@@ -39,10 +39,10 @@ vmlinuzobjs-$(CONFIG_SYS_SUPPORTS_ZBOOT_UART_PROM) += $(obj)/uart-prom.o
vmlinuzobjs-$(CONFIG_MIPS_ALCHEMY) += $(obj)/uart-alchemy.o
endif
-vmlinuzobjs-$(CONFIG_KERNEL_XZ) += $(obj)/ashldi3.o
+vmlinuzobjs-$(CONFIG_KERNEL_XZ) += $(obj)/ashldi3.o $(obj)/bswapsi.o
-$(obj)/ashldi3.o: KBUILD_CFLAGS += -I$(srctree)/arch/mips/lib
-$(obj)/ashldi3.c: $(srctree)/arch/mips/lib/ashldi3.c
+$(obj)/ashldi3.o $(obj)/bswapsi.o: KBUILD_CFLAGS += -I$(srctree)/arch/mips/lib
+$(obj)/ashldi3.c $(obj)/bswapsi.c: $(obj)/%.c: $(srctree)/arch/mips/lib/%.c
$(call cmd,shipped)
targets := $(notdir $(vmlinuzobjs-y))
--
2.0.0
Powered by blists - more mailing lists