summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Corino <mcorino@remedy.nl>2017-03-05 16:22:46 +0100
committerMartin Corino <mcorino@remedy.nl>2017-03-05 16:22:46 +0100
commitbfdd9ee8c0cab97c5bf46c682fc46f8dc22a21c6 (patch)
treea424bb7b30e8319fcadee438af90d78638f5f9e1
parentf69d3089607388e7256d70008c6225cc0cb65bbd (diff)
downloadATCD-bfdd9ee8c0cab97c5bf46c682fc46f8dc22a21c6.tar.gz
Added PIE support by default as needed by supported Android API levels
-rw-r--r--ACE/include/makeinclude/platform_android.GNU5
1 files changed, 4 insertions, 1 deletions
diff --git a/ACE/include/makeinclude/platform_android.GNU b/ACE/include/makeinclude/platform_android.GNU
index 42779ddf49d..a13fb821ad2 100644
--- a/ACE/include/makeinclude/platform_android.GNU
+++ b/ACE/include/makeinclude/platform_android.GNU
@@ -118,6 +118,9 @@ endif # ssl
SYSARCH := $(shell uname -m)
+# as of API level 16 executables can be linked as Position Independent Executables
+# as of API level 21 PIE is mandatory
+PIE ?= -pie
PIC = -fPIC
AR ?= ar
ARFLAGS ?= rsuv
@@ -199,7 +202,7 @@ CPPFLAGS += -D_GNU_SOURCE
DCFLAGS += -ggdb
DCCFLAGS += -ggdb
DLD = $(CXX)
-LD = $(CXX)
+LD = $(CXX) $(PIE)
# make sure to add the required libs for RTTI and exceptions (libsupc++)
# and a shared STL lib (libgnustl_shared by default)
static_libs_only ?=