Skip to content

[CMake] fix runpath for ELF platforms #541

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 11, 2020
Merged

Conversation

finagolfin
Copy link
Member

Remove the absolute path to the host stdlib for libswiftDispatch.so and add $ORIGIN to it and libdispatch.so.

Otherwise, you see the following in the current official release for linux:

> readelf -d swift-5.2.3-RELEASE-ubuntu18.04/usr/lib/swift/linux/lib*ispatch.so | ag "File:|runpath"
File: swift-5.2.3-RELEASE-ubuntu18.04/usr/lib/swift/linux/libdispatch.so
File: swift-5.2.3-RELEASE-ubuntu18.04/usr/lib/swift/linux/libswiftDispatch.so
0x000000000000001d (RUNPATH)            Library runpath: [/home/buildnode/jenkins/workspace/oss-swift-5.2-package-linux-ubuntu-18_04/build/buildbot_linux/swift-linux-x86_64/lib/swift/linux]

Remove the absolute path to the host stdlib for libswiftDispatch.so and add $ORIGIN
to it and libdispatch.so.
@finagolfin
Copy link
Member Author

@benlangmuir, you're one of two people to merge to this repo in the last 7 months, mind reviewing this tiny pull?

@benlangmuir benlangmuir requested a review from compnerd May 11, 2020 16:20
@benlangmuir
Copy link
Contributor

@compnerd mind reviewing the cmake changes?

This isn't a project I work on, so I'll try to find someone who can approve this.

@MadCoder
Copy link
Contributor

@swift-ci please test

Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that it’s better to use the CMake variable to control the default RPATH.

@finagolfin
Copy link
Member Author

Not sure what you mean, this pull does use the CMake INSTALL_RPATH variable.

@MadCoder MadCoder merged commit 1986f39 into swiftlang:master May 11, 2020
@finagolfin finagolfin deleted the rpath branch May 12, 2020 06:20
rokhinip pushed a commit that referenced this pull request Nov 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants