]> granicus.if.org Git - gc/commitdiff
Accept Android platform by both CMake and configure
authorIvan Maidanski <ivmai@mail.ru>
Tue, 27 Mar 2018 18:27:48 +0000 (21:27 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 27 Mar 2018 18:29:56 +0000 (21:29 +0300)
(fix of commit 1680d91)

* CMakeLists.txt (_HOST): Adjust FIXME comment.
* CMakeLists.txt (HOST): Remove replacement of "android" to "linux".
* CMakeLists.txt [CMAKE_USE_PTHREADS_INIT && HOST=*-*-android*]:
Define GC_THREADS and _REENTRANT macros.
* CMakeLists.txt [CMAKE_USE_PTHREADS_INIT && HOST=*-*-android*
&& enable_parallel_mark]: Define PARALLEL_MARK macro.
* CMakeLists.txt [CMAKE_USE_PTHREADS_INIT && HOST=*-*-android*
&& enable_thread_local_alloc]: Define THREAD_LOCAL_ALLOC macro.
* configure.ac [$THREADS=posix && $host=*-*-android*] (GC_THREADS,
_REENTRANT): Define macro.
* configure.ac [$THREADS=posix && $host=*-*-android*
&& $enable_parallel_mark] (PARALLEL_MARK): Likewise.
* configure.ac [$THREADS=posix && $host=*-*-android*
&& $enable_thread_local_alloc] (THREAD_LOCAL_ALLOC): Likewise.

CMakeLists.txt
configure.ac

index 000e5a639821dbcbda4f92c0f98e02e8afe4c587..1e10a88aab5b5fe33d98e615c7669d89d10bbd3c 100644 (file)
@@ -73,13 +73,8 @@ OPTION(enable_parallel_mark "Parallelize marking and free list construction" ON)
 
 OPTION(enable_cplusplus "install C++ support" NO)
 
-SET(_HOST ${CMAKE_HOST_SYSTEM_PROCESSOR}--${CMAKE_SYSTEM}) #FIXME missing the vendor field.Use lowercase
-
+SET(_HOST ${CMAKE_HOST_SYSTEM_PROCESSOR}--${CMAKE_SYSTEM}) #FIXME missing the vendor field.
 STRING(TOLOWER ${_HOST} HOST)
-
-# Accept Android hosts as Linux.
-STRING(REPLACE "android" "linux" HOST "${HOST}")
-
 MESSAGE("HOST = ${HOST}")
 
 #Thread Detection. Relying on cmake for lib an includes.
@@ -87,7 +82,7 @@ MESSAGE("HOST = ${HOST}")
 IF(CMAKE_USE_PTHREADS_INIT)
         SET(SRC ${SRC} pthread_start.c pthread_support.c pthread_stop_world.c)
         # Common defines for most POSIX platforms.
-        IF( HOST MATCHES .*-.*-aix.*|.*-.*-cygwin.*|.*-.*-darwin.*|.*-.*-.*freebsd.*|.*-.*-gnu.*|.*-.*-hpux11.*|.*-.*-irix.*|.*-.*-.*linux.*|.*-.*-nacl.*|.*-.*-netbsd.*|.*-.*-openbsd.*|.*-.*-osf.*|.*-.*-solaris.*)
+        IF( HOST MATCHES .*-.*-aix.*|.*-.*-android.*|.*-.*-cygwin.*|.*-.*-darwin.*|.*-.*-.*freebsd.*|.*-.*-gnu.*|.*-.*-hpux11.*|.*-.*-irix.*|.*-.*-.*linux.*|.*-.*-nacl.*|.*-.*-netbsd.*|.*-.*-openbsd.*|.*-.*-osf.*|.*-.*-solaris.*)
                 ADD_DEFINITIONS("-DGC_THREADS -D_REENTRANT")
                 IF(enable_parallel_mark)
                     ADD_DEFINITIONS("-DPARALLEL_MARK")
index 354ce1b6b3a5e1f24c38006ada12068fd42b0af5..b7268e6522c76eb99b66c349fda9d89ee57a1583 100644 (file)
@@ -185,7 +185,7 @@ case "$THREADS" in
     default_threadlibs=false
     # Common defines for most POSIX platforms.
     case "$host" in
-      *-*-aix* | *-*-cygwin* | *-*-darwin* | *-*-dragonfly* | \
+      *-*-aix* | *-*-android* | *-*-cygwin* | *-*-darwin* | *-*-dragonfly* | \
       *-*-freebsd* | *-*-haiku* | *-*-hpux11* | *-*-irix* | \
       *-*-kfreebsd*-gnu | *-*-gnu* | *-*-*linux* | *-*-nacl* | \
       *-*-netbsd* | *-*-openbsd* | *-*-osf* | *-*-solaris*)