rust: on Darwin, use proper shared library name instead of @rpathdiff -r1.113 -r1.114 pkgsrc/lang/rust/Makefile
(adam)
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: Makefile,v 1.113 2019/08/29 14:09:56 he Exp $ | 1 | # $NetBSD: Makefile,v 1.114 2019/09/09 16:19:49 adam Exp $ | |
2 | 2 | |||
3 | DISTNAME= rustc-1.37.0-src | 3 | DISTNAME= rustc-1.37.0-src | |
4 | PKGNAME= ${DISTNAME:S/rustc/rust/:S/-src//} | 4 | PKGNAME= ${DISTNAME:S/rustc/rust/:S/-src//} | |
5 | CATEGORIES= lang | 5 | CATEGORIES= lang | |
6 | MASTER_SITES= http://static.rust-lang.org/dist/ | 6 | MASTER_SITES= http://static.rust-lang.org/dist/ | |
7 | 7 | |||
8 | MAINTAINER= pkgsrc-users@NetBSD.org | 8 | MAINTAINER= pkgsrc-users@NetBSD.org | |
9 | HOMEPAGE= https://www.rust-lang.org/ | 9 | HOMEPAGE= https://www.rust-lang.org/ | |
10 | COMMENT= Safe, concurrent, practical language | 10 | COMMENT= Safe, concurrent, practical language | |
11 | LICENSE= mit OR apache-2.0 | 11 | LICENSE= mit OR apache-2.0 | |
12 | 12 | |||
13 | USE_GCC_RUNTIME= yes | 13 | USE_GCC_RUNTIME= yes | |
14 | USE_LANGUAGES= c c++11 | 14 | USE_LANGUAGES= c c++11 | |
@@ -267,26 +267,28 @@ NOT_FOR_PLATFORM+= ${MACHINE_PLATFORM} | @@ -267,26 +267,28 @@ NOT_FOR_PLATFORM+= ${MACHINE_PLATFORM} | |||
267 | .else | 267 | .else | |
268 | RUST_BOOTSTRAP_PATH?= ${WRKDIR}/rust-bootstrap | 268 | RUST_BOOTSTRAP_PATH?= ${WRKDIR}/rust-bootstrap | |
269 | .endif | 269 | .endif | |
270 | 270 | |||
271 | .if ${OPSYS} == "SunOS" | 271 | .if ${OPSYS} == "SunOS" | |
272 | BUILD_DEPENDS+= coreutils>=0:../../sysutils/coreutils | 272 | BUILD_DEPENDS+= coreutils>=0:../../sysutils/coreutils | |
273 | TOOLS_CREATE+= md5sum | 273 | TOOLS_CREATE+= md5sum | |
274 | TOOLS_PATH.md5sum= ${PREFIX}/bin/gmd5sum | 274 | TOOLS_PATH.md5sum= ${PREFIX}/bin/gmd5sum | |
275 | .endif | 275 | .endif | |
276 | 276 | |||
277 | SUBST_CLASSES+= rpath | 277 | SUBST_CLASSES+= rpath | |
278 | SUBST_STAGE.rpath= pre-configure | 278 | SUBST_STAGE.rpath= pre-configure | |
279 | SUBST_FILES.rpath= src/bootstrap/bin/rustc.rs | 279 | SUBST_FILES.rpath= src/bootstrap/bin/rustc.rs | |
280 | SUBST_FILES.rpath+= src/build_helper/lib.rs | |||
281 | SUBST_FILES.rpath+= src/librustc_codegen_ssa/back/linker.rs | |||
280 | SUBST_VARS.rpath= PREFIX | 282 | SUBST_VARS.rpath= PREFIX | |
281 | 283 | |||
282 | post-extract: | 284 | post-extract: | |
283 | set -e; \ | 285 | set -e; \ | |
284 | if ${TEST} -e ${WRKDIR}/rust-${RUST_STAGE0_VER}-${RUST_ARCH}/install.sh \ | 286 | if ${TEST} -e ${WRKDIR}/rust-${RUST_STAGE0_VER}-${RUST_ARCH}/install.sh \ | |
285 | -a ! -e ${RUST_BOOTSTRAP_PATH}/bin/rustc; then \ | 287 | -a ! -e ${RUST_BOOTSTRAP_PATH}/bin/rustc; then \ | |
286 | cd ${WRKDIR}/rust-${RUST_STAGE0_VER}-${RUST_ARCH}; \ | 288 | cd ${WRKDIR}/rust-${RUST_STAGE0_VER}-${RUST_ARCH}; \ | |
287 | ${TOOLS_BASH} ./install.sh --prefix=${RUST_BOOTSTRAP_PATH}; \ | 289 | ${TOOLS_BASH} ./install.sh --prefix=${RUST_BOOTSTRAP_PATH}; \ | |
288 | cd ${WRKDIR}/rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}; \ | 290 | cd ${WRKDIR}/rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}; \ | |
289 | ${TOOLS_BASH} ./install.sh --prefix=${RUST_BOOTSTRAP_PATH}; \ | 291 | ${TOOLS_BASH} ./install.sh --prefix=${RUST_BOOTSTRAP_PATH}; \ | |
290 | fi | 292 | fi | |
291 | # patch(1) in NetBSD does not handle .cargo-checksum.json like long width file. | 293 | # patch(1) in NetBSD does not handle .cargo-checksum.json like long width file. | |
292 | ${CP} ${WRKSRC}/vendor/rand/.cargo-checksum.json \ | 294 | ${CP} ${WRKSRC}/vendor/rand/.cargo-checksum.json \ | |
@@ -329,54 +331,26 @@ pre-build: pre-build-fix | @@ -329,54 +331,26 @@ pre-build: pre-build-fix | |||
329 | do-build: | 331 | do-build: | |
330 | cd ${WRKSRC} \ | 332 | cd ${WRKSRC} \ | |
331 | && ${SETENV} ${MAKE_ENV} \ | 333 | && ${SETENV} ${MAKE_ENV} \ | |
332 | ${PYTHONBIN} ./x.py -v ${BUILD_TARGET} -j ${MAKE_JOBS:U1} | 334 | ${PYTHONBIN} ./x.py -v ${BUILD_TARGET} -j ${MAKE_JOBS:U1} | |
333 | 335 | |||
334 | do-install: | 336 | do-install: | |
335 | cd ${WRKSRC} \ | 337 | cd ${WRKSRC} \ | |
336 | && ${SETENV} ${MAKE_ENV} ${INSTALL_ENV} \ | 338 | && ${SETENV} ${MAKE_ENV} ${INSTALL_ENV} \ | |
337 | ${PYTHONBIN} ./x.py -v install -j ${MAKE_JOBS:U1} | 339 | ${PYTHONBIN} ./x.py -v install -j ${MAKE_JOBS:U1} | |
338 | 340 | |||
339 | GENERATE_PLIST+=find ${DESTDIR}${PREFIX} \( -type f -o -type l \) -print | \ | 341 | GENERATE_PLIST+=find ${DESTDIR}${PREFIX} \( -type f -o -type l \) -print | \ | |
340 | sed 's,${DESTDIR}${PREFIX}/,,' | ${SORT} ; | 342 | sed 's,${DESTDIR}${PREFIX}/,,' | ${SORT} ; | |
341 | 343 | |||
342 | .if ${OPSYS} == "Darwin" | |||
343 | LDFLAGS+= -headerpad_max_install_names | |||
344 | ||||
345 | .PHONY: fix-darwin-install-name | |||
346 | post-install: fix-darwin-install-name | |||
347 | fix-darwin-install-name: | |||
348 | . for bin in cargo-miri clippy-driver miri rls rustc rustdoc | |||
349 | otool -XL ${DESTDIR}${PREFIX}/bin/${bin} \ | |||
350 | | ${GREP} '@rpath' | while read rpath rest; do \ | |||
351 | install_name_tool -change $$rpath \ | |||
352 | `${ECHO} $$rpath | ${SED} -e 's,@rpath,${PREFIX}/lib,g'` \ | |||
353 | ${DESTDIR}${PREFIX}/bin/${bin}; \ | |||
354 | done | |||
355 | . endfor | |||
356 | . for libdir in lib lib/rustlib/${RUST_ARCH}/lib lib/rustlib/${RUST_ARCH}/codegen-backends | |||
357 | for f in ${DESTDIR}${PREFIX}/${libdir}/lib*.dylib; do \ | |||
358 | [ ! -f $$f ] && continue; \ | |||
359 | install_name_tool -id `${ECHO} $$f | ${SED} -e 's,${DESTDIR},,g'` $$f; \ | |||
360 | otool -XL $$f | grep '@rpath' | while read rpath rest; do \ | |||
361 | install_name_tool -change $$rpath \ | |||
362 | `${ECHO} $$rpath | ${SED} -e 's,@rpath,${PREFIX}/lib,g'` \ | |||
363 | $$f; \ | |||
364 | done; \ | |||
365 | done | |||
366 | . endfor | |||
367 | .endif | |||
368 | ||||
369 | # | |||
370 | # Create a relocatable stage2 bootstrap from the bits we just built that can be | 344 | # Create a relocatable stage2 bootstrap from the bits we just built that can be | |
371 | # used to build the next version of rust. Currently only tested on SmartOS. | 345 | # used to build the next version of rust. Currently only tested on SmartOS. | |
372 | # | 346 | # | |
373 | BOOTSTRAP_TMPDIR= ${WRKDIR}/${PKGNAME_NOREV}-${RUST_ARCH} | 347 | BOOTSTRAP_TMPDIR= ${WRKDIR}/${PKGNAME_NOREV}-${RUST_ARCH} | |
374 | USE_TOOLS+= gtar | 348 | USE_TOOLS+= gtar | |
375 | 349 | |||
376 | # The NetBSD part is so far untested, because I could not convince | 350 | # The NetBSD part is so far untested, because I could not convince | |
377 | # the rust build to use the gcc wrapper when building natively, | 351 | # the rust build to use the gcc wrapper when building natively, | |
378 | # so that I could get a placeholder in the RPATH, because chrpath | 352 | # so that I could get a placeholder in the RPATH, because chrpath | |
379 | # cannot extend the length of the RPATH... | 353 | # cannot extend the length of the RPATH... | |
380 | 354 | |||
381 | stage0-bootstrap: install | 355 | stage0-bootstrap: install | |
382 | ${RM} -rf ${BOOTSTRAP_TMPDIR} | 356 | ${RM} -rf ${BOOTSTRAP_TMPDIR} |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | $NetBSD: distinfo,v 1.85 2019/08/29 14:09:56 he Exp $ | 1 | $NetBSD: distinfo,v 1.86 2019/09/09 16:19:49 adam Exp $ | |
2 | 2 | |||
3 | SHA1 (rust-1.35.0-armv7-unknown-netbsd-eabihf.tar.gz) = 91517fa95f954427c627cf63eb7c518abd068f3e | 3 | SHA1 (rust-1.35.0-armv7-unknown-netbsd-eabihf.tar.gz) = 91517fa95f954427c627cf63eb7c518abd068f3e | |
4 | RMD160 (rust-1.35.0-armv7-unknown-netbsd-eabihf.tar.gz) = 06a3d922b27aac2deb570301542897a131b47cd0 | 4 | RMD160 (rust-1.35.0-armv7-unknown-netbsd-eabihf.tar.gz) = 06a3d922b27aac2deb570301542897a131b47cd0 | |
5 | SHA512 (rust-1.35.0-armv7-unknown-netbsd-eabihf.tar.gz) = 27f7fb0e4a4522b24f04c7f6b578c8717908978ab485c525adbc95716860a958f2c42d4148d81fd41ab0e593d3baae6a1ffc6767ed24879df7c2aa6d8bf14683 | 5 | SHA512 (rust-1.35.0-armv7-unknown-netbsd-eabihf.tar.gz) = 27f7fb0e4a4522b24f04c7f6b578c8717908978ab485c525adbc95716860a958f2c42d4148d81fd41ab0e593d3baae6a1ffc6767ed24879df7c2aa6d8bf14683 | |
6 | Size (rust-1.35.0-armv7-unknown-netbsd-eabihf.tar.gz) = 243045630 bytes | 6 | Size (rust-1.35.0-armv7-unknown-netbsd-eabihf.tar.gz) = 243045630 bytes | |
7 | SHA1 (rust-1.36.0-aarch64-unknown-netbsd.tar.gz) = b63419009504736fe16f7ace926e9744f3e5ed4f | 7 | SHA1 (rust-1.36.0-aarch64-unknown-netbsd.tar.gz) = b63419009504736fe16f7ace926e9744f3e5ed4f | |
8 | RMD160 (rust-1.36.0-aarch64-unknown-netbsd.tar.gz) = 75e39167819302d75d4343e73dee2041fb6ea226 | 8 | RMD160 (rust-1.36.0-aarch64-unknown-netbsd.tar.gz) = 75e39167819302d75d4343e73dee2041fb6ea226 | |
9 | SHA512 (rust-1.36.0-aarch64-unknown-netbsd.tar.gz) = 5ce8b7d6ef99109b5988e4dd8d5c93af467cad9ec32897576cb17e68cd18ce7a5a690415d63bff0ae324c0e43727e8d1cd8b68c2e687b1aa6dbad23187ea2dac | 9 | SHA512 (rust-1.36.0-aarch64-unknown-netbsd.tar.gz) = 5ce8b7d6ef99109b5988e4dd8d5c93af467cad9ec32897576cb17e68cd18ce7a5a690415d63bff0ae324c0e43727e8d1cd8b68c2e687b1aa6dbad23187ea2dac | |
10 | Size (rust-1.36.0-aarch64-unknown-netbsd.tar.gz) = 248524909 bytes | 10 | Size (rust-1.36.0-aarch64-unknown-netbsd.tar.gz) = 248524909 bytes | |
11 | SHA1 (rust-1.36.0-i686-apple-darwin.tar.gz) = 7e45ab4c622b711dd50c8a30721bc4791c86da15 | 11 | SHA1 (rust-1.36.0-i686-apple-darwin.tar.gz) = 7e45ab4c622b711dd50c8a30721bc4791c86da15 | |
12 | RMD160 (rust-1.36.0-i686-apple-darwin.tar.gz) = e983ae2e9c98fd58f900ec08c0357422613476e6 | 12 | RMD160 (rust-1.36.0-i686-apple-darwin.tar.gz) = e983ae2e9c98fd58f900ec08c0357422613476e6 | |
13 | SHA512 (rust-1.36.0-i686-apple-darwin.tar.gz) = bd79c5be2ce027a9bcd4870921b8b505a432d1e47f6b48afed0023f35eff2abb1b569741428f1a5b9d1154a3da6d72b8349b03a73a82a1b667fc1f6754da3681 | 13 | SHA512 (rust-1.36.0-i686-apple-darwin.tar.gz) = bd79c5be2ce027a9bcd4870921b8b505a432d1e47f6b48afed0023f35eff2abb1b569741428f1a5b9d1154a3da6d72b8349b03a73a82a1b667fc1f6754da3681 | |
14 | Size (rust-1.36.0-i686-apple-darwin.tar.gz) = 257426824 bytes | 14 | Size (rust-1.36.0-i686-apple-darwin.tar.gz) = 257426824 bytes | |
@@ -98,26 +98,28 @@ SHA512 (rust-std-1.36.0-x86_64-unknown-l | @@ -98,26 +98,28 @@ SHA512 (rust-std-1.36.0-x86_64-unknown-l | |||
98 | Size (rust-std-1.36.0-x86_64-unknown-linux-gnu.tar.gz) = 82504317 bytes | 98 | Size (rust-std-1.36.0-x86_64-unknown-linux-gnu.tar.gz) = 82504317 bytes | |
99 | SHA1 (rust-std-1.36.0-x86_64-unknown-netbsd.tar.gz) = 380b1d61f614bbb3995439d01c0177dd57b4fa99 | 99 | SHA1 (rust-std-1.36.0-x86_64-unknown-netbsd.tar.gz) = 380b1d61f614bbb3995439d01c0177dd57b4fa99 | |
100 | RMD160 (rust-std-1.36.0-x86_64-unknown-netbsd.tar.gz) = f88455fb6aab546e6879cff2fcc470c81b4a1917 | 100 | RMD160 (rust-std-1.36.0-x86_64-unknown-netbsd.tar.gz) = f88455fb6aab546e6879cff2fcc470c81b4a1917 | |
101 | SHA512 (rust-std-1.36.0-x86_64-unknown-netbsd.tar.gz) = e083f3142e76ed56598f9122ba4dbcd3d11aaee677696efe19e11919e9642a65e42dde3a5c4504f8b9d39b1607a4af46181ee2afc16f390d54fe64e0bb4fb68e | 101 | SHA512 (rust-std-1.36.0-x86_64-unknown-netbsd.tar.gz) = e083f3142e76ed56598f9122ba4dbcd3d11aaee677696efe19e11919e9642a65e42dde3a5c4504f8b9d39b1607a4af46181ee2afc16f390d54fe64e0bb4fb68e | |
102 | Size (rust-std-1.36.0-x86_64-unknown-netbsd.tar.gz) = 86938880 bytes | 102 | Size (rust-std-1.36.0-x86_64-unknown-netbsd.tar.gz) = 86938880 bytes | |
103 | SHA1 (rustc-1.37.0-src.tar.gz) = 8613fc28896b2f0d6d8770ea52ce54804ca751df | 103 | SHA1 (rustc-1.37.0-src.tar.gz) = 8613fc28896b2f0d6d8770ea52ce54804ca751df | |
104 | RMD160 (rustc-1.37.0-src.tar.gz) = 13355233d894bad13fd6b63277a72f81f9a25ff0 | 104 | RMD160 (rustc-1.37.0-src.tar.gz) = 13355233d894bad13fd6b63277a72f81f9a25ff0 | |
105 | SHA512 (rustc-1.37.0-src.tar.gz) = d75dd3b664f4467750b93786126051f8a1d33e24823951bbe2a56b2c1f6c829c35dcfb7dbce2f98c5de212d882ab8bccdd99bb57facdb4bc1870eb81de824d74 | 105 | SHA512 (rustc-1.37.0-src.tar.gz) = d75dd3b664f4467750b93786126051f8a1d33e24823951bbe2a56b2c1f6c829c35dcfb7dbce2f98c5de212d882ab8bccdd99bb57facdb4bc1870eb81de824d74 | |
106 | Size (rustc-1.37.0-src.tar.gz) = 154114925 bytes | 106 | Size (rustc-1.37.0-src.tar.gz) = 154114925 bytes | |
107 | SHA1 (patch-src_bootstrap_bin_rustc.rs) = 5e6b0cb25401db4fef6e74f73764e69f3c09569c | 107 | SHA1 (patch-src_bootstrap_bin_rustc.rs) = 5e6b0cb25401db4fef6e74f73764e69f3c09569c | |
108 | SHA1 (patch-src_bootstrap_bootstrap.py) = 5b886b95857bf019c2e37cb380e6905cb444b756 | 108 | SHA1 (patch-src_bootstrap_bootstrap.py) = 5b886b95857bf019c2e37cb380e6905cb444b756 | |
109 | SHA1 (patch-src_bootstrap_builder.rs) = 7e23348dc5555fdb3833a7f8734cfe687c6e533c | 109 | SHA1 (patch-src_bootstrap_builder.rs) = 7e23348dc5555fdb3833a7f8734cfe687c6e533c | |
110 | SHA1 (patch-src_bootstrap_lib.rs) = bc23743f1b9c4ad3d7557b4fdf8a55976ca7f417 | 110 | SHA1 (patch-src_bootstrap_lib.rs) = bc23743f1b9c4ad3d7557b4fdf8a55976ca7f417 | |
111 | SHA1 (patch-src_build__helper_lib.rs) = ef0b522e303f0490b86e64f40733c2ecb498da5b | |||
112 | SHA1 (patch-src_librustc__codegen__ssa_back_linker.rs) = e7c592f78b9ee317521cf0258686173a31f1d2e0 | |||
111 | SHA1 (patch-src_librustc__llvm_build.rs) = d6e71891eb8d42a9c4175505ba7ed98338153860 | 113 | SHA1 (patch-src_librustc__llvm_build.rs) = d6e71891eb8d42a9c4175505ba7ed98338153860 | |
112 | SHA1 (patch-src_librustc__target_spec_solaris__base.rs) = 21db8af802edecb5e35ce78ee9af7c4935b4040f | 114 | SHA1 (patch-src_librustc__target_spec_solaris__base.rs) = 21db8af802edecb5e35ce78ee9af7c4935b4040f | |
113 | SHA1 (patch-src_librustc__target_spec_x86__64__sun__solaris.rs) = f6ad33b41906bbf83a1cbd0e2fe13a4da37266fa | 115 | SHA1 (patch-src_librustc__target_spec_x86__64__sun__solaris.rs) = f6ad33b41906bbf83a1cbd0e2fe13a4da37266fa | |
114 | SHA1 (patch-src_libstd_build.rs) = aa7020339ccc2888d1302721e1a38f7a4e0925a3 | 116 | SHA1 (patch-src_libstd_build.rs) = aa7020339ccc2888d1302721e1a38f7a4e0925a3 | |
115 | SHA1 (patch-src_libstd_sys_unix_thread.rs) = 2554f1a42afaa0ddce5053860f4dabecdf6c527a | 117 | SHA1 (patch-src_libstd_sys_unix_thread.rs) = 2554f1a42afaa0ddce5053860f4dabecdf6c527a | |
116 | SHA1 (patch-src_libunwind_build.rs) = c0a0aa9749705be07afe8eaaa0c7d70affa46566 | 118 | SHA1 (patch-src_libunwind_build.rs) = c0a0aa9749705be07afe8eaaa0c7d70affa46566 | |
117 | SHA1 (patch-src_llvm-project_llvm_CMakeLists.txt) = d49503d19c30a64d571eb7fa79e7aad7038cd427 | 119 | SHA1 (patch-src_llvm-project_llvm_CMakeLists.txt) = d49503d19c30a64d571eb7fa79e7aad7038cd427 | |
118 | SHA1 (patch-src_llvm-project_llvm_cmake_modules_AddLLVM.cmake) = 19daf5f8a26bfaebca942b5cbe8521fb060fe8d9 | 120 | SHA1 (patch-src_llvm-project_llvm_cmake_modules_AddLLVM.cmake) = 19daf5f8a26bfaebca942b5cbe8521fb060fe8d9 | |
119 | SHA1 (patch-src_llvm-project_llvm_include_llvm-c_DataTypes.h) = 7588a46aaa277ef04b33ac6d904b9d1d81579f2a | 121 | SHA1 (patch-src_llvm-project_llvm_include_llvm-c_DataTypes.h) = 7588a46aaa277ef04b33ac6d904b9d1d81579f2a | |
120 | SHA1 (patch-src_llvm-project_llvm_include_llvm_Analysis_ConstantFolding.h) = 977de4b2a9d37f7e7c782f2407c15591e032b6c6 | 122 | SHA1 (patch-src_llvm-project_llvm_include_llvm_Analysis_ConstantFolding.h) = 977de4b2a9d37f7e7c782f2407c15591e032b6c6 | |
121 | SHA1 (patch-src_llvm-project_llvm_lib_Support_Unix_Signals.inc) = 4639febcf009bde6256695060b4c8cce3b327082 | 123 | SHA1 (patch-src_llvm-project_llvm_lib_Support_Unix_Signals.inc) = 4639febcf009bde6256695060b4c8cce3b327082 | |
122 | SHA1 (patch-src_llvm-project_llvm_utils_FileCheck_FileCheck.cpp) = 498395d1ae5b791b9e4710a856fdebe2fb87011e | 124 | SHA1 (patch-src_llvm-project_llvm_utils_FileCheck_FileCheck.cpp) = 498395d1ae5b791b9e4710a856fdebe2fb87011e | |
123 | SHA1 (patch-src_tools_cargo_src_cargo_core_profiles.rs) = 3aac5d54a6fe96b9559552e67e497488142d4e80 | 125 | SHA1 (patch-src_tools_cargo_src_cargo_core_profiles.rs) = 3aac5d54a6fe96b9559552e67e497488142d4e80 |
@@ -1,17 +1,17 @@ | @@ -1,17 +1,17 @@ | |||
1 | # $NetBSD: options.mk,v 1.4 2019/08/27 17:23:48 schmonz Exp $ | 1 | # $NetBSD: options.mk,v 1.5 2019/09/09 16:19:49 adam Exp $ | |
2 | 2 | |||
3 | PKG_OPTIONS_VAR= PKG_OPTIONS.rust | 3 | PKG_OPTIONS_VAR= PKG_OPTIONS.rust | |
4 | PKG_SUPPORTED_OPTIONS= | 4 | PKG_SUPPORTED_OPTIONS= # empty | |
5 | 5 | |||
6 | .include "../../mk/bsd.fast.prefs.mk" | 6 | .include "../../mk/bsd.fast.prefs.mk" | |
7 | 7 | |||
8 | # The bundled LLVM current has issues building on SunOS. | 8 | # The bundled LLVM current has issues building on SunOS. | |
9 | .if ${OPSYS} != "SunOS" && ${OPSYS} != "Darwin" | 9 | .if ${OPSYS} != "SunOS" && ${OPSYS} != "Darwin" | |
10 | PKG_SUPPORTED_OPTIONS+= rust-llvm | 10 | PKG_SUPPORTED_OPTIONS+= rust-llvm | |
11 | # There may be compatibility issues with base LLVM. | 11 | # There may be compatibility issues with base LLVM. | |
12 | . if !empty(HAVE_LLVM) | 12 | . if !empty(HAVE_LLVM) | |
13 | PKG_SUGGESTED_OPTIONS+= rust-llvm | 13 | PKG_SUGGESTED_OPTIONS+= rust-llvm | |
14 | . endif | 14 | . endif | |
15 | .endif | 15 | .endif | |
16 | 16 | |||
17 | .include "../../mk/bsd.options.mk" | 17 | .include "../../mk/bsd.options.mk" |
$NetBSD: patch-src_build__helper_lib.rs,v 1.1 2019/09/09 16:19:49 adam Exp $
On Darwin, do not use @rpath for internal libraries.
--- src/build_helper/lib.rs.orig 2019-09-06 11:17:24.000000000 +0000
+++ src/build_helper/lib.rs
@@ -212,7 +212,7 @@ impl NativeLibBoilerplate {
fs::rename(&src, &dst).unwrap();
let status = Command::new("install_name_tool")
.arg("-id")
- .arg(format!("@rpath/{}", new_name))
+ .arg(format!("@PREFIX@/lib/{}", new_name))
.arg(&dst)
.status()
.expect("failed to execute `install_name_tool`");
$NetBSD: patch-src_librustc__codegen__ssa_back_linker.rs,v 1.1 2019/09/09 16:19:49 adam Exp $
Do not use @rpath on Darwin.
--- src/librustc_codegen_ssa/back/linker.rs.orig 2019-09-06 11:20:11.000000000 +0000
+++ src/librustc_codegen_ssa/back/linker.rs
@@ -362,7 +362,7 @@ impl<'a> Linker for GccLinker<'a> {
// the right `-Wl,-install_name` with an `@rpath` in it.
if self.sess.opts.cg.rpath || self.sess.opts.debugging_opts.osx_rpath_install_name {
self.linker_arg("-install_name");
- let mut v = OsString::from("@rpath/");
+ let mut v = OsString::from("@PREFIX@/lib/");
v.push(out_filename.file_name().unwrap());
self.linker_arg(&v);
}