Skip to content
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

Fix installing OpenSSL on non-Linux or with clang #2496

Merged
merged 1 commit into from
Jan 14, 2025
Merged

Conversation

mislav
Copy link
Member

@mislav mislav commented Jan 14, 2025

The recent rpath argument addition broke compilation of OpenSSL with clang since it seems expect this syntax (comma instead of "="):

-Wl,-rpath,<path>

Also, it doesn't seem that the rpath argument is necessary for any platform other than "Linux"; that is, we should skip passing it on BSD and macOS.

Thanks @jeremy #2493 (review)

The recent rpath argument addition broke compilation of OpenSSL with clang since
it seems expect this syntax (comma instead of "="):

    -Wl,-rpath,<path>

Also, it doesn't seem that the rpath argument is necessary for any platform other
than "Linux"; that is, we should skip passing it on BSD and macOS.
@mislav mislav requested a review from eregon January 14, 2025 22:37
@mislav mislav merged commit c80418d into master Jan 14, 2025
6 checks passed
@mislav mislav deleted the openssl-rpath-clang branch January 14, 2025 22:38
if [ "$CC" = "clang" ] || "${CC:-cc}" --version 2>&1 | grep -wq clang; then
package_option openssl configure -Wl,-rpath,"$OPENSSL_PREFIX_PATH/lib"
else
package_option openssl configure -Wl,-rpath="$OPENSSL_PREFIX_PATH/lib"
Copy link
Member

Choose a reason for hiding this comment

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

Can use the comma syntax -Wl,-rpath,"$OPENSSL_PREFIX_PATH/lib" for GCC as well (the commas are split into separate args to pass to the linker, giving ld -rpath … instead of ld -rpath=…) so we can drop the clang check.

Copy link
Member

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants