aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/include/powerpc64-linux-gnu
diff options
context:
space:
mode:
authorIsaac Freund <mail@isaacfreund.com>2025-01-29 14:11:23 +0100
committerIsaac Freund <mail@isaacfreund.com>2025-02-10 23:19:48 +0100
commit819716b59f941253ae98405bb4b30049aea5f8de (patch)
tree0e501e960750e089393647b4bf74a518b18cda61 /lib/libc/include/powerpc64-linux-gnu
parent34644511bb6d83aa6575641ef79e5eefb495e3e1 (diff)
downloadzig-819716b59f941253ae98405bb4b30049aea5f8de.tar.gz
zig-819716b59f941253ae98405bb4b30049aea5f8de.zip
link: fix ambiguous names in linker scripts
Currently zig fails to build while linking the system LLVM/C++ libraries on my Chimera Linux system due to the fact that libc++.so is a linker script with the following contents: INPUT(libc++.so.1 -lc++abi -lunwind) Prior to this commit, zig would try to convert "ambiguous names" in linker scripts such as libc++.so.1 in this example into -lfoo style flags. This fails in this case due to the so version number as zig checks for exactly the .so suffix. Furthermore, I do not think that this conversion is semantically correct since converting libfoo.so to -lfoo could theoretically end up resulting in libfoo.a getting linked which seems wrong when a different file is specified in the linker script. With this patch, this attempted conversion is removed. Instead, zig always first checks if the exact file/path in the linker script exists relative to the current working directory. If the file is classified as a library (including versioned shared objects such as libfoo.so.1), zig then falls back to checking if the exact file/path in the linker script exists relative to each directory in the library search path, selecting the first match or erroring out if none is found. This behavior fixes the regression that prevents building zig while linking the system LLVM/C++ libraries on Chimera Linux.
Diffstat (limited to 'lib/libc/include/powerpc64-linux-gnu')
0 files changed, 0 insertions, 0 deletions