Skip to content

Commit 19aa462

Browse files
committed
skip biglink for jb 4.3
1 parent 3c669dc commit 19aa462

File tree

1 file changed

+24
-5
lines changed

1 file changed

+24
-5
lines changed

distribute.sh

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ export BIGLINK="$ROOT_PATH/src/tools/biglink"
6363
export PIP=$PIP_NAME
6464
export VIRTUALENV=$VIRTUALENV_NAME
6565

66+
JELLYBEAN=0
67+
6668
MD5SUM=$(which md5sum)
6769
if [ "X$MD5SUM" == "X" ]; then
6870
MD5SUM=$(which md5)
@@ -218,6 +220,10 @@ function push_arm() {
218220
export STRIP="$TOOLCHAIN_PREFIX-strip --strip-unneeded"
219221
export MAKE="make -j5"
220222

223+
if [ "$JELLYBEAN" == "1" ]; then
224+
export LIBLINK="$CC -shared $LDFLAGS"
225+
fi
226+
221227
# Use ccache ?
222228
which ccache &>/dev/null
223229
if [ $? -eq 0 ]; then
@@ -248,6 +254,7 @@ function usage() {
248254
echo
249255
echo " -d directory Name of the distribution directory"
250256
echo " -h Show this help"
257+
echo " -j Create distribution for JB 4.3+"
251258
echo " -l Show a list of available modules"
252259
echo " -m 'mod1 mod2' Modules to include"
253260
echo " -f Restart from scratch (remove the current build)"
@@ -345,6 +352,10 @@ function run_prepare() {
345352
fi
346353
done
347354

355+
if [ "$JELLYBEAN" == "1" ]; then
356+
info "Distribution for Jelly Bean (4.3) or higher; biglink will be skipped"
357+
fi
358+
348359
info "Distribution will be located at $DIST_PATH"
349360
if [ -e "$DIST_PATH" ]; then
350361
error "The distribution $DIST_PATH already exist"
@@ -760,7 +771,10 @@ function run_distribute() {
760771
debug "Fill private directory"
761772
try cp -a python-install/lib private/
762773
try mkdir -p private/include/python2.7
763-
try mv libs/$ARCH/libpymodules.so private/
774+
775+
if [ "$JELLYBEAN" == "0" ]; then
776+
try mv libs/$ARCH/libpymodules.so private/
777+
fi
764778
try cp python-install/include/python2.7/pyconfig.h private/include/python2.7/
765779

766780
debug "Reduce private directory from unwanted files"
@@ -786,9 +800,11 @@ function run_distribute() {
786800
}
787801

788802
function run_biglink() {
789-
push_arm
790-
try $BIGLINK $LIBS_PATH/libpymodules.so $LIBLINK_PATH
791-
pop_arm
803+
if [ "$JELLYBEAN" == "0" ]; then
804+
push_arm
805+
try $BIGLINK $LIBS_PATH/libpymodules.so $LIBLINK_PATH
806+
pop_arm
807+
fi
792808
}
793809

794810
function run() {
@@ -829,11 +845,14 @@ function arm_deduplicate() {
829845

830846

831847
# Do the build
832-
while getopts ":hvlfxm:u:d:s" opt; do
848+
while getopts ":hjvlfxm:u:d:s" opt; do
833849
case $opt in
834850
h)
835851
usage
836852
;;
853+
j)
854+
JELLYBEAN=1
855+
;;
837856
l)
838857
list_modules
839858
;;

0 commit comments

Comments
 (0)