summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShawn Landden <slandden@gmail.com>2017-11-14 11:38:21 -0800
committerShawn Landden <slandden@gmail.com>2017-11-14 11:38:21 -0800
commitdfdb2b3e4d8f74e72477457eae80fce8b9843101 (patch)
tree06f4127c07d32e5d7eff0988e85c8b258a2da684
parent764e18f0089a2ddca710828845fced3da0ef90ee (diff)
downloaddistcc-git-dfdb2b3e4d8f74e72477457eae80fce8b9843101.tar.gz
Android support: -pie
Android will only run position independant exeutables
-rw-r--r--configure.ac3
1 files changed, 2 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index fb74ff3..3dd92cf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -79,6 +79,7 @@ getpeername(0,0,&len);
#include <sys/socket.h>])
dnl Android requires -llog for printf and friends
+dnl and will only run position independant executables
AC_MSG_CHECKING([if building on Android])
AC_TRY_COMPILE([
#ifdef __BIONIC__
@@ -89,7 +90,7 @@ AC_TRY_COMPILE([
#endif],
[func("a"); func("a", "b"); func("a", "b", "c")],
[AC_MSG_RESULT(yes)
- LDFLAGS="$LDFLAGS -llog"],
+ LDFLAGS="$LDFLAGS -llog -pie"],
[AC_MSG_RESULT(no)])
# TODO: Handle program transform rules by autoconf.