Bug 272164 - devel/llvm-devel: Build broken on aarch64
Summary: devel/llvm-devel: Build broken on aarch64
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Brooks Davis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-23 13:55 UTC by John F. Carr
Modified: 2023-09-13 16:44 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (brooks)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John F. Carr 2023-06-23 13:55:14 UTC
On 64 bit ARM llvm-devel fails to build with a linker error in the ubsan library:
```
ld: error: projects/compiler-rt/lib/ubsan/CMakeFiles/RTUbsan_standalone.aarch64.dir/ubsan_signals_standalone.cpp.o:(function __ubsan::InitializeDeadlySignals(): .text._ZN7__ubsan23InitializeDeadlySignalsEv+0x78): improper alignment for relocation R_AARCH64_LD64_GOT_LO12_NC: 0x5F5FC is not aligned to 8 bytes
```

I reported this at https://github.com/llvm/llvm-project/issues/63418.  A complicated use of inline assembly results in a misaligned symbol, or use of an 8 byte load on a 4 byte object, I can't tell what the code is supposed to do.

The build of LLVM can be fixed by disabling compiler-rt but it probably won't get packaged right as a port.
Comment 1 commit-hook freebsd_committer freebsd_triage 2023-06-23 20:06:04 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1a779a48ef968c58acb43de5c6459a385042b9ff

commit 1a779a48ef968c58acb43de5c6459a385042b9ff
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2023-06-23 19:50:25 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2023-06-23 20:05:42 +0000

    devel/llvm-devel: new snapshot

    Includes a fix for i386 build issues.

    Work around broken compiler-rt compilation on aarch64 by disabling the
    COMPILER_RT option there.  Not ideal, but seems better than marking the
    whole port broken. [0]

    PR:             272164 [0]
    Reported by:    jfc@mit.edu [0]

 devel/llvm-devel/Makefile          |  2 ++
 devel/llvm-devel/Makefile.snapshot |  4 ++--
 devel/llvm-devel/distinfo          |  6 +++---
 devel/llvm-devel/pkg-plist         | 26 ++++++++++++++++++++++----
 4 files changed, 29 insertions(+), 9 deletions(-)
Comment 2 John F. Carr 2023-09-13 16:44:41 UTC
This was fixed upstream and commit eb368deaefd5446d812648d467fba2f4c0ed5b51 re-enabled compiler-rt.