File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -111,6 +111,7 @@ function push_arm() {
111111 export OLD_PATH=$PATH
112112 export OLD_CFLAGS=$CFLAGS
113113 export OLD_CXXFLAGS=$CXXFLAGS
114+ export OLD_LDFLAGS=$LDFLAGS
114115 export OLD_CC=$CC
115116 export OLD_CXX=$CXX
116117 export OLD_AR=$AR
@@ -123,12 +124,15 @@ function push_arm() {
123124 # export OFLAG="-Os"
124125 # export OFLAG="-O2"
125126
126- export CFLAGS=" -mandroid $OFLAG -fomit-frame-pointer --sysroot $NDKPLATFORM "
127+ export CFLAGS=" -mandroid $OFLAG -fomit-frame-pointer --sysroot $NDKPLATFORM -fPIC "
127128 if [ $ARCH == " armeabi-v7a" ]; then
128129 CFLAGS+=" -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb"
129130 fi
130131 export CXXFLAGS=" $CFLAGS "
131132
133+ # that could be done only for darwin platform, but it doesn't hurt.
134+ export LDFLAGS=" -lm"
135+
132136 # this must be something depending of the API level of Android
133137 PYPLATFORM=$( python -c ' import sys; print sys.platform' )
134138 if [ " $PYPLATFORM " == " linux2" ]; then
@@ -182,6 +186,7 @@ function pop_arm() {
182186 export PATH=$OLD_PATH
183187 export CFLAGS=$OLD_CFLAGS
184188 export CXXFLAGS=$OLD_CXXFLAGS
189+ export LDFLAGS=$OLD_LDFLAGS
185190 export CC=$OLD_CC
186191 export CXX=$OLD_CXX
187192 export AR=$OLD_AR
You can’t perform that action at this time.
0 commit comments