From owner-freebsd-bugs@freebsd.org Sun Aug 5 21:32:19 2018 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 71ECF105F2AB for ; Sun, 5 Aug 2018 21:32:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 0DDF57936C for ; Sun, 5 Aug 2018 21:32:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id C68C2105F2AA; Sun, 5 Aug 2018 21:32:18 +0000 (UTC) Delivered-To: bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C243105F2A9 for ; Sun, 5 Aug 2018 21:32:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2BB1A79364 for ; Sun, 5 Aug 2018 21:32:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 8AA30AA64 for ; Sun, 5 Aug 2018 21:32:17 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w75LWHN6062671 for ; Sun, 5 Aug 2018 21:32:17 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w75LWHHo062661 for bugs@FreeBSD.org; Sun, 5 Aug 2018 21:32:17 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 230240] import clang 7.0.0 (tracking PR) Date: Sun, 05 Aug 2018 21:32:17 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: dim@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Aug 2018 21:32:19 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D230240 --- Comment #5 from Dimitry Andric --- Most of universe builds now, but two rather trick problems remain: 1) i386's lldb now requires atomic 64 bit libcalls, so it doesn't link 2) arm's lld doesn't link due to "relocation truncated to fit" Regarding 1), we have always had the problem that i386 didn't support atomi= c 64 bit operations, at least not with the default CPU (i486) that we target. N= ow clang 7.0 does correctly emit some libcalls for __atomic_load_8 and friends, and this causes lldb to fail to link. We need to either provide some sort = of atomic wrappers in libc, a separate libatomic, or force lldb to be compiled with at least CPUTYPE=3Di586? Regarding 2), I'm getting the following with 'make buildworld TARGET=3Darm': /home/dim/obj/clang700-import/home/dim/src/clang700-import/arm.arm/tmp/usr/= lib/libgcc.a(floatundidf.o): In function `__floatundidf': /home/dim/src/clang700-import/contrib/compiler-rt/lib/builtins/floatundidf.= c:43: relocation truncated to fit: R_ARM_CALL against symbol `__aeabi_dadd@@FBSDprivate_1.0' defined in .plt section in /h ome/dim/obj/clang700-import/home/dim/src/clang700-import/arm.arm/lib/clang/= libllvm/libllvm.a(regexec.o) /home/dim/src/clang700-import/contrib/compiler-rt/lib/builtins/floatundidf.= c:43: relocation truncated to fit: R_ARM_CALL against symbol `__aeabi_dadd@@FBSDprivate_1.0' defined in .plt section in /h ome/dim/obj/clang700-import/home/dim/src/clang700-import/arm.arm/lib/clang/= libllvm/libllvm.a(regexec.o) /home/dim/obj/clang700-import/home/dim/src/clang700-import/arm.arm/tmp/usr/= lib/libgcc.a(floatdidf.o): In function `__floatdidf': /home/dim/src/clang700-import/contrib/compiler-rt/lib/builtins/floatdidf.c:= 38: relocation truncated to fit: R_ARM_CALL against symbol `__aeabi_i2d@@FBSDprivate_1.0' defined in .plt section in /home /dim/obj/clang700-import/home/dim/src/clang700-import/arm.arm/lib/clang/lib= llvm/libllvm.a(regexec.o) /home/dim/src/clang700-import/contrib/compiler-rt/lib/builtins/floatdidf.c:= 38: relocation truncated to fit: R_ARM_CALL against symbol `__aeabi_dmul@@FBSDprivate_1.0' defined in .plt section in /hom e/dim/obj/clang700-import/home/dim/src/clang700-import/arm.arm/lib/clang/li= bllvm/libllvm.a(regexec.o) /home/dim/src/clang700-import/contrib/compiler-rt/lib/builtins/floatdidf.c:= 41: relocation truncated to fit: R_ARM_CALL against symbol `__aeabi_dadd@@FBSDprivate_1.0' defined in .plt section in /hom e/dim/obj/clang700-import/home/dim/src/clang700-import/arm.arm/lib/clang/li= bllvm/libllvm.a(regexec.o) /home/dim/src/clang700-import/contrib/compiler-rt/lib/builtins/floatdidf.c:= 41: relocation truncated to fit: R_ARM_CALL against symbol `__aeabi_dadd@@FBSDprivate_1.0' defined in .plt section in /hom e/dim/obj/clang700-import/home/dim/src/clang700-import/arm.arm/lib/clang/li= bllvm/libllvm.a(regexec.o) /home/dim/obj/clang700-import/home/dim/src/clang700-import/arm.arm/tmp/usr/= lib/libgcc.a(clear_cache.o): In function `__clear_cache': /home/dim/src/clang700-import/contrib/compiler-rt/lib/builtins/clear_cache.= c:113: relocation truncated to fit: R_ARM_CALL against symbol `sysarch@@FBSD_1.0' defined in .plt section in /home/dim/obj /clang700-import/home/dim/src/clang700-import/arm.arm/lib/clang/libllvm/lib= llvm.a(regexec.o) /home/dim/obj/clang700-import/home/dim/src/clang700-import/arm.arm/tmp/usr/= lib/libgcc.a(fixunsdfdi.o): In function `__fixunsdfdi': /home/dim/src/clang700-import/contrib/compiler-rt/lib/builtins/fixunsdfdi.c= :22: relocation truncated to fit: R_ARM_CALL against symbol `__aeabi_dcmple@@FBSDprivate_1.0' defined in .plt section in / home/dim/obj/clang700-import/home/dim/src/clang700-import/arm.arm/lib/clang= /libllvm/libllvm.a(regexec.o) /home/dim/src/clang700-import/contrib/compiler-rt/lib/builtins/fixunsdfdi.c= :23: relocation truncated to fit: R_ARM_CALL against symbol `__aeabi_dmul@@FBSDprivate_1.0' defined in .plt section in /ho me/dim/obj/clang700-import/home/dim/src/clang700-import/arm.arm/lib/clang/l= ibllvm/libllvm.a(regexec.o) /home/dim/src/clang700-import/contrib/compiler-rt/lib/builtins/fixunsdfdi.c= :24: relocation truncated to fit: R_ARM_CALL against symbol `__aeabi_dmul@@FBSDprivate_1.0' defined in .plt section in /ho me/dim/obj/clang700-import/home/dim/src/clang700-import/arm.arm/lib/clang/l= ibllvm/libllvm.a(regexec.o) /home/dim/src/clang700-import/contrib/compiler-rt/lib/builtins/fixunsdfdi.c= :24: additional relocation overflows omitted from the output c++: error: linker command failed with exit code 1 (use -v to see invocatio= n) *** [ld.lld.full] Error code 1 I suspected that the distance between the functions is getting too large, s= o I tried adding -mlong-calls to lib/libcompiler-rt's Makefile, but that made things worse: clang started crashing with a message to the effect of "can't= use -mlong-calls and -fPIC!". E.g., everything in libcompiler-rt.a is still compiled with -fPIC, probably= to support linking it statically into .so files and PIE executables, so it can= 't use -mlong-calls at all. I have no idea how to get out of this conundrum. Maybe attempt to add -mlong-calls to lld's Makefile? Compile the entirety of libllvm.a with -fP= IC? --=20 You are receiving this mail because: You are the assignee for the bug.=