aboutsummaryrefslogtreecommitdiffstats
path: root/lang
diff options
context:
space:
mode:
authordumbbell <dumbbell@FreeBSD.org>2018-02-17 19:11:50 +0800
committerdumbbell <dumbbell@FreeBSD.org>2018-02-17 19:11:50 +0800
commit995dc3763b052fb721627edd1bd1b1ebd3040b11 (patch)
treee5bae88d561a236fa264d480fd930e9656b0af3d /lang
parentb09d7672b17a51509517560e982e61d97f7e5e62 (diff)
downloadfreebsd-ports-graphics-995dc3763b052fb721627edd1bd1b1ebd3040b11.tar.gz
freebsd-ports-graphics-995dc3763b052fb721627edd1bd1b1ebd3040b11.tar.zst
freebsd-ports-graphics-995dc3763b052fb721627edd1bd1b1ebd3040b11.zip
lang/rust: Grep `std-$hash.*.o` name from `libstd-*.rlib`
The suffix of that file changed in recent versions of Rust and it's changing again between Rust 1.23.0 and 1.24.0. So let's grep the filename from the list of files contained in the ar archive.
Diffstat (limited to 'lang')
-rw-r--r--lang/rust/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/lang/rust/Makefile b/lang/rust/Makefile
index cba513abc8f..c01d933f850 100644
--- a/lang/rust/Makefile
+++ b/lang/rust/Makefile
@@ -145,7 +145,7 @@ post-extract:
(set -ex; cd ${WRKSRC}; \
libstd="$$(echo "${RUST_STD_DIR}/rust-std-${RUST_TARGET}/lib/rustlib/${RUST_TARGET}/lib/"libstd-*.rlib)"; \
hash="$$(basename "$$libstd" .rlib | ${SED} 's/^libstd-//')"; \
- std_o="std-$$hash.std0.rust-cgu.o"; \
+ std_o="$$(${AR} t "$$libstd" | ${GREP} -E "^std-$$hash.*\.o$$")"; \
${AR} x "$$libstd" "$$std_o"; \
${LD} -r -o std.xx.o "$$std_o" old_fstat.o; \
${MV} std.xx.o "$$std_o"; \