]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
make.sh: Use -pipe in CFLAGS when host has >1GB of memory
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 7 Nov 2017 14:26:25 +0000 (15:26 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 7 Nov 2017 14:27:00 +0000 (15:27 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
tools/make-functions

index 3b878fb000288b5bfb3ab9033c2be4553ae80e42..1ff4613f3ea5c435c3a856cb6a2f6bc6dce85f3c 100644 (file)
@@ -138,7 +138,13 @@ configure_build() {
        # Enables hardening
        HARDENING_CFLAGS="-Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4"
 
-       CFLAGS="-O2 -pipe -Wall -fexceptions -fPIC ${CFLAGS_ARCH}"
+       CFLAGS="-O2 -Wall -fexceptions -fPIC ${CFLAGS_ARCH}"
+
+       # Run compiler and assembler simultaneously on systems that have enough memory
+       if [ ${HOST_MEM} -ge 1024 ]; then
+               CFLAGS="${CFLAGS} -pipe"
+       fi
+
        CXXFLAGS="${CFLAGS}"
 }