Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/elfmz/far2l.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorklirichek <alexey@manticoresearch.com>2022-10-04 10:42:22 +0300
committerklirichek <alexey@manticoresearch.com>2022-10-04 10:42:22 +0300
commita7c41fe4a658150402c7fcdb90cedc7622f04805 (patch)
tree808996217d7aff27fe5fba79da9858a2a65b31c1
parent6b7a6001af92bb59babf8941941cf3a9764a020f (diff)
implement arch test for bootstrap
Cmake provides the data as size of CMAKE_SIZEOF_VOID_P, no need to disturb 'getconf'.
-rw-r--r--far2l/bootstrap/CMakeLists.txt11
1 files changed, 7 insertions, 4 deletions
diff --git a/far2l/bootstrap/CMakeLists.txt b/far2l/bootstrap/CMakeLists.txt
index ebeef77e..3a5dd5f2 100644
--- a/far2l/bootstrap/CMakeLists.txt
+++ b/far2l/bootstrap/CMakeLists.txt
@@ -12,10 +12,13 @@ add_custom_target(bootstrap
message(STATUS "generating headers and languages")
-# todo: detect architecture 64 or 32
-# LBITS := $(shell getconf LONG_BIT)
-
-set(DIRBIT 64)
+if (CMAKE_SIZEOF_VOID_P EQUAL 8)
+ set(LBITS 64)
+ set(DIRBIT 64)
+else ()
+ set(LBITS 32)
+ set(DIRBIT 32)
+endif ()
set(BOOTSTRAP "${PROJECT_BINARY_DIR}/bootstrap")
set(SCRIPTS "${CMAKE_CURRENT_SOURCE_DIR}/scripts")