Fix missing nproc
on macOS.
396979a breaks building on macOS: `nproc` is a Linux thing, use a cross-platform alternative.
This commit is contained in:
parent
c5d8c12e34
commit
1eab0692b5
@ -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…
x
Reference in New Issue
Block a user