]> granicus.if.org Git - gc/commitdiff
Fix HOST determination in CMake script
authorIvan Maidanski <ivmai@mail.ru>
Wed, 21 Aug 2019 21:48:30 +0000 (00:48 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Wed, 21 Aug 2019 21:49:59 +0000 (00:49 +0300)
As per the configure script, HOST variable value should identify the
target, not build host.

* CMakeLists.txt (HOST): Set variable before find_package(Threads);
change message type to STATUS; report ${HOST} value as "TARGET".
* CMakeLists.txt (_HOST): Use CMAKE_SYSTEM_PROCESSOR instead
of CMAKE_HOST_SYSTEM_PROCESSOR; specify vendor as "unknown" (instead
of empty string); remove FIXME.

CMakeLists.txt

index ba0b55f0e86286052d9c5053f0acb115911c0e26..703a02d3990f97225a79660c7a003e49c99949ae 100644 (file)
@@ -100,6 +100,10 @@ set(SRC alloc.c reclaim.c allchblk.c misc.c mach_dep.c os_dep.c
         mallocx.c)
 set(LIBS)
 
+set(_HOST ${CMAKE_SYSTEM_PROCESSOR}-unknown-${CMAKE_SYSTEM})
+string(TOLOWER ${_HOST} HOST)
+message(STATUS "TARGET = ${HOST}")
+
 if (enable_threads)
   find_package(Threads REQUIRED)
   message("Thread Model: ${CMAKE_THREAD_LIBS_INIT}" )
@@ -113,11 +117,6 @@ endif()
 #       MESSAGE("Parallel mark requires enable_threads ON" )
 #ENDIF(Threads_FOUND)
 
-set(_HOST ${CMAKE_HOST_SYSTEM_PROCESSOR}--${CMAKE_SYSTEM})
-                                #FIXME missing the vendor field.
-string(TOLOWER ${_HOST} HOST)
-message("HOST = ${HOST}")
-
 # Thread Detection.  Relying on cmake for lib and includes.
 #TODO check cmake detection
 if (CMAKE_USE_PTHREADS_INIT)