public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: Stefan Schantl <stefan.schantl@ipfire.org>
To: development@lists.ipfire.org
Subject: [PATCH] make.sh: Introduce RUSTFLAGS
Date: Sat, 07 Dec 2019 19:30:45 +0100	[thread overview]
Message-ID: <20191207183045.4244-1-stefan.schantl@ipfire.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1132 bytes --]

This allows to set arch-specific FLAGS when dealing with
software written in rust.

Signed-off-by: Stefan Schantl <stefan.schantl(a)ipfire.org>
---
 make.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/make.sh b/make.sh
index 771c5ff89..2cdbe154a 100755
--- a/make.sh
+++ b/make.sh
@@ -174,6 +174,7 @@ configure_build() {
 			CROSSTARGET="${build_arch}-cross-linux-gnueabi"
 			BUILD_PLATFORM="arm"
 			CFLAGS_ARCH="-march=armv5te -mfloat-abi=soft -fomit-frame-pointer"
+			RUSTFLAGS="-Ccodegen-units=1"
 			;;
 
 		*)
@@ -462,7 +463,7 @@ prepareenv() {
 	# Setup environment
 	set +h
 	LC_ALL=POSIX
-	export LFS LC_ALL CFLAGS CXXFLAGS DEFAULT_PARALLELISM
+	export LFS LC_ALL CFLAGS CXXFLAGS DEFAULT_PARALLELISM RUSTFLAGS
 	unset CC CXX CPP LD_LIBRARY_PATH LD_PRELOAD
 
 	# Make some extra directories
@@ -547,6 +548,7 @@ enterchroot() {
 		CONFIG_ROOT="${CONFIG_ROOT}" \
 		CFLAGS="${CFLAGS} ${HARDENING_CFLAGS}" \
 		CXXFLAGS="${CXXFLAGS} ${HARDENING_CFLAGS}" \
+		RUSTFLAGS="${RUSTFLAGS}" \
 		BUILDTARGET="${BUILDTARGET}" \
 		CROSSTARGET="${CROSSTARGET}" \
 		BUILD_ARCH="${BUILD_ARCH}" \
-- 
2.20.1


             reply	other threads:[~2019-12-07 18:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-07 18:30 Stefan Schantl [this message]
2019-12-09 15:20 ` Michael Tremer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191207183045.4244-1-stefan.schantl@ipfire.org \
    --to=stefan.schantl@ipfire.org \
    --cc=development@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox