[01/10] make.sh: Set a good default for rustc flags
Commit Message
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
---
make.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
@@ -170,7 +170,6 @@ configure_build() {
CROSSTARGET="${build_arch}-cross-linux-gnueabi"
BUILD_PLATFORM="arm"
CFLAGS_ARCH="-march=armv6zk+fp -mfpu=vfp -mfloat-abi=softfp -fomit-frame-pointer"
- #RUSTFLAGS="-Ccodegen-units=1"
;;
riscv64)
@@ -205,6 +204,8 @@ configure_build() {
CFLAGS="-O2 -pipe -Wall -fexceptions -fPIC ${CFLAGS_ARCH}"
CXXFLAGS="${CFLAGS}"
+ RUSTFLAGS="-Copt-level=3 -Clink-arg=-Wl,-z,relro,-z,now -Ccodegen-units=1 --cap-lints=warn ${RUSTFLAGS_ARCH}"
+
# Determine parallelism
# We assume that each process consumes about
# 128MB of memory. Therefore we find out how