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.
This commit is contained in:
parent
45fbd7baa5
commit
ea45925117
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=462096
1 changed files with 1 additions and 1 deletions
|
@ -145,7 +145,7 @@ post-extract:
|
||||||
(set -ex; cd ${WRKSRC}; \
|
(set -ex; cd ${WRKSRC}; \
|
||||||
libstd="$$(echo "${RUST_STD_DIR}/rust-std-${RUST_TARGET}/lib/rustlib/${RUST_TARGET}/lib/"libstd-*.rlib)"; \
|
libstd="$$(echo "${RUST_STD_DIR}/rust-std-${RUST_TARGET}/lib/rustlib/${RUST_TARGET}/lib/"libstd-*.rlib)"; \
|
||||||
hash="$$(basename "$$libstd" .rlib | ${SED} 's/^libstd-//')"; \
|
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"; \
|
${AR} x "$$libstd" "$$std_o"; \
|
||||||
${LD} -r -o std.xx.o "$$std_o" old_fstat.o; \
|
${LD} -r -o std.xx.o "$$std_o" old_fstat.o; \
|
||||||
${MV} std.xx.o "$$std_o"; \
|
${MV} std.xx.o "$$std_o"; \
|
||||||
|
|
Loading…
Reference in a new issue