From 4b363d67d569d9e81dea053d258c0228bde02d0b Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Wed, 15 Jan 2025 11:34:09 +0100 Subject: [PATCH] Simplify logic for rpath, the comma syntax is supported by all compilers * From https://github.com/rbenv/ruby-build/pull/2496/files#r1915751424 --- bin/ruby-build | 7 +------ test/build.bats | 35 ++--------------------------------- 2 files changed, 3 insertions(+), 39 deletions(-) diff --git a/bin/ruby-build b/bin/ruby-build index cc515aeb58..e9aaeda15f 100755 --- a/bin/ruby-build +++ b/bin/ruby-build @@ -1216,12 +1216,7 @@ build_package_openssl() { # Help OpenSSL find its own shared libraries on Linux. if [ "$(uname -s)" = "Linux" ]; then - # shellcheck disable=SC2031 - 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" - fi + package_option openssl configure -Wl,-rpath,"$OPENSSL_PREFIX_PATH/lib" fi # Disable SSLv2 and Kerberos on older OpenSSL diff --git a/test/build.bats b/test/build.bats index 0275cd8954..63d80e8f15 100755 --- a/test/build.bats +++ b/test/build.bats @@ -378,9 +378,7 @@ OUT stub_repeated uname '-s : echo Linux' stub_repeated brew false - stub cc \ - '-xc -E - : echo "OpenSSL 1.0.1a 1 Aug 2023"' \ - '--version : echo gcc' + stub cc '-xc -E - : echo "OpenSSL 1.0.1a 1 Aug 2023"' stub openssl "version -d : echo 'OPENSSLDIR: \"${TMP}/ssl\"'" stub_make_install "install_sw" stub_make_install @@ -399,7 +397,7 @@ DEF unstub make assert_build_log <