mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
make.sh: Pass number of processors and total memory so that we can adjust MAKETUNING
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -35,6 +35,11 @@ TARGET = $(DIR_INFO)/$(THISAPP)
|
||||
CFLAGS += -O3 -fno-strict-aliasing
|
||||
CXXFLAGS += -O3 -fno-strict-aliasing
|
||||
|
||||
# The compiler uses a lot of memory to compile boost, hence we reduce
|
||||
# the total number of processes a little bit to be able to build on
|
||||
# smaller machines
|
||||
override MAKETUNING = -j$(shell echo $$(( $(SYSTEM_MEMORY) / 512)))
|
||||
|
||||
CONFIGURE_OPTIONS = \
|
||||
--prefix=/usr \
|
||||
--layout=tagged \
|
||||
|
||||
8
make.sh
8
make.sh
@@ -554,6 +554,8 @@ enterchroot() {
|
||||
CCACHE_COMPILERCHECK="${CCACHE_COMPILERCHECK}" \
|
||||
KVER="${KVER}" \
|
||||
XZ_OPT="${XZ_OPT}" \
|
||||
SYSTEM_PROCESSORS="${SYSTEM_PROCESSORS}" \
|
||||
SYSTEM_MEMORY="${SYSTEM_MEMORY}" \
|
||||
$(fake_environ) \
|
||||
$(qemu_environ) \
|
||||
"$@"
|
||||
@@ -634,6 +636,8 @@ lfsmake1() {
|
||||
CFLAGS="${CFLAGS}" \
|
||||
CXXFLAGS="${CXXFLAGS}" \
|
||||
MAKETUNING="${MAKETUNING}" \
|
||||
SYSTEM_PROCESSORS="${SYSTEM_PROCESSORS}" \
|
||||
SYSTEM_MEMORY="${SYSTEM_MEMORY}" \
|
||||
make -f $* \
|
||||
TOOLCHAIN=1 \
|
||||
TOOLS_DIR="${TOOLS_DIR}" \
|
||||
@@ -907,6 +911,10 @@ if [ -n "${TARGET_ARCH}" ]; then
|
||||
unset TARGET_ARCH
|
||||
fi
|
||||
|
||||
# Get some information about the host system
|
||||
SYSTEM_PROCESSORS="$(system_processors)"
|
||||
SYSTEM_MEMORY="$(system_memory)"
|
||||
|
||||
# Get the amount of memory in this build system
|
||||
HOST_MEM=$(system_memory)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user