Merge pull request #3577 from cwalther/nproc
Fix missing `nproc` on macOS
This commit is contained in:
commit
1092890266
|
@ -197,7 +197,7 @@ endif
|
|||
|
||||
|
||||
LDFLAGS = $(CFLAGS) -nostartfiles -Wl,-nostdlib -Wl,-T,$(GENERATED_LD_FILE) -Wl,-Map=$@.map -Wl,-cref -Wl,-gc-sections -specs=nano.specs
|
||||
LDFLAGS += -flto=$(shell nproc)
|
||||
LDFLAGS += -flto=$(shell $(NPROC))
|
||||
LIBS := -lgcc -lc
|
||||
|
||||
# Use toolchain libm if we're not using our own.
|
||||
|
|
|
@ -55,6 +55,8 @@ PYTHON3 ?= python3
|
|||
RM = rm
|
||||
RSYNC = rsync
|
||||
SED = sed
|
||||
# Linux has 'nproc', macOS has 'sysctl -n hw.logicalcpu', this is cross-platform
|
||||
NPROC = $(PYTHON) -c 'import multiprocessing as mp; print(mp.cpu_count())'
|
||||
|
||||
AS = $(CROSS_COMPILE)as
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
|
|
Loading…
Reference in New Issue