summaryrefslogtreecommitdiffstats
path: root/src/arch/bionic/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/bionic/Makefile')
-rw-r--r--src/arch/bionic/Makefile25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/arch/bionic/Makefile b/src/arch/bionic/Makefile
new file mode 100644
index 0000000..410d2c9
--- /dev/null
+++ b/src/arch/bionic/Makefile
@@ -0,0 +1,25 @@
+
+# Bionic (android) does not have:
+# - pthread barriers
+# - pthread_[gs]etaffinity
+#
+# Typically see something like "aarch64-linux-android"
+ifeq (android,$(ostype))
+ USE_BIONIC := 1
+ CFLAGS += -DNO_PTHREAD_BARRIER
+ CFLAGS += -DNO_PTHREAD_SETAFFINITY
+
+ LDFLAGS += -pie
+# -lrt and -lpthread is in standard bionic library, no standalone library
+ LIBS := $(filter-out -lrt,$(LIBS))
+ LIBS := $(filter-out -lpthread,$(LIBS))
+
+# BIONIC does not support PI, barriers and has different files in
+# include/. This means that currently, only these binaries will compile
+# and link properly:
+# - cyclictest
+# - hackbench
+# - hwlatdetect
+ sources := cyclictest.c hackbench.c hwlatdetect.c
+endif
+