diff options
| author | Christian Walther <cwalther@gmx.ch> | 2020-10-20 16:37:24 +0200 |
|---|---|---|
| committer | Christian Walther <cwalther@gmx.ch> | 2020-10-20 16:39:32 +0200 |
| commit | 1eab0692b50f05f6b8194897386cda7720634fe6 (patch) | |
| tree | 28dac069ab2540f64bf59fd78351378b9f8dcadc /py | |
| parent | c5d8c12e342f8fd904bfdbfb1175860bc03f6416 (diff) | |
Fix missing `nproc` on macOS.
396979a breaks building on macOS: `nproc` is a Linux thing, use a cross-platform alternative.
Diffstat (limited to 'py')
| -rw-r--r-- | py/mkenv.mk | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/py/mkenv.mk b/py/mkenv.mk index b76dd60f8..cb678e8e7 100644 --- a/py/mkenv.mk +++ b/py/mkenv.mk @@ -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 |
