[all-commits] [llvm/llvm-project] 97a1cb: [clang] hexagon: fix link order for libc/builtins ...

Brian Cain via All-commits all-commits at lists.llvm.org
Mon Jan 13 02:49:31 PST 2025


  Branch: refs/heads/release/19.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 97a1cb9a3fc4c23cfa62c5a47b3c6a59d0dbb857
      https://github.com/llvm/llvm-project/commit/97a1cb9a3fc4c23cfa62c5a47b3c6a59d0dbb857
  Author: Brian Cain <bcain at quicinc.com>
  Date:   2025-01-13 (Mon, 13 Jan 2025)

  Changed paths:
    M clang/lib/Driver/ToolChains/Hexagon.cpp
    M clang/test/Driver/hexagon-toolchain-linux.c

  Log Message:
  -----------
  [clang] hexagon: fix link order for libc/builtins (#117057)

When linking programs with `eld`, we get a link error like below:

Error:
/inst/clang+llvm-19.1.0-cross-hexagon-unknown-linux-musl/x86_64-linux-gnu/bin/../target/hexagon-unknown-linux-musl//usr/lib/libc.a(scalbn.lo)(.text.scalbn+0x3c):
undefined reference to `__hexagon_muldf3'

libc has references to the clang_rt builtins library, so the order of
the libraries should be reversed.

(cherry picked from commit 9cc2502c048b1403ba8ba5cc5a655d867c329d12)



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list