Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Mar 2017 13:17:26 +0000
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)
Message-ID:  <bug-217753-7@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
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.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-217753-7>