configure: attempt to get Android going again
authorAaron Carroll <aaronc@cse.unsw.edu.au>
Tue, 12 Feb 2013 08:58:14 +0000 (09:58 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 12 Feb 2013 08:58:14 +0000 (09:58 +0100)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Makefile
configure
os/os-android.h

index 8a7410acefcb621f2b92025830adebf6e94db4f3..bb345ed9899bf7ca44b8ffa646e3e026ffe213ff 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -90,7 +90,6 @@ ifeq ($(UNAME), Android)
   SOURCE += diskutil.c fifo.c blktrace.c trim.c profiles/tiobench.c
   LIBS += -ldl
   LDFLAGS += -rdynamic
-  CPPFLAGS += -DFIO_NO_HAVE_SHM_H
 endif
 ifeq ($(UNAME), SunOS)
   LIBS  += -lpthread -ldl -laio -lrt -lnsl -lsocket
index 87cc1cff8fa1f3691d16d7474753758d975cd2e3..8267e1c0b45209e4da8be760bf71aa4cb6a22083 100755 (executable)
--- a/configure
+++ b/configure
@@ -161,7 +161,9 @@ if test "$show_help" = "yes" ; then
   exit $exit_val
 fi
 
-if check_define __linux__ ; then
+if check_define __ANDROID__ ; then
+  targetos="Android"
+elif check_define __linux__ ; then
   targetos="Linux"
 elif check_define __OpenBSD__ ; then
   targetos='OpenBSD'
@@ -222,6 +224,15 @@ CYGWIN*)
   echo "CC=$CC" >> $config_host_mak
   echo "EXTFLAGS=$CFLAGS -include config-host.h -D_GNU_SOURCE" >> $config_host_mak
   exit 0
+  ;;
+Android)
+  output_sym "CONFIG_32BIT"
+  output_sym "CONFIG_SOCKLEN_T"
+  output_sym "CONFIG_GETTIMEOFDAY"
+  output_sym "CONFIG_CLOCK_GETTIME"
+  echo "CC=$cc" >> $config_host_mak
+  echo "EXTFLAGS=$CFLAGS -include config-host.h -DFIO_NO_HAVE_SHM_H -D_GNU_SOURCE" >> $config_host_mak
+  exit 0
 esac
 
 if test ! -z "$cpu" ; then
index e436f8fbdd050061383dd9a0d592240d289fc8c0..cedfdaf8ea8ca0910715580a08ee317d8fc3dd12 100644 (file)
@@ -30,6 +30,7 @@
 #define FIO_USE_GENERIC_INIT_RANDOM_STATE
 #define FIO_HAVE_E4_ENG
 #define FIO_HAVE_BYTEORDER_FUNCS
+#define FIO_HAVE_MMAP_HUGE
 
 #define OS_MAP_ANON            MAP_ANONYMOUS