lib/libLLVMTarget.a lib/libLLVMBitWriter.a lib/libLLVMIRReader.a lib/libLLVMAsmParser.a lib/libLLVMLinker.a lib/libLLVMTransformUtils.a lib/libLLVMAnalysis.a lib/libLLVMCoverage.a lib/libLLVMObject.a lib/libclangRewriteFrontend.a lib/libclangARCMigrate.a lib/libclangStaticAnalyzerFrontend.a lib/libclangFrontend.a lib/libclangDriver.a lib/libLLVMOption.a lib/libLLVMProfileData.a lib/libclangParse.a lib/libLLVMMCParser.a lib/libclangSerialization.a lib/libLLVMBitReader.a lib/libclangSema.a lib/libclangEdit.a lib/libclangStaticAnalyzerCheckers.a lib/libclangStaticAnalyzerCore.a lib/libclangAnalysis.a lib/libclangAST.a lib/libclangRewrite.a lib/libclangLex.a lib/libclangBasic.a lib/libLLVMCore.a lib/libLLVMMC.a lib/libLLVMSupport.a -lrt -ltinfo -lpthread -lz -lm && : lib/libLLVMAArch64CodeGen.a(AArch64TargetMachine.cpp.o): In function `llvm::DataLayout::getTypeSizeInBits(llvm::Type*) const': /wrkdirs/usr/ports/devel/llvm39/work/llvm-3.9.1.src/lib/Target/AArch64/AArch64TargetMachine.cpp:(.text._ZNK4llvm10DataLayout17getTypeSizeInBitsEPNS_4TypeE[_ZNK4llvm10DataLayout17getTypeSizeInBitsEPNS_4TypeE]+0x180): relocation truncated to fit: R_ARM_CALL against symbol `__aeabi_uldivmod' defined in .text section in /usr/lib/libgcc.a(aeabi_uldivmod.o) lib/libLLVMAArch64CodeGen.a(AArch64TargetMachine.cpp.o): In function `llvm::TargetTransformInfoImplCRTPBase<llvm::AArch64TTIImpl>::getGEPCost(llvm::Type*, llvm::Value const*, llvm::ArrayRef<llvm::Value const*>)': /wrkdirs/usr/ports/devel/llvm39/work/llvm-3.9.1.src/lib/Target/AArch64/AArch64TargetMachine.cpp:(.text._ZN4llvm31TargetTransformInfoImplCRTPBaseINS_14AArch64TTIImplEE10getGEPCostEPNS_4TypeEPKNS_5ValueENS_8ArrayRefIS7_EE[_ZN4llvm31TargetTransformInfoImplCRTPBaseINS_14AArch64TTIImplEE10getGEPCostEPNS_4TypeEPKNS_5ValueENS_8ArrayRefIS7_EE]+0x238): relocation truncated to fit: R_ARM_CALL against symbol `__aeabi_uldivmod' defined in .text section in /usr/lib/libgcc.a(aeabi_uldivmod.o) lib/libLLVMAArch64CodeGen.a(AArch64TargetTransformInfo.cpp.o): In function `llvm::AArch64TTIImpl::getVectorInstrCost(unsigned int, llvm::Type*, unsigned int)': /wrkdirs/usr/ports/devel/llvm39/work/llvm-3.9.1.src/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:(.text._ZN4llvm14AArch64TTIImpl18getVectorInstrCostEjPNS_4TypeEj+0x68): relocation truncated to fit: R_ARM_CALL against symbol `__aeabi_uidivmod' defined in .text section in /usr/lib/libgcc.a(aeabi_uidivmod.o) lib/libLLVMAArch64CodeGen.a(AArch64TargetTransformInfo.cpp.o): In function `llvm::AArch64TTIImpl::getInterleavedMemoryOpCost(unsigned int, llvm::Type*, unsigned int, llvm::ArrayRef<unsigned int>, unsigned int, unsigned int)': /wrkdirs/usr/ports/devel/llvm39/work/llvm-3.9.1.src/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:(.text._ZN4llvm14AArch64TTIImpl26getInterleavedMemoryOpCostEjPNS_4TypeEjNS_8ArrayRefIjEEjj+0x74): relocation truncated to fit: R_ARM_CALL against symbol `__aeabi_uidivmod' defined in .text section in /usr/lib/libgcc.a(aeabi_uidivmod.o) lib/libLLVMAArch64CodeGen.a(AArch64TargetTransformInfo.cpp.o): In function `llvm::BasicTTIImplBase<llvm::AArch64TTIImpl>::getInterleavedMemoryOpCost(unsigned int, llvm::Type*, unsigned int, llvm::ArrayRef<unsigned int>, unsigned int, unsigned int)': /wrkdirs/usr/ports/devel/llvm39/work/llvm-3.9.1.src/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:(.text._ZN4llvm16BasicTTIImplBaseINS_14AArch64TTIImplEE26getInterleavedMemoryOpCostEjPNS_4TypeEjNS_8ArrayRefIjEEjj[_ZN4llvm16BasicTTIImplBaseINS_14AArch64TTIImplEE26getInterleavedMemoryOpCostEjPNS_4TypeEjNS_8ArrayRefIjEEjj]+0x44): relocation truncated to fit: R_ARM_CALL against symbol `__aeabi_uidivmod' defined in .text section in /usr/lib/libgcc.a(aeabi_uidivmod.o) lib/libLLVMAArch64CodeGen.a(AArch64FrameLowering.cpp.o): In function `llvm::AArch64FrameLowering::eliminateCallFramePseudoInstr(llvm::MachineFunction&, llvm::MachineBasicBlock&, llvm::MachineInstrBundleIterator<llvm::MachineInstr>) const': /wrkdirs/usr/ports/devel/llvm39/work/llvm-3.9.1.src/lib/Target/AArch64/AArch64FrameLowering.cpp:(.text._ZNK4llvm20AArch64FrameLowering29eliminateCallFramePseudoInstrERNS_15MachineFunctionERNS_17MachineBasicBlockENS_26MachineInstrBundleIteratorINS_12MachineInstrEEE+0x144): relocation truncated to fit: R_ARM_CALL against symbol `__aeabi_uldivmod' defined in .text section in /usr/lib/libgcc.a(aeabi_uldivmod.o) lib/libLLVMAArch64CodeGen.a(AArch64ISelDAGToDAG.cpp.o): In function `(anonymous namespace)::AArch64DAGToDAGISel::Select(llvm::SDNode*)': /wrkdirs/usr/ports/devel/llvm39/work/llvm-3.9.1.src/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp:(.text._ZN12_GLOBAL__N_119AArch64DAGToDAGISel6SelectEPN4llvm6SDNodeE+0x4bf8): relocation truncated to fit: R_ARM_CALL against symbol `__aeabi_uidivmod' defined in .text section in /usr/lib/libgcc.a(aeabi_uidivmod.o) /wrkdirs/usr/ports/devel/llvm39/work/llvm-3.9.1.src/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp:(.text._ZN12_GLOBAL__N_119AArch64DAGToDAGISel6SelectEPN4llvm6SDNodeE+0x4ecc): relocation truncated to fit: R_ARM_CALL against symbol `__aeabi_uidivmod' defined in .text section in /usr/lib/libgcc.a(aeabi_uidivmod.o) /wrkdirs/usr/ports/devel/llvm39/work/llvm-3.9.1.src/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp:(.text._ZN12_GLOBAL__N_119AArch64DAGToDAGISel6SelectEPN4llvm6SDNodeE+0x861c): relocation truncated to fit: R_ARM_CALL against symbol `__aeabi_uidivmod' defined in .text section in /usr/lib/libgcc.a(aeabi_uidivmod.o) /wrkdirs/usr/ports/devel/llvm39/work/llvm-3.9.1.src/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp:(.text._ZN12_GLOBAL__N_119AArch64DAGToDAGISel6SelectEPN4llvm6SDNodeE+0x8bb0): relocation truncated to fit: R_ARM_CALL against symbol `__aeabi_uidivmod' defined in .text section in /usr/lib/libgcc.a(aeabi_uidivmod.o) lib/libLLVMAArch64CodeGen.a(AArch64ISelDAGToDAG.cpp.o): In function `(anonymous namespace)::AArch64DAGToDAGISel::SelectAddrModeXRO(llvm::SDValue, unsigned int, llvm::SDValue&, llvm::SDValue&, llvm::SDValue&, llvm::SDValue&)': /wrkdirs/usr/ports/devel/llvm39/work/llvm-3.9.1.src/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp:(.text._ZN12_GLOBAL__N_119AArch64DAGToDAGISel17SelectAddrModeXROEN4llvm7SDValueEjRS2_S3_S3_S3_+0x164): additional relocation overflows omitted from the output c++: error: linker command failed with exit code 1 (use -v to see invocation) ninja: build stopped: subcommand failed. *** Error code 1 Stop. make: stopped in /usr/ports/devel/llvm39 ====>> Cleaning up wrkdir ===> Cleaning for llvm39-3.9.1_1 build of devel/llvm39 ended at Thu Feb 16 15:13:00 CET 2017 build time: 31:24:37 !!! build failure encountered !!!
Created attachment 180052 [details] Poudriere log
Created attachment 180054 [details] patch Can you try the attached patch (obtained from mmel@)
Now the linking phase works, but I get an error in the staging phase. Log attached
Created attachment 180104 [details] build log after miki's patch staging error
It works here: ====>> Building devel/llvm39 build started at Sun Feb 19 16:12:12 CET 2017 port directory: /usr/ports/devel/llvm39 building for: FreeBSD 12armv6-default-job-01 12.0-CURRENT FreeBSD 12.0-CURRENT r313467 arm maintained by: brooks@FreeBSD.org Makefile ident: $FreeBSD: head/devel/llvm39/Makefile 433904 2017-02-11 19:21:28Z antoine $ Poudriere version: 3.1.14 Host OSVERSION: 1200020 Jail OSVERSION: 1200020 ---Begin Environment--- SHELL=/bin/csh UNAME_p=armv6 UNAME_m=arm ABI_FILE=/usr/lib/crt1.o UNAME_v=FreeBSD 12.0-CURRENT r313467 UNAME_r=12.0-CURRENT STATUS=1 OPSYS=FreeBSD ARCH=armv6 OSVERSION=1200020 ---End Environment--- ---Begin OPTIONS List--- ===> The following configuration options are available for llvm39-3.9.1_1: CLANG=on: Build clang DOCS=on: Build and/or install documentation EXTRAS=on: Extra clang tools LIT=on: Install lit and FileCheck test tools LLD=on: Install lld, the LLVM linker LLDB=on: Install lldb, the LLVM debugger (ignored on 9.x) ===> Use 'make config' to modify these settings snip ===> Building package for llvm39-3.9.1_1 =========================================================================== ====>> Cleaning up wrkdir ===> Cleaning for llvm39-3.9.1_1 build of devel/llvm39 ended at Sun Feb 19 23:19:30 CET 2017 build time: 07:07:18
Also works on my side, proposed patch works. The staging error I mentioned was due to my specific setup (lack of swap space). Bug can be closed once patch is applied to port.
A commit references this bug: Author: brooks Date: Mon Feb 20 19:11:45 UTC 2017 New revision: 434485 URL: https://svnweb.freebsd.org/changeset/ports/434485 Log: Attempt to fix build on armv6. PR: 217145 Submitted by: mmel via mikael.urankar@gmail.com Reported by: Sylvain Garrigues <sylvain@sylvaingarrigues.com> Changes: head/devel/llvm39/Makefile
Thanks for the submission and testing.