[Issue]: -fopenmp should not change default RUNPATH to RPATH
Nobody has claimed this yet.
- Dominant language
- Fortran
- Stars
- 246
- Forks
- 63
- Avg merge
- 21h 50m
- Merged PRs (30d)
- 25
Description
Problem Description
It seems that whenever -fopenmp is added, produced binary use RPATH instead RUNPATH. This is surprising.
Operating System
Ubuntu 24.04
CPU
doesn't matter
GPU
doesn't matter
ROCm Version
ROCm 6.0.0 is the oldest one I have. Also ROCm 10.0.0.
ROCm Component
No response
Steps to Reproduce
Using main.cpp
int main() {}
using rocm 7.14
yeluo@epyc-server:~$ clang++ -Wl,-rpath,/opt/rocm/core-7.14/lib/llvm/lib -fopenmp main.cpp && readelf -d ./a.out |grep PATH
0x000000000000000f (RPATH) Library rpath: [/opt/rocm/core-7.14/lib/llvm/lib:/opt/rocm/core-7.14/lib/llvm/lib]
yeluo@epyc-server:~$ clang++ -Wl,-rpath,/opt/rocm/core-7.14/lib/llvm/lib main.cpp && readelf -d ./a.out |grep PATH
0x000000000000001d (RUNPATH) Library runpath: [/opt/rocm/core-7.14/lib/llvm/lib]
upstream clang doesn't have this issue.
(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support
rocminfo --support output
Paste output here
Additional Information
No response
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the two clang++ commands from the issue with main.cpp and inspect the dynamic entries using readelf. Then trace AOMP's handling of -fopenmp and linker rpath options, comparing the output with and without that flag and against upstream clang. Done means -fopenmp no longer changes RUNPATH to RPATH or duplicates the path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100