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

Brian Cain via All-commits all-commits at lists.llvm.org
Mon Nov 25 09:36:07 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9cc2502c048b1403ba8ba5cc5a655d867c329d12
      https://github.com/llvm/llvm-project/commit/9cc2502c048b1403ba8ba5cc5a655d867c329d12
  Author: Brian Cain <bcain at quicinc.com>
  Date:   2024-11-25 (Mon, 25 Nov 2024)

  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.



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