From 300e7094648db515461f2e689dd6c6e6b56ede49 Mon Sep 17 00:00:00 2001 From: Cody P Schafer Date: Mon, 17 Nov 2014 16:37:27 -0500 Subject: [PATCH] rust: fix CROSS_PREFIX setting and set JEMALLOC_CFLAGS --- recipes/rust/rust.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes/rust/rust.inc b/recipes/rust/rust.inc index cb0bb39..535f092 100644 --- a/recipes/rust/rust.inc +++ b/recipes/rust/rust.inc @@ -196,13 +196,14 @@ def rust_gen_mk_cfg(d, thing): # by rust's build system). We delete and then insert this because not # all targets define it. '-e', 's/^CROSS_PREFIX_{}.*$//'.format(sys), - '-e', '/^.*$/a CROSS_PREFIX_{} := {}'.format(sys, prefix), + '-e', '2 a CROSS_PREFIX_{} := {}'.format(sys, prefix), '-e', 's/^CC_{}=.*$/CC_{} := gcc/'.format(sys, sys), '-e', 's/^CXX_{}.*$/CXX_{} := g++/'.format(sys, sys), '-e', 's/^CPP_{}.*$/CPP_{} := gcc -E/'.format(sys, sys), '-e', 's/^AR_{}.*$/AR_{} := ar/'.format(sys, sys), # Append our flags to the existing ones + '-e', '/^CFG_JEMALLOC_CFLAGS/ s;$; {};'.format(cflags_for(d, thing)), '-e', '/^CFG_GCCISH_CFLAGS/ s;$; {};'.format(cflags_for(d, thing)), '-e', '/^CFG_GCCISH_CXXFLAGS/ s;$; {};'.format(cxxflags_for(d, thing)), '-e', '/^CFG_GCCISH_LINK_FLAGS/ s;$; {};'.format(" ".join(ldflags_for(d, thing))),