From d9ad2b357b21320a6a6d526ce0e8d5b0aac83070 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Thu, 6 Jul 2017 13:27:01 +0000 Subject: [PATCH] compiler_rt: provide bswap buildins on sparc64 Attempting to build sparc64 world with GCC 6.3 previously failed with zstd_compress.c:(.text+0x8fc): undefined reference to `__bswapsi2' --- lib/libcompiler_rt/Makefile.inc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/libcompiler_rt/Makefile.inc b/lib/libcompiler_rt/Makefile.inc index 44a963ff9ed1..30608826b8fa 100644 --- a/lib/libcompiler_rt/Makefile.inc +++ b/lib/libcompiler_rt/Makefile.inc @@ -225,9 +225,8 @@ SRCS+= switchu8.S SRCS+= sync_synchronize.S .endif -# GCC-6.3 on mips32 requires bswap32 built-in. -.if ${MACHINE_CPUARCH} == "mips" +# On some archs GCC-6.3 requires bswap32 built-in. +.if ${MACHINE_CPUARCH} == "mips" || ${MACHINE_CPUARCH} == "sparc64" SRCS+= bswapdi2.c SRCS+= bswapsi2.c .endif -