]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
make.sh: Set a good default for rustc flags
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 27 Jan 2022 15:10:42 +0000 (15:10 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 1 Feb 2022 13:48:24 +0000 (13:48 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
make.sh

diff --git a/make.sh b/make.sh
index 378cd35ebe5237b73a83ca75b6e97e374fa30ee4..5f22f74091b4af3b9eb43d27f714c408a81619c7 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -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