diff --git a/deps/libgit2.mk b/deps/libgit2.mk index c98528e52ae844..0547d2eb02ee5c 100644 --- a/deps/libgit2.mk +++ b/deps/libgit2.mk @@ -37,10 +37,7 @@ LIBGIT2_OPTS += -DCURL_INCLUDE_DIRS=$(build_includedir) -DCURL_LIBRARIES="-L$(bu endif ifeq ($(OS),Linux) -LIBGIT2_OPTS += -DUSE_OPENSSL=OFF -DUSE_MBEDTLS=ON -DCMAKE_INSTALL_RPATH="\$$ORIGIN" -endif -ifeq ($(OS),FreeBSD) -LIBGIT2_OPTS += -DCMAKE_INSTALL_RPATH="\$$ORIGIN" +LIBGIT2_OPTS += -DUSE_OPENSSL=OFF -DUSE_MBEDTLS=ON endif # We need to bundle ca certs on linux now that we're using libgit2 with ssl diff --git a/deps/libssh2.mk b/deps/libssh2.mk index e0f91a1b6f21f9..ea77379988ac09 100644 --- a/deps/libssh2.mk +++ b/deps/libssh2.mk @@ -20,10 +20,6 @@ else LIBSSH2_OPTS += -DCRYPTO_BACKEND=mbedTLS -DENABLE_ZLIB_COMPRESSION=OFF endif -ifneq (,$(findstring $(OS),Linux FreeBSD)) -LIBSSH2_OPTS += -DCMAKE_INSTALL_RPATH="\$$ORIGIN" -endif - $(SRCDIR)/srccache/$(LIBSSH2_SRC_DIR)/libssh2-encryptedpem.patch-applied: $(SRCDIR)/srccache/$(LIBSSH2_SRC_DIR)/source-extracted cd $(SRCDIR)/srccache/$(LIBSSH2_SRC_DIR) && patch -p1 -f < $(SRCDIR)/patches/libssh2-encryptedpem.patch echo 1 > $@ diff --git a/deps/mbedtls.mk b/deps/mbedtls.mk index 894551a7909274..9ebc0c071dbdd4 100644 --- a/deps/mbedtls.mk +++ b/deps/mbedtls.mk @@ -15,10 +15,6 @@ ifeq ($(BUILD_OS),WINNT) MBEDTLS_OPTS += -G"MSYS Makefiles" endif -ifneq (,$(findstring $(OS),Linux FreeBSD)) -MBEDTLS_OPTS += -DCMAKE_INSTALL_RPATH="\$$ORIGIN" -endif - $(SRCDIR)/srccache/$(MBEDTLS_SRC).tgz: | $(SRCDIR)/srccache $(JLDOWNLOAD) $@ $(MBEDTLS_URL) diff --git a/deps/tools/common.mk b/deps/tools/common.mk index 687be418613a58..37952a86d31c5d 100644 --- a/deps/tools/common.mk +++ b/deps/tools/common.mk @@ -40,14 +40,16 @@ CMAKE_COMMON += -DCMAKE_RC_COMPILER="$$(which $(CROSS_COMPILE)windres)" endif endif -# NOTE: Do not make RPATH changes in CMAKE_COMMON on platforms other than FreeBSD, since -# it will make its way into the LLVM build flags, and LLVM is picky about RPATH (though -# apparently not on FreeBSD). Ref PR #22352 +ifneq (,$(findstring $(OS),Linux FreeBSD)) +INSTALL_RPATH := "\$$ORIGIN" +# Part of the FreeBSD libgcc_s kludge ifeq ($(OS),FreeBSD) ifneq ($(GCCPATH),) -CMAKE_COMMON += -DCMAKE_INSTALL_RPATH="\$$ORIGIN:$(GCCPATH)" +INSTALL_RPATH := "\$$ORIGIN:$(GCCPATH)" endif endif +CMAKE_COMMON += -DCMAKE_INSTALL_RPATH=$(INSTALL_RPATH) +endif # Linux or FreeBSD # For now this is LLVM specific, but I expect it won't be in the future ifeq ($(CMAKE_GENERATOR),Ninja)