diff options
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/local.mk | 1 | ||||
-rw-r--r-- | gnu/packages/cmake.scm | 2 | ||||
-rw-r--r-- | gnu/packages/patches/cmake-file-offset-bits-64.patch | 34 |
3 files changed, 37 insertions, 0 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index 33f1b85549..c81e930594 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -871,6 +871,7 @@ dist_patch_DATA = \ %D%/packages/patches/clisp-remove-failing-test.patch \ %D%/packages/patches/clucene-pkgconfig.patch \ %D%/packages/patches/cmake-curl-certificates.patch \ + %D%/packages/patches/cmake-file-offset-bits-64.patch \ %D%/packages/patches/coda-use-system-libs.patch \ %D%/packages/patches/collectd-5.11.0-noinstallvar.patch \ %D%/packages/patches/combinatorial-blas-awpm.patch \ diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm index 03b1ce05c2..74dea1a56a 100644 --- a/gnu/packages/cmake.scm +++ b/gnu/packages/cmake.scm @@ -256,6 +256,8 @@ and workspaces that can be used in the compiler environment of your choice.") (name "cmake-minimal") (source (origin (inherit (package-source cmake-bootstrap)) + (patches (search-patches "cmake-curl-certificates.patch" + "cmake-file-offset-bits-64.patch")) (snippet (match (origin-snippet (package-source cmake-bootstrap)) ((_ _ exp ...) diff --git a/gnu/packages/patches/cmake-file-offset-bits-64.patch b/gnu/packages/patches/cmake-file-offset-bits-64.patch new file mode 100644 index 0000000000..fef369dcf9 --- /dev/null +++ b/gnu/packages/patches/cmake-file-offset-bits-64.patch @@ -0,0 +1,34 @@ +From 5b10f96793ab6f3a4ef446d67c09ea91b7898584 Mon Sep 17 00:00:00 2001 +From: Marc Chevrier <marc.chevrier@gmail.com> +Date: Wed, 23 Sep 2020 18:06:35 +0200 +Subject: [PATCH] Linux: Compile with _FILE_OFFSET_BITS=64 on 32-bit Linux + +To avoid problems accessing filesystem, use 64-bit file offsets when +compilation model is 32-bit. This explicit definition is needed now +that KWSys does not provide LFS settings in its headers anymore. + +Fixes: #20568 +--- + CompileFlags.cmake | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/CompileFlags.cmake b/CompileFlags.cmake +index 053259f47c..1c5f1beca9 100644 +--- a/CompileFlags.cmake ++++ b/CompileFlags.cmake +@@ -53,6 +53,12 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "^parisc") + endif() + endif() + ++# Use 64-bit off_t on 32-bit Linux ++if (CMAKE_SYSTEM_NAME STREQUAL "Linux") ++ # ensure 64bit offsets are used for filesystem accesses for 32bit compilation ++ add_definitions(-D_FILE_OFFSET_BITS=64) ++endif() ++ + # Workaround for TOC Overflow on ppc64 + set(bigTocFlag "") + if(CMAKE_SYSTEM_NAME STREQUAL "AIX" AND +-- +GitLab + |