setuptools
setuptools copied to clipboard
GNU: use -Wl,-rpath,<dir> instead of -Wl,-R<dir>
Closes #4060
Summary of changes
Use -rpath instead of -R when using binutils.
The latter is supported in binutils for backwards compatibility, but in
general -R<path> is equivalent to --just-symbols=<path> when path
is a file; only when it's a directory, it's treated as -rpath=<path>.
Better avoid that ambiguity and use -rpath.
Also split -Wl,--enable-new-dtags and -Wl,-rpath,... into two
separate arguments, which is more common, and more likely to be parsed
correctly by compiler wrappers.
This commit does not attempt to add --enable-new-dtags to other
linkers than binutils ld/gold that support the flag.
Pull Request Checklist
- [x] Changes have tests
- [x] News fragment added in [
newsfragments/].
Hi @haampie, thank you very much for the contribution!
setuptools currently "bundles" the setuptools/_distutils directoty directly from https://github.com/pypa/distutils (only adding a MetaPathFinder around it). Therefore we cannot accept changes on that directory directly in this repo.
If you want the code in that path to be changes, maybe it is better to discuss directly with the https://github.com/pypa/distutils maintainers and propose a PR there? Once the changes are added, pypa/distutils is pulled in the setuptools repo.
Thanks, opened https://github.com/pypa/distutils/pull/214
Looks like there is no activity in distutils though.
We have to wait for the distutils maintainers to have the time to look into it, I don't think there is a way around that...
Looks like this was merged in distutils. Is this PR still relevant?
Thank you for the reminder @Avasam. If it is merged into distutils, it will be incorporated soon in setuptools.