Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 08 Sep 2021 09:29:25 +0000
From:      bugzilla-noreply@freebsd.org
To:        toolchain@FreeBSD.org
Subject:   [Bug 258358] Fails to build on riscv: arm_bf16.h: sh: clang-tblgen: Exec format error
Message-ID:  <bug-258358-29464-EOy5S6pc1k@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-258358-29464@https.bugs.freebsd.org/bugzilla/>
References:  <bug-258358-29464@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D258358

--- Comment #4 from Jessica Clarke <jrtc27@freebsd.org> ---
This is a known issue. We build the bootstrap tool as a static binary and w=
ith
--gc-sections. The latter is key, as ELF notes are not considered as GC roo=
ts
when COMDAT, as was made the case last year for the ABI note. Because RISC-V
isn=E2=80=99t using EI_OSABI on FreeBSD there=E2=80=99s then no branding in=
 the binary for the
kernel to recognise (you need at least one of that, the dynamic linker path=
 or
the ELF note). The fix for this is to stop making the note COMDAT and put it
only in crti.

There is a workaround. Find the -Wl,--gc-sections (IIRC it=E2=80=99s in
usr.bin/clang/llvm.build.mk) and add ,-melf64lriscv_fbsd to the end of it.

--=20
You are receiving this mail because:
You are on the CC list for the bug.
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-258358-29464-EOy5S6pc1k>