From 7e1639a4810e5e70db94fdb0a0a98593d50d4290 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 7 Nov 2017 15:26:25 +0100 Subject: [PATCH] make.sh: Use -pipe in CFLAGS when host has >1GB of memory Signed-off-by: Michael Tremer --- tools/make-functions | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/make-functions b/tools/make-functions index 3b878fb000..1ff4613f3e 100644 --- a/tools/make-functions +++ b/tools/make-functions @@ -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}" } -- 2.39.2