From owner-freebsd-arm@freebsd.org Mon Mar 13 13:17:27 2017 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1DDEAD080A7 for ; Mon, 13 Mar 2017 13:17:27 +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 mx1.freebsd.org (Postfix) with ESMTPS id E78371C91 for ; Mon, 13 Mar 2017 13:17:26 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v2DDHQPr094893 for ; Mon, 13 Mar 2017 13:17:26 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-arm@FreeBSD.org Subject: [Bug 217753] lld [llvm 4.0.0] Linker won't link on aarch64 (Error: Failed to open a.out) Date: Mon, 13 Mar 2017 13:17:26 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: arm X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: wolfgang.meyer@hob.de X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-arm@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cc attachments.created Message-ID: 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-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Mar 2017 13:17:27 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D217753 Bug ID: 217753 Summary: lld [llvm 4.0.0] Linker won't link on aarch64 (Error: Failed to open a.out) Product: Base System Version: CURRENT Hardware: arm64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: arm Assignee: freebsd-arm@FreeBSD.org Reporter: wolfgang.meyer@hob.de CC: freebsd-toolchain@FreeBSD.org Created attachment 180774 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D180774&action= =3Dedit Output for verbose compilation/linking (cc -v -Wl,--verbose conftest.c) When trying to compile C sources on 12-CURRENT (aarch64) with the newly integrated LLVM 4.0 toolchain the compilation fails with ld giving an error= on failing to open the executable file to be produced by the compilation. An e= mpty file with the executable name and a .tmpXXXXXXX suffix is produced by the linking process. This has been observed using poudriere jails with a FreeBSD 12-CURRENT for aarch64 after integration of the llvm 4.0 toolchain (tested with base r3145= 64 and base r315016) running on an amd64 host using qemu-user-static for arm64 execution. How to reproduce: Build poudriere jail for HEAD and aarch64 architecture. Enter jail and try to compile typical configure test source (referred to as conftest.c): int main() { ; return 0; } Compilation: >cc conftest.c Output: /usr/bin/ld: error: failed to open a.out: Unknown error -1 cc: error: linker command failed with exit code 1 (use -v to see invocation) An empty a.out.tmpXXXXXXX is produced. This happens with qemu-aarch64-static 2.6.90.g20160728_1 ( ports r424575 ). With qemu-aarch64-static 2.8.50.g20170307 ( ports r435636 ) I get a qemu er= ror: /usr/ports/emulators/qemu-user-static/work/qemu-bsd-user-c0989c8/tcg/tcg.c:= 2017: tcg fatal error cc: error: unable to execute command: Abort trap (core dumped) cc: error: linker command failed due to signal (use -v to see invocation) Using lld 3.9.0 on aarch64 poudriere jails works fine with either qemu-emul= ated execution. --=20 You are receiving this mail because: You are the assignee for the bug.=