On Thu, Oct 19, 2017 at 01:05:12PM +0100, Stuart Henderson wrote:
> On 2017/10/19 13:49, Sebastien Marie wrote:
>
> Building with 2 dpb cores on a 2-cpu-core machine so there wouldn't have
> been many other processes running - but if a build is very tight on memory,
> it fails randomly (presumably due to PIE?) - I've seen that often with
> chromium before I started using -Wl,--no-keep-memory.
>
For passing -Wl,--no-keep-memory to the linker, something like that is
possible:
diff --git a/lang/rust/Makefile b/lang/rust/Makefile
index a1709be..9349b9f 100644
--- a/lang/rust/Makefile
+++ b/lang/rust/Makefile
@@ -89,7 +89,7 @@ LIBESTDC_VERSION = 17.1
# note: RUSTFLAGS extra flags passed to rust
# -L modgcc-libs : disambiguate libestdc++.so
-MAKE_ENV = RUSTFLAGS="-L ${WRKDIR}/modgcc-libs" \
+MAKE_ENV = RUSTFLAGS="-L ${WRKDIR}/modgcc-libs -C
link-arg=-Wl,--no-keep-memory" \
LIBGIT2_SYS_USE_PKG_CONFIG=1
# build/configuration variables
So if the problem comes back, please tell me and I will provide a proper
patch for i386.
--
Sebastien Marie