Android: Provide a version built with -fPIE -pie to support Android 5.0.

This commit is contained in:
Joey Hess 2015-01-05 12:29:20 -04:00
parent 96a9cd8305
commit 5c77cef271
5 changed files with 22 additions and 13 deletions

View file

@ -221,8 +221,8 @@ android: Build/EvilSplicer
sed -i 's/Extensions: /Extensions: MagicHash /i' tmp/androidtree/git-annex.cabal
# Cabal cannot cross compile with custom build type, so workaround.
sed -i 's/Build-type: Custom/Build-type: Simple/' tmp/androidtree/git-annex.cabal
# Build just once, but link twice, for 2 different versions of Android.
mkdir -p tmp/androidtree/dist/build/git-annex/4.0 tmp/androidtree/dist/build/git-annex/4.3
# Build just once, but link repeatedly, for different versions of Android.
mkdir -p tmp/androidtree/dist/build/git-annex/4.0 tmp/androidtree/dist/build/git-annex/4.3 tmp/androidtree/dist/build/git-annex/5.0
if [ ! -e tmp/androidtree/dist/setup-config ]; then \
cd tmp/androidtree && $$HOME/.ghc/$(shell cat standalone/android/abiversion)/arm-linux-androideabi/bin/cabal configure -fAndroid $(ANDROID_FLAGS); \
fi
@ -231,6 +231,9 @@ android: Build/EvilSplicer
cd tmp/androidtree && $$HOME/.ghc/$(shell cat standalone/android/abiversion)/arm-linux-androideabi/bin/cabal build \
--ghc-options=-optl-z --ghc-options=-optlnocopyreloc \
&& mv dist/build/git-annex/git-annex dist/build/git-annex/4.3/git-annex
cd tmp/androidtree && $$HOME/.ghc/$(shell cat standalone/android/abiversion)/arm-linux-androideabi/bin/cabal build \
--ghc-options=-optl-z --ghc-options=-optlnocopyreloc --ghc-options=-optl-fPIE --ghc-options=-optl-pie \
&& mv dist/build/git-annex/git-annex dist/build/git-annex/5.0/git-annex
androidapp:
$(MAKE) android

1
debian/changelog vendored
View file

@ -6,6 +6,7 @@ git-annex (5.20141232) UNRELEASED; urgency=medium
* Avoid re-checksumming when migrating from hash to hashE backend.
Closes: #774494
* Fix build with process 1.2.1.0.
* Android: Provide a version built with -fPIE -pie to support Android 5.0.
-- Joey Hess <id@joeyh.name> Fri, 02 Jan 2015 13:35:13 -0400

View file

@ -0,0 +1,8 @@
[[!comment format=mdwn
username="joey"
subject="""comment 4"""
date="2015-01-05T16:27:20Z"
content="""
I have added a 5.0 build that is built with -fPIE -pie. I have not tested
this build yet so look forward to your feedback.
"""]]

View file

@ -18,6 +18,7 @@ open it to install.
A daily build is also available, thanks to Mesar Hameed and the University
of Bath CS department.
* [Android 5.0 git-annex.apk](http://downloads.kitenet.net/git-annex/autobuild/android/5.0/git-annex.apk)
* [Android 4.4 and 4.3 git-annex.apk](http://downloads.kitenet.net/git-annex/autobuild/android/4.3/git-annex.apk)
* [Android 4.0 to 4.2 git-annex.apk](http://downloads.kitenet.net/git-annex/autobuild/android/4.0/git-annex.apk)
* [build logs](http://downloads.kitenet.net/git-annex/autobuild/android/)

View file

@ -78,17 +78,13 @@ build: start
git rev-parse HEAD > $(GIT_ANNEX_ANDROID_SOURCETREE)/term/libs/armeabi/lib.version.so
cp ../trustedkeys.gpg $(GIT_ANNEX_ANDROID_SOURCETREE)/term/libs/armeabi/lib.trustedkeys.so
mkdir -p ../../tmp/4.0 ../../tmp/4.3
cp ../../tmp/androidtree/dist/build/git-annex/4.3/git-annex $(GIT_ANNEX_ANDROID_SOURCETREE)/term/libs/armeabi/lib.git-annex.so
arm-linux-androideabi-strip --strip-unneeded --remove-section=.comment --remove-section=.note $(GIT_ANNEX_ANDROID_SOURCETREE)/term/libs/armeabi/lib.git-annex.so
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/term && ant debug
cp $(GIT_ANNEX_ANDROID_SOURCETREE)/term/bin/Term-debug.apk ../../tmp/4.3/git-annex.apk
cp ../../tmp/androidtree/dist/build/git-annex/4.0/git-annex $(GIT_ANNEX_ANDROID_SOURCETREE)/term/libs/armeabi/lib.git-annex.so
arm-linux-androideabi-strip --strip-unneeded --remove-section=.comment --remove-section=.note $(GIT_ANNEX_ANDROID_SOURCETREE)/term/libs/armeabi/lib.git-annex.so
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/term && ant debug
cp $(GIT_ANNEX_ANDROID_SOURCETREE)/term/bin/Term-debug.apk ../../tmp/4.0/git-annex.apk
for v in 4.0 4.3 5.0; do \
mkdir -p ../../tmp/$$v; \
cp ../../tmp/androidtree/dist/build/git-annex/$$v/git-annex $(GIT_ANNEX_ANDROID_SOURCETREE)/term/libs/armeabi/lib.git-annex.so; \
arm-linux-androideabi-strip --strip-unneeded --remove-section=.comment --remove-section=.note $(GIT_ANNEX_ANDROID_SOURCETREE)/term/libs/armeabi/lib.git-annex.so; \
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/term && ant debug; \
cp $(GIT_ANNEX_ANDROID_SOURCETREE)/term/bin/Term-debug.apk ../../tmp/$$v/git-annex.apk; \
done
$(GIT_ANNEX_ANDROID_SOURCETREE)/openssl/build-stamp:
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/openssl && CC=$$(which cc) ./Configure android