Skip to content

Commit c14935e

Browse files
committed
remove optimisation and stripping to allow gdb usage
1 parent 37c2370 commit c14935e

File tree

12 files changed

+48
-17
lines changed

12 files changed

+48
-17
lines changed

distribute.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,9 @@ function push_arm() {
135135
#export OFLAG="-Os"
136136
#export OFLAG="-O2"
137137

138-
export CFLAGS="-DANDROID -mandroid $OFLAG -fomit-frame-pointer --sysroot $NDKPLATFORM"
138+
export CFLAGS="-DANDROID -mandroid $OFLAG -g -fomit-frame-pointer --sysroot $NDKPLATFORM"
139139
if [ "X$ARCH" == "Xarmeabi-v7a" ]; then
140-
CFLAGS+=" -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb"
140+
CFLAGS+=" -march=armv7-a -g -mfloat-abi=softfp -mfpu=vfp -mthumb"
141141
fi
142142
export CXXFLAGS="$CFLAGS"
143143

@@ -614,10 +614,10 @@ function run_distribute() {
614614
try rm -rf lib-dynload/_ctypes_test.so
615615
try rm -rf lib-dynload/_testcapi.so
616616

617-
debug "Strip libraries"
618-
push_arm
619-
try find "$DIST_PATH"/private "$DIST_PATH"/libs -iname '*.so' -exec $STRIP {} \;
620-
pop_arm
617+
#debug "Strip libraries"
618+
#push_arm
619+
#try find "$DIST_PATH"/private "$DIST_PATH"/libs -iname '*.so' -exec $STRIP {} \;
620+
#pop_arm
621621

622622
}
623623

recipes/cymunk/recipe.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function build_cymunk() {
2020

2121
try find . -iname '*.pyx' -exec cython {} \;
2222
try $BUILD_PATH/python-install/bin/python.host setup.py build_ext -v
23-
try find build/lib.* -name "*.o" -exec $STRIP {} \;
23+
#try find build/lib.* -name "*.o" -exec $STRIP {} \;
2424

2525
export PYTHONPATH=$BUILD_hostpython/Lib/site-packages
2626
try $BUILD_hostpython/hostpython setup.py install -O2 --root=$BUILD_PATH/python-install --install-lib=lib/python2.7/site-packages

recipes/hostpython/recipe.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ function build_hostpython() {
2222
return
2323
fi
2424

25-
try ./configure
26-
try make -j5
27-
try mv Parser/pgen hostpgen
25+
try ./configure
26+
try make -j5
27+
try mv Parser/pgen hostpgen
2828

2929
if [ -f python.exe ]; then
3030
try mv python.exe hostpython

recipes/kivy/recipe.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function build_kivy() {
2727
$BUILD_PATH/python-install/bin/python.host setup.py build_ext
2828
try find . -iname '*.pyx' -exec cython {} \;
2929
try $BUILD_PATH/python-install/bin/python.host setup.py build_ext -v
30-
try find build/lib.* -name "*.o" -exec $STRIP {} \;
30+
#try find build/lib.* -name "*.o" -exec $STRIP {} \;
3131
try $BUILD_PATH/python-install/bin/python.host setup.py install -O2
3232

3333
try rm -rf $BUILD_PATH/python-install/lib/python*/site-packages/kivy/tools

recipes/lxml/recipe.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function build_lxml() {
3030
try $BUILD_PATH/python-install/bin/python.host setup.py build_ext -I$BUILD_libxml2/include -I$BUILD_libxslt
3131
try find . -iname '*.pyx' -exec cython {} \;
3232
try $BUILD_PATH/python-install/bin/python.host setup.py build_ext -v
33-
try find build/lib.* -name "*.o" -exec $STRIP {} \;
33+
#try find build/lib.* -name "*.o" -exec $STRIP {} \;
3434

3535
export PYTHONPATH=$BUILD_hostpython/Lib/site-packages
3636
try $BUILD_hostpython/hostpython setup.py install -O2 --root=$BUILD_PATH/python-install --install-lib=lib/python2.7/site-packages

recipes/pycrypto/recipe.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function build_pycrypto() {
2929
try ./configure --host=arm-eabi --prefix="$BUILD_PATH/python-install" --enable-shared
3030

3131
try $BUILD_PATH/python-install/bin/python.host setup.py build_ext -v
32-
try find build/lib.* -name "*.o" -exec $STRIP {} \;
32+
#try find build/lib.* -name "*.o" -exec $STRIP {} \;
3333

3434
try $BUILD_PATH/python-install/bin/python.host setup.py install -O2
3535

recipes/pygame/recipe.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function build_pygame() {
3636
export LDFLAGS="$LDFLAGS -L$LIBS_PATH -L$SRC_PATH/obj/local/$ARCH/ -lm -lz"
3737
export LDSHARED="$LIBLINK"
3838
try $BUILD_PATH/python-install/bin/python.host setup.py install -O2
39-
try find build/lib.* -name "*.o" -exec $STRIP {} \;
39+
#try find build/lib.* -name "*.o" -exec $STRIP {} \;
4040

4141
try rm -rf $BUILD_PATH/python-install/lib/python*/site-packages/pygame/docs
4242
try rm -rf $BUILD_PATH/python-install/lib/python*/site-packages/pygame/examples

recipes/pyjnius/recipe.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function build_pyjnius() {
2828
$BUILD_PATH/python-install/bin/python.host setup.py build_ext
2929
try find . -iname '*.pyx' -exec cython {} \;
3030
try $BUILD_PATH/python-install/bin/python.host setup.py build_ext -v
31-
try find build/lib.* -name "*.o" -exec $STRIP {} \;
31+
#try find build/lib.* -name "*.o" -exec $STRIP {} \;
3232
try $BUILD_PATH/python-install/bin/python.host setup.py install -O2
3333
try cp -a jnius/src/org $JAVACLASS_PATH
3434

recipes/pyopenssl/recipe.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function build_pyopenssl() {
3131
export LDFLAGS="$LDFLAGS -L$LIBS_PATH -L$BUILD_openssl"
3232

3333
try $BUILD_PATH/python-install/bin/python.host setup.py build_ext -v
34-
try find build/lib.* -name "*.o" -exec $STRIP {} \;
34+
#try find build/lib.* -name "*.o" -exec $STRIP {} \;
3535

3636
try $BUILD_PATH/python-install/bin/python.host setup.py install -O2
3737

recipes/python/patches/no-optim.patch

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
--- Python-2.7.2/configure.in.orig 2012-11-08 01:03:36.098872991 +0100
2+
+++ Python-2.7.2/configure.in 2012-11-08 01:04:46.783218535 +0100
3+
@@ -938,11 +938,11 @@
4+
# debug builds.
5+
OPT="-g -O0 -Wall $STRICT_PROTO"
6+
else
7+
- OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
8+
+ OPT="-g $WRAP -O0 -Wall $STRICT_PROTO"
9+
fi
10+
;;
11+
*)
12+
- OPT="-O3 -Wall $STRICT_PROTO"
13+
+ OPT="-O0 -Wall $STRICT_PROTO"
14+
;;
15+
esac
16+
case $ac_sys_system in
17+
@@ -1126,7 +1126,7 @@
18+
if test "$Py_DEBUG" = 'true'; then
19+
:
20+
else
21+
- OPT="-DNDEBUG $OPT"
22+
+ OPT="-DNDEBUG $OPT -O0"
23+
fi
24+
25+
if test "$ac_arch_flags"

recipes/python/recipe.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ function prebuild_python() {
3232
try patch -p1 < $RECIPE_python/patches/fix-dynamic-lookup.patch
3333
try patch -p1 < $RECIPE_python/patches/fix-dlfcn.patch
3434

35+
# for debug
36+
try patch -p1 < $RECIPE_python/patches/no-optim.patch
37+
3538
system=$(uname -s)
3639
if [ "X$system" == "XDarwin" ]; then
3740
try patch -p1 < $RECIPE_python/patches/fix-configure-darwin.patch
@@ -72,6 +75,9 @@ function build_python() {
7275
export LDFLAGS="$LDFLAGS -L$SRC_PATH/obj/local/$ARCH/"
7376
fi
7477

78+
# ok, it's a bit ugly
79+
sed 's/-O3/-O0/' -i configure
80+
7581
try ./configure --host=arm-eabi --prefix="$BUILD_PATH/python-install" --enable-shared --disable-toolbox-glue --disable-framework
7682
echo ./configure --host=arm-eabi --prefix="$BUILD_PATH/python-install" --enable-shared --disable-toolbox-glue --disable-framework
7783
echo $MAKE HOSTPYTHON=$BUILD_python/hostpython HOSTPGEN=$BUILD_python/hostpgen CROSS_COMPILE_TARGET=yes INSTSONAME=libpython2.7.so

recipes/twisted/recipe.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function build_twisted() {
2929
$BUILD_PATH/python-install/bin/python.host setup.py build_ext
3030
try find . -iname '*.pyx' -exec cython {} \;
3131
try $BUILD_PATH/python-install/bin/python.host setup.py build_ext -v
32-
try find build/lib.* -name "*.o" -exec $STRIP {} \;
32+
#try find build/lib.* -name "*.o" -exec $STRIP {} \;
3333

3434
try $BUILD_hostpython/hostpython setup.py install -O2 --root=$BUILD_PATH/python-install --install-lib=lib/python2.7/site-packages
3535

0 commit comments

Comments
 (0)