Commit 0336e66
committed
depfixer: don't invoke install_name_tool on non-darwin targets
fix_rpath() fell through to the install_name_tool/otool path whenever
a file wasn't valid ELF, regardless of target system.
detect_elf_type() exits 0 for any non-ELF file, and that exit was caught and treated as "try darwin fixup" unconditionally.
On a non-darwin system with install_name_tool on PATH
(e.g. darwin cross-toolchain installed alongside), this ran otool/install_name_tool against native binaries.
Gate the darwin-only path on system == 'darwin'.
Fixes #80271 parent 16fe37e commit 0336e66
2 files changed
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
832 | 832 | | |
833 | 833 | | |
834 | 834 | | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
835 | 838 | | |
836 | 839 | | |
837 | 840 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
2233 | 2234 | | |
2234 | 2235 | | |
2235 | 2236 | | |
| 2237 | + | |
| 2238 | + | |
| 2239 | + | |
| 2240 | + | |
| 2241 | + | |
| 2242 | + | |
| 2243 | + | |
| 2244 | + | |
| 2245 | + | |
| 2246 | + | |
0 commit comments