Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Feb 2018 11:11:50 +0000 (UTC)
From:      =?UTF-8?Q?Jean-S=c3=a9bastien_P=c3=a9dron?= <dumbbell@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r462096 - head/lang/rust
Message-ID:  <201802171111.w1HBBoNc053894@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dumbbell
Date: Sat Feb 17 11:11:50 2018
New Revision: 462096
URL: https://svnweb.freebsd.org/changeset/ports/462096

Log:
  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.

Modified:
  head/lang/rust/Makefile

Modified: head/lang/rust/Makefile
==============================================================================
--- head/lang/rust/Makefile	Sat Feb 17 10:34:26 2018	(r462095)
+++ head/lang/rust/Makefile	Sat Feb 17 11:11:50 2018	(r462096)
@@ -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"; \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802171111.w1HBBoNc053894>