File tree 3 files changed +10
-5
lines changed
3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -93,6 +93,11 @@ case $OSTYPE in
93
93
;;
94
94
esac
95
95
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
96
101
97
102
# Internals
98
103
CRED=" \x1b[31;01m"
@@ -214,7 +219,7 @@ function push_arm() {
214
219
export RANLIB=" $TOOLCHAIN_PREFIX -ranlib"
215
220
export LD=" $TOOLCHAIN_PREFIX -ld"
216
221
export STRIP=" $TOOLCHAIN_PREFIX -strip --strip-unneeded"
217
- export MAKE=" make -j5 "
222
+ export MAKE=" make"
218
223
export READELF=" $TOOLCHAIN_PREFIX -readelf"
219
224
220
225
# This will need to be updated to support Python versions other than 2.7
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ function build_hostpython() {
25
25
cd $BUILD_hostpython
26
26
27
27
try ./configure
28
- try make -j5
28
+ try make -j $MAKE_JOBS
29
29
try mv Parser/pgen hostpgen
30
30
31
31
if [ -f python.exe ]; then
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ function build_python() {
102
102
103
103
try ./configure --host=$HOSTARCH --build=$BUILDARCH OPT=$OFLAG --prefix=" $BUILD_PATH /python-install" --enable-shared --disable-toolbox-glue --disable-framework
104
104
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
106
106
cp HOSTPYTHON=$BUILD_python /hostpython python
107
107
108
108
# FIXME, the first time, we got a error at:
@@ -112,10 +112,10 @@ function build_python() {
112
112
# check if we can avoid this part.
113
113
114
114
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
116
116
debug ' Second install.'
117
117
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
119
119
pop_arm
120
120
121
121
system=$( uname -s)
You can’t perform that action at this time.
0 commit comments