]> git.sesse.net Git - stockfish/blobdiff - src/Makefile
Fix compile for Android 5
[stockfish] / src / Makefile
index fa0e91a86ea81e2e6c290a386ee9cac0c4229125..8321cdcb36d81816124e7ac4e5ced4d216933567 100644 (file)
@@ -310,6 +310,14 @@ ifeq ($(comp),gcc)
        endif
 endif
 
+### 3.12 Android 5 can only run position independent executables. Note that this
+### breaks Android 4.0 and earlier.
+ifeq ($(arch),armv7)
+       CXXFLAGS += -fPIE
+       LDFLAGS += -fPIE -pie
+endif
+
+
 ### ==========================================================================
 ### Section 4. Public targets
 ### ==========================================================================