X-Original-To: alpine-aports@lists.alpinelinux.org Received: from mx7.valuehost.ru (mx7.valuehost.ru [217.112.42.214]) by lists.alpinelinux.org (Postfix) with ESMTP id 2006F5C635C for ; Sat, 15 Sep 2018 22:22:27 +0000 (GMT) Received: from mx7.valuehost.ru (localhost.valuehost.ru [127.0.0.1]) by mx7.valuehost.ru (Postfix) with ESMTP id 55FF42E062 for ; Sun, 16 Sep 2018 01:22:26 +0300 (MSK) From: alpine-mips-patches Subject: [alpine-aports] [PATCH] main/llvm5: fix build on mips* To: alpine-aports@lists.alpinelinux.org Message-Id: <20180915222226.55FF42E062@mx7.valuehost.ru> Date: Sun, 16 Sep 2018 01:22:26 +0300 (MSK) X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: This enables native build on mips* however some tests fail: 1) ExecutionEngine/frem.ll - fails because O32+FP64+nan2008 binary (lli) tries to JIT-run O32 FP32 code which uses double floats. Irrelevant for the actual alpine mips* definition though (soft float). 2) A bunch of X86+gold tests - for unknown reason. LLVM_TARGETS_TO_BUILD should be limited to just "AMDGPU;NVPTX;Mips;BPF" anyway. --- main/llvm5/APKBUILD | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/main/llvm5/APKBUILD b/main/llvm5/APKBUILD index 24bf82a342..68c0bf6892 100644 --- a/main/llvm5/APKBUILD +++ b/main/llvm5/APKBUILD @@ -32,6 +32,11 @@ case "$CARCH" in arm*) options="$options !check";; esac +# ld 2.31.1 aborts at bfd/merge.c:912 +case "$CARCH" in + mips*) makedepends="$makedepends binutils-gold";; +esac + # Whether is this package the default (latest) LLVM version. _default_llvm="yes" @@ -76,6 +81,11 @@ build() { # Auto-detect it by guessing either. local ffi_include_dir="$(pkg-config --cflags-only-I libffi | sed 's|^-I||g')" + case "$CARCH" in + mips*) _llvm_use_linker="-DLLVM_USE_LINKER=gold";; + *) _llvm_use_linker="";; + esac + cmake -Wno-dev \ -DCMAKE_BUILD_TYPE=MinSizeRel \ -DCMAKE_C_FLAGS_MINSIZEREL_INIT="$CFLAGS" \ @@ -105,6 +115,7 @@ build() { -DLLVM_LINK_LLVM_DYLIB=ON \ -DLLVM_TARGETS_TO_BUILD='X86;ARM;AArch64;PowerPC;SystemZ;AMDGPU;NVPTX;Mips;BPF' \ -DLLVM_APPEND_VC_REV=OFF \ + $_llvm_use_linker \ "$builddir" make llvm-tblgen -- 2.19.0 --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---