Commit 359aaa8
authored
fix: patchelf LLVM runtime libs to fix stale RUNPATH after install (#67)
libc++.so.1 depends on libatomic.so.1 (NEEDED). After mcpp copies the
LLVM xpkg from xlings, the shared libraries retain xlings-era RUNPATH
entries that point to non-existent paths. Since ELF RUNPATH is
non-transitive, the loader uses libc++.so.1's own stale RUNPATH when
searching for libatomic.so.1, causing runtime failure on systems without
a system-installed gcc runtime.
Fix: run patchelf_walk() on the LLVM lib/ directory (not bin/) after
install, rewriting RUNPATH to point to the mcpp registry paths. This
mirrors the existing GCC post-install fixup. The bin/ directory is
excluded because clang++ has its own xlings-managed RUNPATH that must
be preserved.1 parent bb3d667 commit 359aaa8
1 file changed
Lines changed: 25 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3802 | 3802 | | |
3803 | 3803 | | |
3804 | 3804 | | |
3805 | | - | |
3806 | | - | |
3807 | | - | |
| 3805 | + | |
| 3806 | + | |
| 3807 | + | |
3808 | 3808 | | |
3809 | 3809 | | |
3810 | 3810 | | |
| |||
3822 | 3822 | | |
3823 | 3823 | | |
3824 | 3824 | | |
| 3825 | + | |
| 3826 | + | |
| 3827 | + | |
| 3828 | + | |
| 3829 | + | |
| 3830 | + | |
| 3831 | + | |
| 3832 | + | |
| 3833 | + | |
| 3834 | + | |
| 3835 | + | |
| 3836 | + | |
| 3837 | + | |
| 3838 | + | |
| 3839 | + | |
| 3840 | + | |
| 3841 | + | |
| 3842 | + | |
| 3843 | + | |
| 3844 | + | |
| 3845 | + | |
| 3846 | + | |
3825 | 3847 | | |
3826 | 3848 | | |
3827 | 3849 | | |
| |||
0 commit comments