Revert "Revert "Reenable support for non-PIE executables""
* Conditionally revert under TARGET_NEEDS_NON_PIE_SUPPORT flag
This reverts commit 76e289c026f11126fc88841b3019fd5bb419bb67.
[mikeioannina]: Fix 5.1 compatibility
6.0 compatibility fixes by Stefan Berger <s.berger81@gmail.com>
Change-Id: I438b1f9f3dff2503a2dd51acbf2351d57f9e0f0b
diff --git a/linker/Android.mk b/linker/Android.mk
index 719c372..309f11c 100644
--- a/linker/Android.mk
+++ b/linker/Android.mk
@@ -61,6 +61,10 @@
# We need to access Bionic private headers in the linker.
LOCAL_CFLAGS += -I$(LOCAL_PATH)/../libc/
+ifeq ($(TARGET_NEEDS_NON_PIE_SUPPORT),true)
+ LOCAL_CFLAGS += -DENABLE_NON_PIE_SUPPORT
+endif
+
# we don't want crtbegin.o (because we have begin.o), so unset it
# just for this module
LOCAL_NO_CRT := true