summaryrefslogtreecommitdiff
path: root/ACE/include/makeinclude/platform_android.GNU
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/include/makeinclude/platform_android.GNU')
-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 ?=