Skip to content

Commit e7cea72

Browse files
committed
Fix hardcoded "make -j5" and set it manually were needed
1 parent 3a69fb8 commit e7cea72

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

distribute.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ case $OSTYPE in
9393
;;
9494
esac
9595

96+
if [ -f /proc/cpuinfo ]; then
97+
export MAKE_JOBS=($(grep -c ^processor /proc/cpuinfo) +1 )
98+
else
99+
export MAKE_JOBS=1
100+
fi
96101

97102
# Internals
98103
CRED="\x1b[31;01m"
@@ -214,7 +219,7 @@ function push_arm() {
214219
export RANLIB="$TOOLCHAIN_PREFIX-ranlib"
215220
export LD="$TOOLCHAIN_PREFIX-ld"
216221
export STRIP="$TOOLCHAIN_PREFIX-strip --strip-unneeded"
217-
export MAKE="make -j5"
222+
export MAKE="make"
218223
export READELF="$TOOLCHAIN_PREFIX-readelf"
219224

220225
# This will need to be updated to support Python versions other than 2.7

recipes/hostpython/recipe.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function build_hostpython() {
2525
cd $BUILD_hostpython
2626

2727
try ./configure
28-
try make -j5
28+
try make -j$MAKE_JOBS
2929
try mv Parser/pgen hostpgen
3030

3131
if [ -f python.exe ]; then

recipes/python/recipe.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ function build_python() {
102102

103103
try ./configure --host=$HOSTARCH --build=$BUILDARCH OPT=$OFLAG --prefix="$BUILD_PATH/python-install" --enable-shared --disable-toolbox-glue --disable-framework
104104
echo ./configure --host=$HOSTARCH --build=$BUILDARCH OPT=$OFLAG --prefix="$BUILD_PATH/python-install" --enable-shared --disable-toolbox-glue --disable-framework
105-
echo $MAKE HOSTPYTHON=$BUILD_python/hostpython HOSTPGEN=$BUILD_python/hostpgen CROSS_COMPILE_TARGET=yes INSTSONAME=libpython2.7.so
105+
echo $MAKE -j$MAKE_JOBS HOSTPYTHON=$BUILD_python/hostpython HOSTPGEN=$BUILD_python/hostpgen CROSS_COMPILE_TARGET=yes INSTSONAME=libpython2.7.so
106106
cp HOSTPYTHON=$BUILD_python/hostpython python
107107

108108
# FIXME, the first time, we got a error at:
@@ -112,10 +112,10 @@ function build_python() {
112112
# check if we can avoid this part.
113113

114114
debug 'First install (failing..)'
115-
$MAKE install HOSTPYTHON=$BUILD_python/hostpython HOSTPGEN=$BUILD_python/hostpgen CROSS_COMPILE_TARGET=yes INSTSONAME=libpython2.7.so
115+
$MAKE -j$MAKE_JOBS install HOSTPYTHON=$BUILD_python/hostpython HOSTPGEN=$BUILD_python/hostpgen CROSS_COMPILE_TARGET=yes INSTSONAME=libpython2.7.so
116116
debug 'Second install.'
117117
touch python.exe python
118-
$MAKE install HOSTPYTHON=$BUILD_python/hostpython HOSTPGEN=$BUILD_python/hostpgen CROSS_COMPILE_TARGET=yes INSTSONAME=libpython2.7.so
118+
$MAKE -j$MAKE_JOBS install HOSTPYTHON=$BUILD_python/hostpython HOSTPGEN=$BUILD_python/hostpgen CROSS_COMPILE_TARGET=yes INSTSONAME=libpython2.7.so
119119
pop_arm
120120

121121
system=$(uname -s)

0 commit comments

Comments
 (0)