Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clang uses incorrect library order #117967

Closed
androm3da opened this issue Nov 28, 2024 · 5 comments
Closed

clang uses incorrect library order #117967

androm3da opened this issue Nov 28, 2024 · 5 comments
Assignees
Labels
backend:Hexagon clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' release:backport

Comments

@androm3da
Copy link
Member

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.

@androm3da androm3da added backend:Hexagon clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' labels Nov 28, 2024
@androm3da androm3da added this to the LLVM 19.X Release milestone Nov 28, 2024
@androm3da androm3da self-assigned this Nov 28, 2024
@github-project-automation github-project-automation bot moved this to Needs Triage in LLVM Release Status Nov 28, 2024
@llvmbot
Copy link
Member

llvmbot commented Nov 28, 2024

@llvm/issue-subscribers-backend-hexagon

Author: Brian Cain (androm3da)

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.

@llvmbot
Copy link
Member

llvmbot commented Nov 28, 2024

@llvm/issue-subscribers-clang-driver

Author: Brian Cain (androm3da)

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.

@androm3da
Copy link
Member Author

This was fixed by #117057

@androm3da
Copy link
Member Author

/cherry-pick 9cc2502

@llvmbot llvmbot closed this as completed Nov 28, 2024
@github-project-automation github-project-automation bot moved this from Needs Triage to Done in LLVM Release Status Nov 28, 2024
@llvmbot
Copy link
Member

llvmbot commented Nov 28, 2024

/pull-request #117968

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:Hexagon clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' release:backport
Projects
Development

No branches or pull requests

3 participants