File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -448,8 +448,11 @@ esac
448448
449449if [ x` uname -s` = " xDarwin" ]
450450then
451+ IS_MAC_OS=yes
451452 # You can install gsed with 'brew install gnu-sed'
452453 SED=gsed
454+ else
455+ IS_MAC_OS=no
453456fi
454457
455458# Parse options
@@ -835,9 +838,13 @@ then
835838 fi
836839fi
837840
838- # Default parallellism
839- make_load=" ` (echo processor; cat /proc/cpuinfo 2> /dev/null echo processor) \
840- | grep -c processor` "
841+ # Default parallellism (number of cores + 1).
842+ if [ " $IS_MAC_OS " != yes ]; then
843+ make_load=" $( (echo processor; cat /proc/cpuinfo 2> /dev/null) \
844+ | grep -c processor ) "
845+ else
846+ make_load=" $(( $(sysctl - n hw.ncpu) + 1 )) "
847+ fi
841848
842849if [ " x${jobs} " = " x" ]
843850then
@@ -958,6 +965,7 @@ export BUILD_OPTSIZE_NEWLIB
958965export BUILD_OPTSIZE_LIBSTDCXX
959966export DO_STRIP_TARGET_LIBRARIES
960967export IS_CROSS_COMPILING
968+ export IS_MAC_OS
961969export IS_NATIVE
962970export UCLIBC_IN_SRC_TREE
963971
You can’t perform that action at this time.
0 commit comments