diff --git a/src/makefile.android b/src/makefile.android index f0e13076..0ca29dca 100644 --- a/src/makefile.android +++ b/src/makefile.android @@ -166,23 +166,21 @@ DEFS += -DBOOST_ASIO_SEPARATE_COMPILATION # for boost 1.37, add -mt to the boost libraries LIBS += \ -Wl,-B$(LMODE) \ - -Wl,--entry=main,-rpath-link=$(SYSROOT)/usr/lib/ -L$(SYSROOT)/usr/lib/ \ + -Wl,-rpath-link=$(SYSROOT)/usr/lib/ -L$(SYSROOT)/usr/lib/ \ -L$(BOOSTDIR)/lib \ -l boost_system$(BOOST_LIB_SUFFIX) \ -l boost_filesystem$(BOOST_LIB_SUFFIX) \ -l boost_program_options$(BOOST_LIB_SUFFIX) \ -l boost_thread$(BOOST_LIB_SUFFIX) \ -l db_cxx$(BDB_LIB_SUFFIX) \ - -L$(NDK_BASE)/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/ -lgnustl_static -# -l ssl_static \ -# -l crypto_static \ + -L$(NDK_BASE)/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/ -lgnustl_static + #-l ssl_static -l crypto_static LIBS+= \ -Wl,-B$(LMODE2) \ - -Wl,--entry=main,-rpath-link=$(SYSROOT)/usr/lib/ -L$(SYSROOT)/usr/lib/ \ + -Wl,-rpath-link=$(SYSROOT)/usr/lib/ -L$(SYSROOT)/usr/lib/ \ -lssl -lcrypto -lstdc++ -lm -lgcc -nostdlib -lc \ - $(NDK_BASE)/platforms/android-9/arch-arm/usr/lib/crtbegin_static.o - + $(NDK_BASE)/platforms/android-9/arch-arm/usr/lib/crtbegin_dynamic.o # auto-generated dependencies: -include obj/*.P @@ -202,6 +200,7 @@ obj/%.o: %.cpp twisterd: $(OBJS:obj/%=obj/%) $(LINK) $(xCXXFLAGS) -o $@ $^ $(xLDFLAGS) $(LIBS) + arm-linux-androideabi-strip -g $@ TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp)) diff --git a/src/runme-android.sh b/src/runme-android.sh index 44f5bbe2..6c75c466 100644 --- a/src/runme-android.sh +++ b/src/runme-android.sh @@ -9,8 +9,7 @@ export CXX=arm-linux-androideabi-gcc export CXXFLAGS="-I$SYSROOT/usr/include/ -I$BOOSTDIR/include/boost-1_49 \ -I$NDK_BASE/sources/cxx-stl/gnu-libstdc++/4.6/include \ -I$NDK_BASE/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/include \ - -fexceptions -frtti -DHAVE_CXX_STDHEADERS -DANDROID -nostdlib \ - -fno-use-cxa-atexit" + -fexceptions -frtti -DHAVE_CXX_STDHEADERS -DANDROID -nostdlib" export BOOST_LIB_SUFFIX=-gcc-mt-1_49 export BDB_LIB_SUFFIX=-4.8